mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-19 18:32:04 -04:00
Add comment about name being set again in addChild().
This commit is contained in:
parent
2b5cfa401a
commit
07839cf683
1 changed files with 2 additions and 0 deletions
|
@ -822,6 +822,8 @@ var Item = this.Item = Base.extend(/** @lends Item# */{
|
||||||
Base.splice(this._children, [item], index, 0);
|
Base.splice(this._children, [item], index, 0);
|
||||||
item._parent = this;
|
item._parent = this;
|
||||||
item._setProject(this._project);
|
item._setProject(this._project);
|
||||||
|
// Setting the name again makes sure all name lookup structures are
|
||||||
|
// kept in sync.
|
||||||
if (item._name)
|
if (item._name)
|
||||||
item.setName(item._name);
|
item.setName(item._name);
|
||||||
this._changed(Change.HIERARCHY);
|
this._changed(Change.HIERARCHY);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue