We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6cee6d2 + 7907bf3 commit a51fe47Copy full SHA for a51fe47
src/gridstack.ts
@@ -700,6 +700,9 @@ export class GridStack {
700
items = Utils.cloneDeep(items); // so we can mod
701
const column = this.getColumn();
702
703
+ // make sure size 1x1 (default) is present as it may need to override current sizes
704
+ items.forEach(n => { n.w = n.w || 1; n.h = n.h || 1 });
705
+
706
// if we have a mix of new items without coordinates and existing items, separate them out so they can be added after #2639
707
let addAfter = items.filter(n => (n.x === undefined || n.y === undefined) && !Utils.find(this.engine.nodes, n.id));
708
if (addAfter.length && addAfter.length !== items.length) {
0 commit comments