Closed BCampbellDev closed 6 months ago
forgot to add - this is our current set of options:
{ "org.eclipse.elk.algorithm": "layered", "org.eclipse.elk.alignment": "CENTER", "org.eclipse.elk.contentAlignment": "CENTER", "org.eclipse.elk.edgeRouting": "SPLINES", "org.eclipse.elk.layered.edgeRouting.splines.mode": "CONSERVATIVE", "org.eclipse.elk.edge.thickness": 1, "org.eclipse.elk.spacing.nodeNode": 50, "org.eclipse.elk.spacing.edgeNode": 100, "org.eclipse.elk.spacing.edgeEdge": 100, "org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers": 40, "org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers": 25, "org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers": 25, "org.eclipse.elk.layered.considerModelOrder.strategy": "NODES_AND_EDGES", "org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening": "IMPROVE_STRAIGHTNESS", "org.eclipse.elk.layered.nodePlacement.favorStraightEdges": true, "org.eclipse.elk.layered.nodePlacement.strategy": "BRANDES_KOEPF", "org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment": "RIGHTDOWN", "org.eclipse.elk.layered.crossingMinimization.strategy": "LAYER_SWEEP", "org.eclipse.elk.layered.crossingMinimization.semiInteractive": true, "org.eclipse.elk.layered.layering.strategy": "INTERACTIVE", "org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth": -1, "org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor": -1 }
@soerendomroes tagging you just cause you have been so helpful before :)
Currently on vacation. What exactly do you want in terms of stability and order?
We should have a blog post regarding order somewhere on the ELK Website.
@soerendomroes thanks for getting back - enjoy your vacation :) Maybe someone else would be able to take a look
Hi @BCampbellDev if you could provide a recreation of your problem in elk-live that would be helpful for us to provide better advice on what options you should use. Also what type of user interaction do you need to support? In principle, if you can control the ordering of the graph elements within the model, then the model order options outlined in this blog post should be able to help you.
@Eddykasp when trying to link to my live models I get an error, so I'm going to share the JSON for three models. These were generated during our applications process of adding a new edge.
I wonder if the real issue I am experiencing is the order of the edges.
I think by comparing the three you can see, we have three edges leaving the 09e7a1 node. Then during the process of adding a new edge with new nodes, the order of the edges changes.
example_1.json example_2.json example_3.json
You will see that a new edge is added after the 2nd edge and not at the bottom, and the edge that node 'ac6f18' is on , seems to move after nodes are added to the new edge, and that new edge is then dropped to the bottom.
Our goal is to have it so the order of the edges does not change during this process - that we can say , edge 1 is always on the top, edge 2 is always next underneath, new edges are always on the bottom, etc..
Its not clear to me what is determining their layout or what options I could add so the edges do not change position, either during the process or going forward ( if the user reloads the json )
Thanks for any help you can provide!
@BCampbellDev and I work together. I'm just a PM but I thought maybe some concrete examples might help. 🤷
Check out these two screenshots from our application. In the first example, it's logical, no issue. But add one node at the beginning (in an irrelevant location), and the entire layout changes.
Even repeating the same setup twice can produce two different layouts or switch layouts randomly. These are identical in our system but lay out completely differently.
So far I haven't quite been able to understand where your problem is occuring. In this example I've recreated a minimal version of your first screenshot. Could you extend this until you can reproduce your issue and link to that. Also what version of ELK are you using?
@Eddykasp I was able to resolve the issue by assigning an out port for each edge, and then the order of the ports determines the layout of the edges.
I think this one is all set. Thanks!
We have multiple node types that branch off into multiple edges.
We are seeing the layout order is unpredictable.
Our application is interactive and we are hoping to avoid node layout changing as users interact with it. Hoping for advice on best settings either global parent layout options or options to add to the node themselves so the order does not change. So how can we ensure new empty edges always are on the bottom, and the edges don't switch around their layout.
Thank you for any help you can provide!