Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Snap to grid (Read 2725 times)
matt.s
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 56
Joined: Apr 3rd, 2008
Snap to grid
Sep 16th, 2010 at 4:33pm
Print Post  
Hi,

Is it possible to get nodes to always snap to the grid?

Currently I have a grid showing, and when I move nodes around they snap to the grid fine.

However, if I create a node programmatically at a specific point (for example, where the mouse cursor is), I don't seem to be able to create the node and then tell it to snap to the grid.

Is there a way to do this?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Snap to grid
Reply #1 - Sep 16th, 2010 at 5:18pm
Print Post  
Hi,

Use the AlignPointToGrid method to find out the grid point closest to your point, and then create the node there.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
matt.s
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 56
Joined: Apr 3rd, 2008
Re: Snap to grid
Reply #2 - Sep 17th, 2010 at 10:46am
Print Post  
Yes that works fine.

Thanks!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint