|
Re: Any ELK Grid Layouts in the Wild? [message #1849533 is a reply to message #1849423] |
Mon, 24 January 2022 08:39   |
|
Hi Brandon,
Unfortunately, ELK does not support the "grid snapping". I've asked the question in gitter in july 2019.
There is maybe a solution (not tested):
* Use one of these layouts : rectpacking or box (by ignoring edges layout). Do you tested them for the nodes layout?
* And then layout the edges "manually". If the expected edge's layout is simple, for example connect the center of the source and the target, you can probably use the Sirius extension point "org.eclipse.sirius.diagram.elk.layout.extension" to add post-treatment after the ELK layout.
It's not necessarily easy to do, but it could work.
Have you a screenshot of the expected layout result?
Regards,
Laurent
Laurent Redor - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Re: Any ELK Grid Layouts in the Wild? [message #1849787 is a reply to message #1849533] |
Wed, 02 February 2022 15:19  |
Brandon Lewis Messages: 252 Registered: May 2012 |
Senior Member |
|
|
An example of what I need is show here in a graphviz grid example:
https://graphviz.org/Gallery/undirected/grid.html
There are two key provisions I see here:
1) weighted edges essentially push the nodes into a grid. This particular graph is undirected. All the ELK layouts seem to want things to be directed and thus the edges start shifting everything diagonally or just randomly.
2) specifying that certain nodes are in the same "rank" aka row. I can only approximate this by setting the aspect ratio of box or rect ELK layouts to specifically match my model and relying on the aspect ratio to cut off rows where I need them to. Which isn't dynamically settable as far as I can tell.
It's been a disappointed to watch the entire set of layouts fail for this task. For the time being, I'm pausing the effort for a second time and just writing a FreeMarker template to generate a Graphviz dot file. Eclipse solutions for viewing graphviz dot files are also massively overly complex (install GEF, install Zest, install JavaFX, install .. install install - all of which burden how easily I can deploy and get all the dependencies in order (which now changes every 3 months!))
Thanks for your suggestion. I tried box and rect and they, sort of, get me closer. But my critical feature to visualize involves superimposing edge network connectivity on top of a grid of nodes.
With the box and rect layouts ignoring the edges, it's just a huge entangled mess that users would hate me for if I made them manually lay it out.
While I can give a user a view now, I've completely disconnected them from my Eclipse plugin and the whole, really wonderful, Sirius environment.
|
|
|
Powered by
FUDForum. Page generated in 0.02045 seconds