-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ELK layout with constraints #786
Comments
There are two different ways to constrain node positions.
The other way requires configuring an additional layout run. The first layout run provides these kind of positions and an initial layering on which we can work to calculate positions on constraint nodes. This would allow using more abstract absolute position and layer constraints such as the ones described here. Port positions are fixed by setting |
Thanks for the quick response! I looked into the KLighD repo to try to understand the places that you pointed us towards. Would there be an example for ELK with KlighD somewhere? Some of it is quite confusing and an example would be a great starting point. We're trying to mostly use this on the backend for generating the placements and routes, and we were also wondering if there was potentially a Python wrapper for this logic in a similar manner to sprotty-elk? |
Yes, the KIELER tool uses two other repositories (semantics and pragmatics) together with KLighd and ELK. For example the ElkGraphDiagramSynthesis in the pragmatic specifies the I try to point you to the important parts of ELK instead that are used by Klighd to run more than one algorithm after the other: In the |
I'll take a deeper look into the DiagramLayoutEngine then to see if I can get a better understanding of the layout engine then. Will probably have further questions :) |
With the next ELK release it should be possible to define the layer and position of a node also via the ordering in the model file. This does work very good for constraining nodes to be in a specific layer (again, in-alyer eges are still possible) but does not necessarily constrain the position since it still tries to optimize for edge crossings. As an example
Orders the outgoing edges of n1 such that the long edge to n3 is on top of n2. The following example however creates a backward edge. n1 is in the first layer, n3 in the second and n2 in the third.
|
I've been using ELK to do some layouts in Sprotty and it has been working very well so far. However, I was wondering if there was any way to add constraints such as fixing node positions, port positions, and re-doing ELK layout on the unfixed nodes. Overall this seems to be pretty difficult especially for the layered version of ELK as per #315, but was wondering if there was any pointers on where to start/look if we wanted to create/add this functionality, either via ELK or other routing libraries such as Adaptagrams.
Overall, we just want to be able to add some constraints to node/port placement -- and potentially use the Adaptagrams libavoid library to route the edges.
Any help or guidance would be greatly appreciated!
The text was updated successfully, but these errors were encountered: