Fix wrong internal caching of absolute attributes. fix #843

This commit is contained in:
Anton Lavrenov
2020-02-10 08:22:07 -05:00
parent 2634bbbf89
commit 86f847a702
6 changed files with 70 additions and 15 deletions

View File

@@ -123,13 +123,14 @@ export abstract class Container<ChildType extends Node> extends Node<
}
return this;
}
var child = arguments[0];
var child = children[0];
if (child.getParent()) {
child.moveTo(this);
return this;
}
var _children = this.children;
this._validateAdd(child);
child._clearCaches();
child.index = _children.length;
child.parent = this;
_children.push(child);