Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Eclipse Layout Kernel » Incremental layout
Incremental layout [message #1792744] Mon, 23 July 2018 13:10 Go to next message
Christophe De Loor is currently offline Christophe De LoorFriend
Messages: 9
Registered: May 2018
Junior Member
I often find it annoying that removing 1 node or edge can trigger massive changes in the layout. Is there a possibility to make the layout incremental so that the previous layout is taken into account when making smaller changes?

Best regards,
Christophe
Re: Incremental layout [message #1792832 is a reply to message #1792744] Tue, 24 July 2018 14:20 Go to previous messageGo to next message
Christoph Daniel Schulze is currently offline Christoph Daniel SchulzeFriend
Messages: 98
Registered: September 2015
Member
Christophe,

that depends on the layout algorithm you're using. If it's ELK Layered, we have something like an incremental layout. Compute the initial layout as usual, and for subsequent layouts set the following options to their interactive settings:



You may want to be careful with the last one; it's rather experimental, and chances are you will do just fine without it.

Hope this helps!

Cheers,
Chris
Re: Incremental layout [message #1817928 is a reply to message #1792832] Tue, 03 December 2019 09:13 Go to previous messageGo to next message
Christophe De Loor is currently offline Christophe De LoorFriend
Messages: 9
Registered: May 2018
Junior Member
Hi Chris,

It's been a while since I've asked this question originally, but I'm testing some things that requires me to revisit this.
I've tried setting the layout options you suggested, but also noticed in the reference there is a layout option 'elk.interactive'. What does this do compared to the layout options you suggested?

Do I need to provide the original graph layout (i.e. the x and y position for the nodes and the sections for the edges) as input to the algorithm for the interactive mode to work, or does it have some internal mechanism which takes care of this?

Best regards,
Christophe De Loor
Re: Incremental layout [message #1817929 is a reply to message #1817928] Tue, 03 December 2019 09:17 Go to previous messageGo to next message
Christoph Daniel Schulze is currently offline Christoph Daniel SchulzeFriend
Messages: 98
Registered: September 2015
Member
Christophe De Loor wrote on Tue, 03 December 2019 09:13
I've tried setting the layout options you suggested, but also noticed in the reference there is a layout option 'elk.interactive'. What does this do compared to the layout options you suggested?


Simpler layout algorithms can simply support that option to be put in interactive mode. The layered algorithm is a lot more complex and supports interactive strategies for many of its phases which can be switched on and off per phase. Thus, it doesn't support that option, but has more fine-grained options the ones I mentioned. :)

Christophe De Loor wrote on Tue, 03 December 2019 09:13
Do I need to provide the original graph layout (i.e. the x and y position for the nodes and the sections for the edges) as input to the algorithm for the interactive mode to work?


Yes, the algorithm needs coordinates as a starting point. What we often do is run the algorithm non-interactively for the initial layout, and interactively afterwards once users have started meddling with the drawing.
Re: Incremental layout [message #1817950 is a reply to message #1817929] Tue, 03 December 2019 14:14 Go to previous messageGo to next message
Christophe De Loor is currently offline Christophe De LoorFriend
Messages: 9
Registered: May 2018
Junior Member
Thanks for the reply Chris.

As long as I only update edges, this interactive mode seems to work quite well.
However, adding a new node to the graph is troublesome. The new node is always added on the top-left of the graph (see attachment)

Is there still an issue with the layout options I am setting? For interactive, I am currently using (elkjs version):
'elk.algorithm': 'layered',
'elk.direction': 'RIGHT',
'elk.separateConnectedComponents': false,
'elk.layered.spacing.nodeNodeBetweenLayers': 50,
'elk.padding': '[top=70,left=50,bottom=50,right=50]',
'elk.layered.contentAlignment': 'H_LEFT',
'elk.alignment': 'LEFT',
'elk.hierarchyHandling': 'INCLUDE_CHILDREN',
'elk.layered.layering.strategy': 'INTERACTIVE',
'elk.layered.cycleBreaking.strategy': 'INTERACTIVE',
'elk.layered.crossingMinimization.strategy': 'INTERACTIVE',
'elk.layered.nodePlacement.strategy': 'INTERACTIVE',
Re: Incremental layout [message #1817958 is a reply to message #1817950] Tue, 03 December 2019 15:22 Go to previous message
Christoph Daniel Schulze is currently offline Christoph Daniel SchulzeFriend
Messages: 98
Registered: September 2015
Member
Yep, that's because the node has coordinates (0, 0) when it is created and is thus placed in the top left corner. We currently don't have algorithms that support this level of interactivity - sorry.
Previous Topic:Overlapping edges with straight edges in Layered Algorithm
Next Topic:ELK JavaFX port and self loop issue
Goto Forum:
  


Current Time: Thu Apr 25 05:21:11 GMT 2024

Powered by FUDForum. Page generated in 0.03457 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top