Layout option to force global `container: root` coordinates for all children and edges
New to Elk , I will be glad for any help.
I have a nested layout with cross-parent edges.
After enabling "hierarchyHandling": "INCLUDE_CHILDREN" layout option, I noticed that some of the edges are using startPoint / endPoint sections relative to the container coordinates they are located.
Is there a layout option I can enable to force all children and edges to use global container: root coordinates instead?
Hi snemsi, You have a documentation about coordinates system here. There is no link between this coordinates system and the layout options. Regards, Laurent
Sorry, I don't follow you. Is there a way to force all childrens/edges to use global root coordinates?
No, not that I know of.
Hi @snelsi, as I understand it, you want to be able to configure whether to use absolute or relative coordinates. This is currently not possible and also probably out of the scope of ELK. Is there any obstacle to simply computing the absolute coordinates from the layout results produced by ELK?
This should be addressed when fixing https://github.com/eclipse/elk/issues/901
@Eddykasp,
I'm currently using elkjs along with xyflow/react and integrating my custom edge renderer.
xyflow organizes nodes and edges separately into two flat arrays without nested hierarchy. While it handles nodes with parent-relative coordinates well, I'm unsure if it can manage edges with parent-relative coordinates.
This means I have to calculate and convert all edges to absolute coordinates, which is a bit inconvenient and increases the chance of mistakes.
I had hoped that elk would provide an option to use flat children/edges output with absolute coordinates.
I see, I previously misunderstood the problem.