(source: { x: number; y: number }, target: { x: number; y: number })
| 585 | }; |
| 586 | |
| 587 | const 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 | |
| 594 | export const buildMindMapSvgMarkup = ( |
| 595 | root: MindMapTreeNode, |
nothing calls this directly
no outgoing calls
no test coverage detected