MCPcopy Create free account
hub / github.com/OpenDCAI/Paper2Any / removeNodeById

Function removeNodeById

frontend-workflow/src/utils/mindmapTree.ts:179–182  ·  view source on GitHub ↗
(root: MindMapTreeNode, nodeId: string)

Source from the content-addressed store, hash-verified

177};
178
179export const removeNodeById = (root: MindMapTreeNode, nodeId: string): MindMapTreeNode => {
180 if (root.id === nodeId) return root;
181 return removeNodeRecursive(root, nodeId).node;
182};
183
184const measureHeight = (node: MindMapTreeNode): number => {
185 if (node.children.length === 0) return NODE_HEIGHT;

Callers 1

handleDeleteNodeFunction · 0.90

Calls 1

removeNodeRecursiveFunction · 0.85

Tested by

no test coverage detected