Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 440025b

Browse files
committed
update dist
1 parent c363313 commit 440025b

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

dist/gridstack.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,12 +335,15 @@
335335
return node;
336336
};
337337

338-
GridStackEngine.prototype.removeNode = function(node) {
338+
GridStackEngine.prototype.removeNode = function(node, detachNode) {
339+
detachNode = typeof detachNode === 'undefined' ? true : detachNode;
339340
this._removedNodes.push(_.clone(node));
340341
node._id = null;
341342
this.nodes = _.without(this.nodes, node);
342343
this._packNodes();
343-
this._notify(node);
344+
if (detachNode) {
345+
this._notify(node);
346+
}
344347
};
345348

346349
GridStackEngine.prototype.canMoveNode = function(node, x, y, width, height) {
@@ -1083,7 +1086,7 @@
10831086
node = this.grid.getNodeDataByDOMEl(el);
10841087
}
10851088

1086-
this.grid.removeNode(node);
1089+
this.grid.removeNode(node, detachNode);
10871090
el.removeData('_gridstack_node');
10881091
this._updateContainerHeight();
10891092
if (detachNode) {
@@ -1105,7 +1108,7 @@
11051108
$(window).off('resize', this.onResizeHandler);
11061109
this.disable();
11071110
if (typeof detachGrid != 'undefined' && !detachGrid) {
1108-
this.removeAll(true);
1111+
this.removeAll(false);
11091112
} else {
11101113
this.container.remove();
11111114
}

0 commit comments

Comments
 (0)