Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Arrange Links (Read 1063 times)
KillaChris
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 18
Joined: Apr 25th, 2012
Arrange Links
Mar 14th, 2013 at 2:13pm
Print Post  
Hello

i added a Screenshot as attachment. As you can see on the Screenshot I'm using a SwimLaneLayout.
There is one important Node. That node in the middle with the red Corner.
All links that point to other nodes are starting from this node.
And all links that are starting from other nodes end in this node.
Now as you can see the links are somehow confusing.

It would be nice if the links could look like on Screenshot2 (I changed that with a graphic programm).

Is there somehow a possibility to manage this?
  

Screenshot.png (Attachment deleted)
Screenshot2.png (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Arrange Links
Reply #1 - Mar 14th, 2013 at 2:40pm
Print Post  
Set the following points for each link, where top is the vertical position of long segments:

Code
Select All
var off = 5;
var or = link.Origin.Bounds;
var dr = link.Destination.Bounds;
var top = 10;

SetLinkPoints(link,
	new PointF(or.Left, or.Y + or.Height / 2),
	new PointF(or.Left - off, or.Y + or.Height / 2),
	new PointF(or.Left - off, top),
	new PointF(dr.Right + off, top),
	new PointF(dr.Right + off, dr.Y + dr.Height / 2),
	new PointF(dr.Right, dr.Y + dr.Height / 2));

void SetLinkPoints(DiagramLink link, params PointF[] points)
{
	link.AutoRoute = false;
	link.Shape = LinkShape.Cascading;
	link.ControlPoints.Clear();
	link.ControlPoints.AddRange(points);
	link.UpdateFromPoints(false, true);
} 




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