Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Need to show specfic node at specfic place (Read 1599 times)
Shafi
Full Member
***
Offline


I Love MindFusion!

Posts: 109
Joined: Nov 8th, 2016
Need to show specfic node at specfic place
Nov 8th, 2017 at 11:12am
Print Post  
Hi

I have requirement that i need to show some specific order. for example

we have 5 different nodes let say 1 2 3 4 5

After applying layered layout. I need to show it like node 3 will be first shown

like

3 -> 2->1->4->5

How can we achieve this can you please let me know?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Need to show specfic node at specfic place
Reply #1 - Nov 8th, 2017 at 11:29am
Print Post  
Hi,

LayeredLayout assigns layers according to link direction. If node 3 has only outgoing links, it should be placed on first layer.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Shafi
Full Member
***
Offline


I Love MindFusion!

Posts: 109
Joined: Nov 8th, 2016
Re: Need to show specfic node at specfic place
Reply #2 - Nov 8th, 2017 at 11:40am
Print Post  
Is  there any other layout  which will be helpful this kind of requirement. Or what should i do achieve this kind of functionality.

As this not the hard and fast rule for me that node 3 is having only out-going links only.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Need to show specfic node at specfic place
Reply #3 - Nov 8th, 2017 at 1:20pm
Print Post  
If you just need to arrange nodes in a row disregarding their links, you could loop over them in the order you need and set their Bounds calculated from current counter value. Something like -

Code
Select All
for (var i = 0; i < ...)
    nodes[i].setBounds(new Rect(i * 60, 20, 40, 30));
 



Regards,
Slavcho
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint