This commit is contained in:
Pavel Reznikov 2014-12-19 17:54:03 -08:00
parent 88536bbbca
commit 38532dd8fe
2 changed files with 6 additions and 2 deletions

File diff suppressed because one or more lines are too long

View file

@ -50,9 +50,14 @@
GridStackEngine.prototype._fix_collisions = function (node) {
this._sort_nodes(-1);
var nn = node, has_locked = Boolean(_.find(this.nodes, function (n) { return n.locked }));
if (!this.float && !has_locked) {
nn = {x: 0, y: node.y, width: this.width, height: node.height};
}
while (true) {
var collision_node = _.find(this.nodes, function (n) {
return n != node && Utils.is_intercepted(n, node);
return n != node && Utils.is_intercepted(n, nn);
}, this);
if (typeof collision_node == 'undefined') {
return;