* @function LevelRenderer.Group.prototype.removeChild * @description 移除子节点。 * @param {LevelRenderer.Shape} child - 需要移除的子节点图形。
(child)
| 159 | * @param {LevelRenderer.Shape} child - 需要移除的子节点图形。 |
| 160 | */ |
| 161 | removeChild(child) { |
| 162 | var idx = CommonUtil.indexOf(this._children, child); |
| 163 | |
| 164 | this._children.splice(idx, 1); |
| 165 | child.parent = null; |
| 166 | |
| 167 | if (this._storage) { |
| 168 | |
| 169 | this._storage.delFromMap(child.id); |
| 170 | |
| 171 | if (child instanceof Group) { |
| 172 | child.delChildrenFromStorage(this._storage); |
| 173 | } |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | |
| 178 | /** |
no test coverage detected