(child)
| 128 | */ |
| 129 | // TODO Type Check |
| 130 | addChild(child) { |
| 131 | if (child == this) { |
| 132 | return; |
| 133 | } |
| 134 | |
| 135 | if (child.parent == this) { |
| 136 | return; |
| 137 | } |
| 138 | if (child.parent) { |
| 139 | child.parent.removeChild(child); |
| 140 | } |
| 141 | |
| 142 | this._children.push(child); |
| 143 | child.parent = this; |
| 144 | |
| 145 | if (this._storage && this._storage !== child._storage) { |
| 146 | |
| 147 | this._storage.addToMap(child); |
| 148 | |
| 149 | if (child instanceof Group) { |
| 150 | child.addChildrenToStorage(this._storage); |
| 151 | } |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | |
| 156 | /** |
no test coverage detected