(layoutState: LayoutTreeState)
| 417 | } |
| 418 | |
| 419 | export function clearTree(layoutState: LayoutTreeState) { |
| 420 | layoutState.rootNode = undefined; |
| 421 | layoutState.leafOrder = undefined; |
| 422 | layoutState.focusedNodeId = undefined; |
| 423 | layoutState.magnifiedNodeId = undefined; |
| 424 | } |
| 425 | |
| 426 | export function replaceNode(layoutState: LayoutTreeState, action: LayoutTreeReplaceNodeAction) { |
| 427 | const { targetNodeId, newNode } = action; |