fix: use correct ELK root for handler node coordinate extraction
Handler section nodes were positioned relative to rootNode, but they live under separate handlerRoot ELK graphs. Using getElkRoot() to find each node's actual root ensures correct absolute coordinates. This combined with the POLYLINE edge routing should eliminate the Y-offset misalignment between main flow nodes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -302,8 +302,11 @@ public class ElkDiagramRenderer implements DiagramRenderer {
|
||||
ElkNode elkNode = elkNodeMap.get(rn.getId());
|
||||
if (elkNode == null) continue;
|
||||
|
||||
// Use the correct root for coordinate calculation:
|
||||
// handler nodes use their handler root, main flow uses rootNode
|
||||
ElkNode coordRoot = getElkRoot(elkNode);
|
||||
positionedNodes.add(extractPositionedNode(rn, elkNode, elkNodeMap,
|
||||
compoundNodeIds, compoundInfos, rootNode));
|
||||
compoundNodeIds, compoundInfos, coordRoot));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user