Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 14:37 Go to next message
Mehmet Karaman is currently offline Mehmet KaramanFriend
Messages: 63
Registered: November 2012
Location: Berlin
Member
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 12:17 Go to previous messageGo to next message
Ulf Rueegg is currently offline Ulf RueeggFriend
Messages: 26
Registered: February 2010
Junior Member
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 12:40 Go to previous messageGo to next message
Mehmet Karaman is currently offline Mehmet KaramanFriend
Messages: 63
Registered: November 2012
Location: Berlin
Member
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 09:45 Go to previous messageGo to next message
Mehmet Karaman is currently offline Mehmet KaramanFriend
Messages: 63
Registered: November 2012
Location: Berlin
Member
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 08:42]

Report message to a moderator

Re: LayeredLayoutProvider: keep order of nodes [message #1842279 is a reply to message #1837951] Tue, 15 June 2021 11:14 Go to previous message
Sören Domrös is currently offline Sören DomrösFriend
Messages: 13
Registered: June 2021
Junior Member
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 Apr 19 13:42:11 GMT 2024

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

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

Back to the top