(childSet: ChildSet, index: number, node: SplootNode, childSetId: string)
| 537 | |
| 538 | @action |
| 539 | wrapNode(childSet: ChildSet, index: number, node: SplootNode, childSetId: string) { |
| 540 | // Remove original child at index (sends mutations) |
| 541 | const child = childSet.removeChild(index) |
| 542 | const wrapChildSet = node.getChildSet(childSetId) |
| 543 | // Clear all children from that childset (this is a detached node so it won't send mutations) |
| 544 | while (wrapChildSet.getCount() !== 0) { |
| 545 | wrapChildSet.removeChild(0) |
| 546 | } |
| 547 | wrapChildSet.addChild(child) |
| 548 | |
| 549 | // Insert the completed node |
| 550 | childSet.insertNode(node, index) |
| 551 | } |
| 552 | |
| 553 | @action |
| 554 | exitEdit() { |
no test coverage detected