fix in isAreaEmpty and _notify

This commit is contained in:
Pavel Reznikov 2016-02-22 22:48:20 -08:00
parent 00d780adfa
commit a33f046fa6
4 changed files with 5 additions and 5 deletions

4
dist/gridstack.js vendored
View file

@ -177,7 +177,7 @@
var collisionNode = _.find(this.nodes, _.bind(function(n) {
return Utils.isIntercepted(n, nn);
}, this));
return collisionNode === null;
return collisionNode === null || typeof collisionNode === 'undefined';
};
GridStackEngine.prototype._sortNodes = function(dir) {
@ -277,7 +277,7 @@
if (this._updateCounter) {
return;
}
var deletedNodes = Array.prototype.slice.call(arguments, 1).concat(this.getDirtyNodes());
var deletedNodes = Array.prototype.slice.call(arguments, 0);
deletedNodes = deletedNodes.concat(this.getDirtyNodes());
this.onchange(deletedNodes);
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -277,7 +277,7 @@
if (this._updateCounter) {
return;
}
var deletedNodes = Array.prototype.slice.call(arguments, 1).concat(this.getDirtyNodes());
var deletedNodes = Array.prototype.slice.call(arguments, 0);
deletedNodes = deletedNodes.concat(this.getDirtyNodes());
this.onchange(deletedNodes);
};