Skip to main content



      Home
Home » Modeling » Eclipse Layout Kernel » LayeredLayoutProvider: keep order of nodes(Order of nodes and partial layouting..)
LayeredLayoutProvider: keep order of nodes [message #1836365] Wed, 30 December 2020 09:37 Go to next message
Eclipse UserFriend
Hello,

Is it possible to use LayeredLayoutProvider with keeping the order of nodes? The use-case for this: The user creates a graph uses the auto-layout and exchanges to positions of two nodes and uses the auto-layout.

I've checked most of the options, but i don't have an idea which comes next to my requirement. So i am wondering, if its even possible. Thank you in advance.

Best regards
MKaraman
Re: LayeredLayoutProvider: keep order of nodes [message #1836441 is a reply to message #1836365] Mon, 04 January 2021 07:17 Go to previous messageGo to next message
Eclipse UserFriend
It depends on which _order_ you mean exactly and how strict you require the algorithm to be.

You could have a look at the _User-Hints_ examples, the vertical one, for instance.
Re: LayeredLayoutProvider: keep order of nodes [message #1836474 is a reply to message #1836441] Tue, 05 January 2021 07:40 Go to previous messageGo to next message
Eclipse UserFriend
Thank you for your help. The example is very good to understand the different behavior of the ports.
Re: LayeredLayoutProvider: keep order of nodes [message #1837951 is a reply to message #1836474] Thu, 11 February 2021 04:45 Go to previous messageGo to next message
Eclipse UserFriend
The vertical node order works only for 2 Nodes, if i have 3 or more it seems that the list order doesn't determine the order in the layout. Is this my misunderstanding or a bug in the layouting algorithm?

The following example can reproduce my problem: Just by ordering the edges doesn't influence the order in the layout. Due to my understanding the layout result of the nodes must be 2, 3, 4 .. but i get 4, 2, 3

Quote:

node default {
algorithm: layered
nodeLabels.placement: "INSIDE V_TOP H_CENTER"
label "Default" { layout [ size: 43, 15 ] }
node n1 {
portConstraints: FIXED_ORDER
port p1 { side: EAST index: 0 }
label "1"
}
node n4 { port p1 { side: EAST index: 0 } label "4" }
node n2 { port p1 { side: EAST index: 0 } label "2" }
node n3 { port p1 { side: EAST index: 0 } label "3" }

edge n1.p1 -> n2.p1
edge n1.p1 -> n3.p1
edge n1.p1 -> n4.p1
}


Thank you in advance.

[Updated on: Fri, 12 February 2021 03:42] by Moderator

Re: LayeredLayoutProvider: keep order of nodes [message #1842279 is a reply to message #1837951] Tue, 15 June 2021 07:14 Go to previous message
Eclipse UserFriend
Have you looked into the considerModelOrder property?

The property is designed to keep the order of the nodes and edges as they are in the model.
However, it does so only if this does not produce additional crossings.
Previous Topic:Using ELK for layout in PlantUML
Next Topic:Junctions
Goto Forum:
  


Current Time: Fri May 16 18:14:11 EDT 2025

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

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

Back to the top