Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Spacing between links (Read 4423 times)
tzippy
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 77
Joined: Jan 11th, 2009
Spacing between links
Feb 25th, 2009 at 9:42am
Print Post  
Hi,
In my diagram there are some links between the same nodes, But it looks like one link.
How can I define the links to be with space between each other?
Thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Spacing between links
Reply #1 - Feb 25th, 2009 at 11:09am
Print Post  
Hi,

Check the code from this post:
http://mindfusion.eu/Forum/YaBB.pl?board=fcnet_disc;action=display;num=122711142...

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
tzippy
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 77
Joined: Jan 11th, 2009
Re: Spacing between links
Reply #2 - Feb 25th, 2009 at 1:23pm
Print Post  
What si the type of 'PointF' there, MindFusion.Graphs or System.Drawing?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Spacing between links
Reply #3 - Feb 25th, 2009 at 1:26pm
Print Post  
You should use System.Windows.Point for the WPF control.
  
Back to top
 
IP Logged
 
tzippy
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 77
Joined: Jan 11th, 2009
Re: Spacing between links
Reply #4 - Feb 25th, 2009 at 2:33pm
Print Post  
Is there a way to do that, but not with rounded links?
  
Back to top
 
IP Logged
 
tzippy
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 77
Joined: Jan 11th, 2009
Re: Spacing between links
Reply #5 - Feb 26th, 2009 at 9:23am
Print Post  
addition:
I need 2 links between the same nodes, no more.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Spacing between links
Reply #6 - Feb 26th, 2009 at 10:25am
Print Post  
If the pair of links are connected to the left or right sides of a node, set their ControlPoints apart by a few pixels vertically - loop over the points and subtract from the Y coordinates of the first link and add to the Y coordinates of the second link. If the links are connected to the top or bottom sides of a node, offset them horizontally in a similar way.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
tzippy
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 77
Joined: Jan 11th, 2009
Re: Spacing between links
Reply #7 - Feb 26th, 2009 at 10:46am
Print Post  
Hi,
I'm very surprise to see that there is no a property to define spacing between the links.
I think it is a very base property for diagram control.
Sad Sad Sad
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Spacing between links
Reply #8 - Feb 26th, 2009 at 11:07am
Print Post  
Gee guys, you are expecting this control to do everything for you and you only build some user interface around it. Try the OrthogonalRouter class - it sets the links apart, but has the side effect of setting their style to cascading.

Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Spacing between links
Reply #9 - Feb 26th, 2009 at 11:11am
Print Post  
You could also set the AnchorPattern of nodes, handle the ValidateAnchorPoint event, and disallow attaching more than one link to the same anchor point.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint