Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Prevent node overlapping (Read 1867 times)
oOAnriOo
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 19
Joined: Oct 12th, 2009
Prevent node overlapping
Nov 26th, 2009 at 8:29am
Print Post  
I'm working on a project where the user can place nodes as he pleases.

The only restriction I want is that i don't want any nodes to overlap.

Is there any way i can use a layout to move ONLY nodes overlapping other nodes (and just move them to the next "clear" spot) or can I do it using code somehow?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Prevent node overlapping
Reply #1 - Nov 26th, 2009 at 9:53am
Print Post  
Try running a few iterations of SpringLayout, possibly with SpringLayoutTraits.Frozen set to true for all other nodes except the new one.

If that doesn't work, we could add a method that finds some unoccupied space for a node using the obstacle map built by the link routing algorithm.

Stoyan
  
Back to top
 
IP Logged
 
TimNZ
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
Re: Prevent node overlapping
Reply #2 - Nov 29th, 2009 at 10:44pm
Print Post  
Yes please!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint