Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Layout and Node Positions... (Read 1663 times)
shesh
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Apr 21st, 2009
Layout and Node Positions...
May 12th, 2009 at 3:40pm
Print Post  
I have  a few ContainerNodes in my Diagram. These ContainerNodes inturn contain a few shape nodes. If I add shape nodes to the container nodes without incrementing the position information, all the nodes are stacked on top of each other in the container.
Initially the diagram will not conatin any links and user will be adding links manually.
Is there a layout that will lay out the Diagram recursively so that all the shape nodes will be neatly laid out horizontally within the container and the container nodes will be laid out vertically one above the other?

Thanks.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layout and Node Positions...
Reply #1 - May 12th, 2009 at 6:17pm
Print Post  
Try using the Arrange(Diagram, DiagramItemCollection) method of any layout class that has MultipleGraphsOrientation property. For each container, add its children to a DiagramItemCollection, set that property to Horizontal and call Arrange. Finally add the containers to such collection, set the property to Vertical and call Arrange again.

Though running a simple nested loop on containers and their children might be easier; the outher loops moving the containers vertically, and the inner loop moving their children horizontally.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint