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

Function getNodeBox

frontend-workflow/src/utils/mindmapTree.ts:576–585  ·  view source on GitHub ↗
(node: Node<MindMapNodeData>)

Source from the content-addressed store, hash-verified

574};
575
576const getNodeBox = (node: Node<MindMapNodeData>) => {
577 const width = node.data.isRoot ? SVG_ROOT_WIDTH : SVG_CHILD_WIDTH;
578 const height = node.data.isRoot ? SVG_ROOT_HEIGHT : SVG_CHILD_HEIGHT;
579 return {
580 x: node.position.x - width / 2,
581 y: node.position.y - height / 2,
582 width,
583 height,
584 };
585};
586
587const edgePath = (source: { x: number; y: number }, target: { x: number; y: number }) => {
588 const dx = target.x - source.x;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected