fix widgets packing in float mode
This commit is contained in:
parent
ab02fbbd35
commit
8ab371567b
|
@ -64,15 +64,19 @@
|
||||||
if (n._updating || typeof n._orig_y == 'undefined' || n.y == n._orig_y)
|
if (n._updating || typeof n._orig_y == 'undefined' || n.y == n._orig_y)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var collision_node = _.chain(this.nodes)
|
var new_y = n.y;
|
||||||
.find(function (bn) {
|
while (new_y >= n._orig_y) {
|
||||||
return n != bn && Utils.is_intercepted({x: n.x, y: n._orig_y, width: n.width, height: n.height}, bn);
|
var collision_node = _.chain(this.nodes)
|
||||||
})
|
.find(function (bn) {
|
||||||
.value();
|
return n != bn && Utils.is_intercepted({x: n.x, y: new_y, width: n.width, height: n.height}, bn);
|
||||||
|
})
|
||||||
|
.value();
|
||||||
|
|
||||||
if (!collision_node) {
|
if (!collision_node) {
|
||||||
n._dirty = true;
|
n._dirty = true;
|
||||||
n.y = n._orig_y;
|
n.y = new_y;
|
||||||
|
}
|
||||||
|
--new_y;
|
||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue