Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Restrict movements of shape node (Read 2302 times)
Gautham
YaBB Newbies
*
Offline



Posts: 3
Joined: Apr 26th, 2012
Restrict movements of shape node
May 15th, 2012 at 12:50pm
Print Post  
How do i restrict the movements of shape node, so that it cant be moved off the screen or within keep the movement within visual bounds
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Restrict movements of shape node
Reply #1 - May 15th, 2012 at 5:56pm
Print Post  
You could handle the NodeModifying event like this:

Code
Select All
if (!diagram.Bounds.Contains(e.Node.Bounds))
    e.Cancel = true;
 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint