diff --git a/frontend/src/components/tree-editor/TreeCanvas.tsx b/frontend/src/components/tree-editor/TreeCanvas.tsx index ecb00322..a89cfd25 100644 --- a/frontend/src/components/tree-editor/TreeCanvas.tsx +++ b/frontend/src/components/tree-editor/TreeCanvas.tsx @@ -619,29 +619,31 @@ export function TreeCanvas() { ) : ( // Multiple children: horizontal branching -
- {/* Horizontal fork line */} + // The fork line and child lanes share the same flex container so the + // line is sized by the actual rendered children, not a hardcoded estimate. +
+ {/* Horizontal fork line — absolutely positioned, aligned to child centers. + Spans from center of first lane to center of last lane. */}
- {/* Child lanes */} -
- {orderedChildren.map(({ child, optionLabel: ol, childIndex }) => ( -
- {/* Vertical stub into child lane */} -
- {renderNode(child, node.id, childIndex, ol)} -
- ))} -
+ {orderedChildren.map(({ child, optionLabel: ol, childIndex }) => ( +
+ {/* Vertical stub into child lane */} +
+ {renderNode(child, node.id, childIndex, ol)} +
+ ))}
)}