Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Box overlaps after applying a Layout (Read 1747 times)
Paul_Elliott
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 4
Joined: Sep 13th, 2006
Box overlaps after applying a Layout
Sep 14th, 2006 at 6:59am
Print Post  
Hi,

Is there a way to prevent boxes from overlapping each other after applying one of the layouts?  The Grid and Spring layouts in particular tend to position boxes so close together at times that they overlap, which looks ugly.

All the boxes are flagged as obstacles, but this doesn't stop them colliding.

I suppose I could increase the distance properties of the layouts to force the boxes further apart, but is there another way?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Box overlaps after applying a Layout
Reply #1 - Sep 14th, 2006 at 7:28am
Print Post  
Hi,

The Obstacle property is used only by the arrow routing algorithm.

You can set a GridLayout.GridSize larger than any of your nodes to avoid them overlapping. The SpringLayout runs some physical simulation and we really don't have much control at what position a node would end up.

You could use the NodesIntersect method to find if there are some intersecting nodes, and if there are, move them further one from the other using the MoveTo method.

Stoyan
  
Back to top
 
IP Logged
 
Paul_Elliott
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 4
Joined: Sep 13th, 2006
Re: Box overlaps after applying a Layout
Reply #2 - Sep 14th, 2006 at 6:46pm
Print Post  
Ok, thanks.

It would be a useful feature in a future version of your control to prevent box collisions during a layout.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint