Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Separating link arrows (Read 2334 times)
David Long
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 125
Location: England
Joined: Oct 23rd, 2006
Separating link arrows
Mar 26th, 2019 at 8:28pm
Print Post  
I am drawing a diagram where nodes represent places and link arrows represent people or agents moving from one place to another. Obviously, a person can move from point A to point B and then the same or another person can move from point B to point A. In this case, very often, the link arrows overlap. Is there an easy way I can separate the link arrows so that they are all distinct. I am using various layout methods: circular, hierarchical, one-way,topological, cascade and layered.


DavidL
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Separating link arrows
Reply #1 - Mar 27th, 2019 at 9:17am
Print Post  
LinkPadding should take care of that when using LayeredLayout with LinkType = Cascading. For other layouts with cascading links, try calling OrtogonalRouter.Arrange after the main layout. For layouts that create straight-line inclined links, try code from https://mindfusion.eu/Forum/YaBB.pl?num=1374661504/1#1 , or convert them to Bezier shapes and apply https://mindfusion.eu/Forum/YaBB.pl?num=1227111424/1#1.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
David Long
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 125
Location: England
Joined: Oct 23rd, 2006
Re: Separating link arrows
Reply #2 - Mar 27th, 2019 at 4:52pm
Print Post  
Thanks.  The solution with Bezier curves seems to work well.
DavidL
  
Back to top
 
IP Logged
 
David Long
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 125
Location: England
Joined: Oct 23rd, 2006
Re: Separating link arrows
Reply #3 - Apr 12th, 2019 at 10:10am
Print Post  
Well I thought that is worked well, but it only seems to work with an even number of links between two boxes.  I'm doing a circular layout followed by using the code from:

https://mindfusion.eu/Forum/YaBB.pl?num=1227111424/1#1

to separate the links.  I think the line...

       if (commonLinks.Count % 2 == 0)

needs to be removed.  This seems to work much better.
DavidL
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Separating link arrows
Reply #4 - Apr 12th, 2019 at 3:10pm
Print Post  
Maybe because the original code was for handling LinkCreated event where every new odd link is automatically centered between the even number of links from previous arrangements, and a new arrangement's needed only when they get even number again and last two overlapping Smiley So yes, for the general case where you arrange all links together, it's better to remove that check.

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