Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to split Link to segments interactively (Read 1208 times)
GoldyWang
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 34
Joined: May 7th, 2012
How to split Link to segments interactively
May 12th, 2012 at 8:25am
Print Post  
How to split Link to segments interactively.
and
How to do it in code.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to split Link to segments interactively
Reply #1 - May 13th, 2012 at 5:37pm
Print Post  
If you set AllowSplitLinks = true, you should be able to split a link by selecting it and dragging any point along its segment to insert a new point. This does not work for Bezier links at this time.

Adding new segments can be done by inserting new points into link.ControlPoints. E.g. this divides the first link's segment at the mouse-click position:

Code
Select All
private void diagram_LinkDoubleClicked(object sender, MindFusion.Diagramming.LinkEventArgs e)
{
	e.Link.ControlPoints.Insert(1, e.MousePosition);
	e.Link.UpdateFromPoints(false, true);
} 



You will have to add more points per segment for cascading and Bezier links to keep their shape consistent.

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