Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Disable moving of diagramnodse to a certain direction (Read 2033 times)
tjugg
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 12
Joined: Oct 20th, 2017
Disable moving of diagramnodse to a certain direction
Jan 16th, 2018 at 6:42am
Print Post  
Hi,
I have a situation where I select multiple DiagramNodes by dragging, and move them all to another position.
Problem is, if I drag them to the edge of the canvas, the nodes will go on top of each other, following the mouse
movement over the canvas. Is there any way to
completely disable moving of a node? Something like checking if the nodes bounds are close to the bounds of the canvas,
disable moving of all selected nodes to that direction (node is close to the right left border, now only allow to move the group to the right)?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Disable moving of diagramnodse to a certain direction
Reply #1 - Jan 16th, 2018 at 9:24am
Print Post  
Hi,

This when using the KeepInsideDiagram flag? We'll try implementing a similar property for the Selection object, so it stops when selection's bounding rectangle touches diagram's edges.

It could be also possible to stop movement by implementing a custom Behavior class. E.g. defer to base in most cases but do not call base.OnMouseMove if you detect original selection bounds + mouse position offset would move beyond diagram edges.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
tjugg
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 12
Joined: Oct 20th, 2017
Re: Disable moving of diagramnodse to a certain direction
Reply #2 - Jan 19th, 2018 at 11:20am
Print Post  
Hi, yes it's when using the KeepInsideDiagram flag.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Disable moving of diagramnodse to a certain direction
Reply #3 - Feb 26th, 2018 at 9:33am
Print Post  
Hi,

This build adds Selection.KeepInsideDiagram property-
https://mindfusion.eu/_beta/wpfdiag353.zip

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint