eclipse / elk

Eclipse Layout Kernel - Automatic layout for Java applications.
https://www.eclipse.org/elk/
Other
259 stars 86 forks source link

How to avoid the layout to change the children order when adding a new node? #985

Closed znobakht closed 2 months ago

znobakht commented 11 months ago

I am using ELK for drawing hierarchical data. When I add a new node, the children's order of each node changes. How could I fix it?

soerendomroes commented 5 months ago

Hi, we seem to have missed this ticket. We have a blogpost regarding order and I would suggest to set considerModelOrder.strategy: PREFER_EDGES if the order of edges should define the order of children. If you want to constrain the order of nodes, I suggest considerModelOrder.strategy: NODES_AND_EDGES and forceNodeModelOrder: true.