Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Regarding composite layout (Read 3849 times)
bink
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 18
Joined: Oct 28th, 2010
Regarding composite layout
Aug 9th, 2011 at 2:58am
Print Post  
Hi,

Im very interested in the composite layout because it seemed to be able to handle large diagrams.  However, I tried composite layout with LayeredLayout and it still doesn't work for us.  Could you give me some hints or examples about how to use the composite layout properly?

In our senario, we have 3 kinds of nodes: groups, steps and files.  When it loads the diagram and do the first arrange, it worked fine. But when we add about 20 files on top of it, the diagram explodes.  However, if we use flowchart layout, it worked fine.  If you have any suggestions or best practice, please let me know.

Much appreciated.

Bill
Solvexia
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Regarding composite layout
Reply #1 - Aug 9th, 2011 at 6:18am
Print Post  
What do you mean by "the diagram explodes" - does it crash or just doesn't arrange properly? Is it possible to send me the diagram in question to meppy@mindfusion.eu?

Regards,
Meppy
  
Back to top
 
IP Logged
 
bink
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 18
Joined: Oct 28th, 2010
Re: Regarding composite layout
Reply #2 - Aug 10th, 2011 at 1:50am
Print Post  
Hi Meppy,

Thanks for your response!  The diagram crash in our end and it is because we had an cycle in our code.  It is resolved now.

However, we got another issue that we have a part of code which first do an arrange() using LayeredLayout, then set position for some of the nodes.  The set position part is not working now.  I tried to set the position in Layout Progress handler when (current < total), but it still doesn't work.  Could you help me with this one please?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Regarding composite layout
Reply #3 - Aug 10th, 2011 at 5:52am
Print Post  
The LayoutProgress delegate can be used for notification purposes only. When a layout is running, modifying the position of the items in the diagram is ignored. Internally the layouts operate on a special representation of the diagram. When they complete the position of all nodes and links is automatically adjusted to match the internal representation, thus discarding any changes made to the nodes during the layout.

I hope this helps.

Regards,
Meppy
  
Back to top
 
IP Logged
 
bink
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 18
Joined: Oct 28th, 2010
Re: Regarding composite layout
Reply #4 - Aug 10th, 2011 at 6:13am
Print Post  
Thanks Meppy.  I understand why the set position doesn't work now.

Is there a way that we can adjust the node positions after the auto arrange?


Regards
Bill
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Regarding composite layout
Reply #5 - Aug 10th, 2011 at 7:51am
Print Post  
You can simply do it after the call to the layout's Arrange method.

Code
Select All
layout.Arrange(...);
// Do adjustments here 


Alternatively you can assign a delegate to the Layout.LayoutNode/Layout.LayoutLink properties. This delegate will be invoked for each node/link arranged by the layout.

I hope this helps.

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