Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Force links to be outside the node (Read 3794 times)
vtortola
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 104
Joined: Nov 26th, 2008
Force links to be outside the node
Mar 18th, 2009 at 4:57pm
Print Post  
Hi,

I don't know why, but sometimes the links appear with the ends inside the nodes, is there a way to avoid this and force them to be outside? and a way to force them to be inside the diagram?

It's when I create a new one, is not related with the serialization.  It happens randomly.

Besides, sometimes the links have a stretch outside the diagram limits, so it's impossible to modify it. I must move the nodes to make the link appear fully inside the diagram, and only then I can modify it.

Cheers.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Force links to be outside the node
Reply #1 - Mar 18th, 2009 at 6:34pm
Print Post  
Hi,

I think the link ends are inside the nodes if the nodes overlap at the time when you call CreateDiagramLink. Try setting link.Dynamic = true and the link end points should update once you move the nodes.

Cheers.
  
Back to top
 
IP Logged
 
vtortola
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 104
Joined: Nov 26th, 2008
Re: Force links to be outside the node
Reply #2 - Mar 19th, 2009 at 3:08pm
Print Post  
Humm... with that option the links go a little bit wild...

First of all, the issue still happens, the links ends appears inside the nodes sometimes, but in the moment you move the node the links move to the outside, so I think is ok, but would be nice have a way to do it automatically.

But besides, when you use that option the links only anchor in the lateral sides of the nodes. You can manually anchor in the top or the bottom of the node, but as soon you move the node the links go to the lateral sides. Doesn't matter how the nodes are placed. So I can't afford this behavior, is there another way to force the links to be outside the node or do you know another workaround?

Would be nice if there was an option that automatically move the links ends to find the shortest path between two nodes.

Cheers.
  
Back to top
 
IP Logged
 
Paul Eden
Full Member
***
Offline



Posts: 128
Joined: Aug 15th, 2007
Re: Force links to be outside the node
Reply #3 - Mar 19th, 2009 at 3:20pm
Print Post  
On the version we are currently running, the links will switch between outer edge and centerpoint once the nodes being joined are too close, even with Link.Dynamic - draging a node away will make the link jump to the outer edge. Related to a minimum length of a link?

There are values you can change that dictate pathing rules / allowances - off the top of my head I cant remember what they are, but there is a demo app dedicated to them from Mindfision.
  
Back to top
WWW  
IP Logged
 
vtortola
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 104
Joined: Nov 26th, 2008
Re: Force links to be outside the node
Reply #4 - Mar 19th, 2009 at 3:50pm
Print Post  
When AutoRoute is setted, even when the nodes are to close, even overlapped, the link never switches to the center point. When AutoRoute is false then switches to the center if are too close.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Force links to be outside the node
Reply #5 - Mar 19th, 2009 at 6:56pm
Print Post  
so, is it ok now, or you need to find a solution without AutoRoute? You could try it with link.SnapToNodeBorder; I'm not sure it will force the links to align to the border when they re created from code though...
  
Back to top
 
IP Logged
 
vtortola
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 104
Joined: Nov 26th, 2008
Re: Force links to be outside the node
Reply #6 - Mar 20th, 2009 at 11:26am
Print Post  
hehe, actually no because the behavior of "Dynamic" make the links a little bit wild.

I'm already using SnapToBorders.

Dynamic + Autoroute works fine with the center point links, but the links are unabe to move to the up or bottom borders.

As I said before, the best would be an option where the links automatically change their ends to be as small as possible. I mean, if you put a link between two nodes, the link try to find the two points where the distance between nodes is minimum and use them as anchors, then every time you move the node the link automatically moves to the optimal position.  Take that as "wish" Cheesy

Cheers.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint