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

Function edgePath

frontend-workflow/src/utils/mindmapTree.ts:587–592  ·  view source on GitHub ↗
(source: { x: number; y: number }, target: { x: number; y: number })

Source from the content-addressed store, hash-verified

585};
586
587const edgePath = (source: { x: number; y: number }, target: { x: number; y: number }) => {
588 const dx = target.x - source.x;
589 const control = Math.max(70, Math.min(220, Math.abs(dx) * 0.45));
590 const dir = dx >= 0 ? 1 : -1;
591 return `M ${source.x} ${source.y} C ${source.x + dir * control} ${source.y}, ${target.x - dir * control} ${target.y}, ${target.x} ${target.y}`;
592};
593
594export const buildMindMapSvgMarkup = (
595 root: MindMapTreeNode,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected