Bit safer.
This commit is contained in:
parent
19f41a72a8
commit
d521ef5330
4 changed files with 6 additions and 4 deletions
3
dist/gridstack.js
vendored
3
dist/gridstack.js
vendored
|
|
@ -336,11 +336,12 @@
|
|||
};
|
||||
|
||||
GridStackEngine.prototype.removeNode = function(node, detachNode) {
|
||||
detachNode = typeof detachNode === 'undefined' ? true : detachNode;
|
||||
this._removedNodes.push(_.clone(node));
|
||||
node._id = null;
|
||||
this.nodes = _.without(this.nodes, node);
|
||||
this._packNodes();
|
||||
if (typeof detachNode != 'undefined' && detachNode) {
|
||||
if (detachNode) {
|
||||
this._notify(node);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
2
dist/gridstack.min.js
vendored
2
dist/gridstack.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/gridstack.min.map
vendored
2
dist/gridstack.min.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -336,11 +336,12 @@
|
|||
};
|
||||
|
||||
GridStackEngine.prototype.removeNode = function(node, detachNode) {
|
||||
detachNode = typeof detachNode === 'undefined' ? true : detachNode;
|
||||
this._removedNodes.push(_.clone(node));
|
||||
node._id = null;
|
||||
this.nodes = _.without(this.nodes, node);
|
||||
this._packNodes();
|
||||
if (typeof detachNode != 'undefined' && detachNode) {
|
||||
if (detachNode) {
|
||||
this._notify(node);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue