Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic start node position (Read 3457 times)
kirri
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 19
Joined: May 18th, 2011
start node position
May 31st, 2011 at 1:13pm
Print Post  
Hi Stoyo,
is it possible to put a start node on the top of the diagram? I am using LayeredLayout and I create the start node as the first of all nodes.
I attach an image where I circled the current position of a start node that i want to change
Code
Select All
https://docs.google.com/leaf?id=0B8vQshcp7q_QOTY1YWM4NTEtOGUxMy00MDAyLWFmNDEtOGU4MWRmMTc5OWM1&hl=en_US
 



Thanks  very much for all your help
Michal
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: start node position
Reply #1 - May 31st, 2011 at 1:37pm
Print Post  
Hi Michal,

Try running the layout with EnforceLinkFlow set to false. It assigns node layers along the longest path in the graph then, which should be the start-end path in this case. You could also try setting LayeredLayoutTraits.Layer to 0 for that node in the hashtable returned by node.getLayoutTraits().

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
kirri
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 19
Joined: May 18th, 2011
Re: start node position
Reply #2 - May 31st, 2011 at 2:08pm
Print Post  
Thanks for reply,

but I tried both methods and it did not solve the problem. Is there anything else I can try please?

Michal
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: start node position
Reply #3 - Jun 1st, 2011 at 6:17am
Print Post  
LayeredLayout.setEnforceLinkFlow(false) worked for me, the red node below corresponds to your start node and I think I have drawn exactly the same graph as the one from your image:



Also note that you must call setEnableCustomLayers(true) in order to use custom layers specified via LayoutTraits, and that custom layers can only be used when EnforceLinkFlow is set to false anyway.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
kirri
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 19
Joined: May 18th, 2011
Re: start node position
Reply #4 - Jun 1st, 2011 at 10:33am
Print Post  
it works.

Thanks very much. You always have a solution Cheesy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint