Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Cascading link orientation doesn't behave the way I want it to. (Read 2290 times)
David Cater
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 12
Joined: May 12th, 2012
Cascading link orientation doesn't behave the way I want it to.
Jun 12th, 2012 at 11:31pm
Print Post  
I am having trouble getting my links to orient properly. In the attached picture, I'm trying to drag a link from the bottom of the rectangle on the left (outgoing) into the left side of the trapezoid (incoming). I want the outgoing link to be vertical, and the incoming link to be horizontal.

Here is the code that sets up the anchor pattern for the rectangle:

AnchorPattern = new AnchorPattern {
Points = new AnchorPointCollection(new AnchorPoint[] {
Point(50, 0, Orientation.Vertical, true, true),
Point(0, 50, Orientation.Horizontal, true, true),
Point(100, 50, Orientation.Horizontal, true, true),
Point(50, 100, Orientation.Vertical, true, true),
Point(0, 25, Orientation.Horizontal, true, false),
Point(0, 75, Orientation.Horizontal, true, false) })};


Here is the code that sets up the anchor pattern for the trapezoid:

AnchorPattern = new AnchorPattern {
Points = new AnchorPointCollection(new AnchorPoint[] {
Point(0, 25, Orientation.Horizontal, true, false),
Point(0, 50, Orientation.Horizontal, true, false),
Point(0, 75, Orientation.Horizontal, true, false),
Point(100, 50, Orientation.Horizontal, false, true) })};


Here are some related settings on my diagram:

diagram.LinkCrossings = LinkCrossings.Arcs;
diagram.LinkShape = LinkShape.Cascading;
diagram.LinkRouter = new GridRouter();
diagram.AllowSplitLinks = true;
diagram.Behavior = Behavior.DrawLinks;

Attachment 1 is what the link looks like when I try to drag from the 50,100 point on the rectangle (marked as Vertical) to the 0,50 point on the trapezoid (marked as Horizontal).

I want the link to start vertical and end horizontal, and the opposite is happening. I can then force the link to look like I want, but it takes some work. Any idea how I can make this behave correctly?


  

Diagram.PNG ( 123 KB | 209 Downloads )
Diagram.PNG
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Cascading link orientation doesn't behave the way I want it to.
Reply #1 - Jun 13th, 2012 at 7:05am
Print Post  
Is the AutoRoute property enabled for this link, or are you calling its Route() method at any point? That should orient the segments away from the node borders. Otherwise I think the control sets some default cascading shape with the specified number of link segments without considering the node locations.
  
Back to top
 
IP Logged
 
David Cater
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 12
Joined: May 12th, 2012
Re: Cascading link orientation doesn't behave the way I want it to.
Reply #2 - Jun 14th, 2012 at 1:55pm
Print Post  
Ah...calling Route definitely helps.  It's not perfect, but it's definitely better.  See the attachment.  I suppose at this point I may be able to tweak the routing using the route cost options.  Thanks!
  

Diagram_001.PNG (Attachment deleted)
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint