Fix major bug in layout iteration

This commit is contained in:
Ian Gulliver
2019-07-16 06:13:53 +00:00
parent a40c8ea1fc
commit 87f8d6edd8
3 changed files with 10 additions and 11 deletions

View File

@@ -35,18 +35,11 @@ class LayoutGroup {
}
savePos() {
for (let node of this.nodes) {
node.savePos();
}
this.savedVec_ = Array.from(this.vec);
}
restorePos() {
for (let node of this.nodes) {
node.restorePos();
}
for (let node of this.nodes) {
this.nodesByPos_.set(node.pos, node);
}
this.vec = this.savedVec_;
}
moveBy(offset) {