fix auto-positioning
This commit is contained in:
parent
755c865696
commit
ecc9293a5f
|
@ -174,6 +174,9 @@
|
||||||
|
|
||||||
for (var i = 0; ; ++i) {
|
for (var i = 0; ; ++i) {
|
||||||
var x = i % this.width, y = Math.floor(i / this.width);
|
var x = i % this.width, y = Math.floor(i / this.width);
|
||||||
|
if (x + node.width > this.width) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (!_.find(this.nodes, function (n) {
|
if (!_.find(this.nodes, function (n) {
|
||||||
return Utils.is_intercepted({x: x, y: y, width: node.width, height: node.height}, n);
|
return Utils.is_intercepted({x: x, y: y, width: node.width, height: node.height}, n);
|
||||||
})) {
|
})) {
|
||||||
|
|
Loading…
Reference in a new issue