(child: Node, index: number)
| 518 | // -- Tree |
| 519 | |
| 520 | insertChild(child: Node, index: number): void { |
| 521 | child.parent = this |
| 522 | this.children.splice(index, 0, child) |
| 523 | this.markDirty() |
| 524 | } |
| 525 | removeChild(child: Node): void { |
| 526 | const idx = this.children.indexOf(child) |
| 527 | if (idx >= 0) { |