Bit safer.

This commit is contained in:
d 2016-02-24 13:22:36 -05:00
commit d521ef5330
4 changed files with 6 additions and 4 deletions

3
dist/gridstack.js vendored
View file

@ -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);
}
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -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);
}
};