Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Arrows always finding the shortest way (Read 3705 times)
IBS
Guest


Arrows always finding the shortest way
Nov 15th, 2005 at 7:21am
Print Post  
Hi,

it is possible that arrows always take the shortest way between to objects?

When I first create an arrow per drag an drop, it seems to take the shortest connection betweeen two object or the straightest.

Then, when I move e.g. the right object to the left, the arrow is still connected to the same node and it makes a huge way round itself and maybe the other. It would be better, if the arrow just flips to the other side, and takes the best connection.

I found the method RouteAllArrows(), but that doesn't really do what I want.

Is there a ready-to-use-Algorithm or do I have to implement it myself (in MouseMove event)?

Thanks for answer!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Arrows always finding the shortest way
Reply #1 - Nov 15th, 2005 at 7:34am
Print Post  
Hi,

Try setting arrow.Dynamic = true. That makes the arrow end points change their location when the nodes linked to that arrow are moved to a different position.

Stoyan
  
Back to top
 
IP Logged
 
IBS
Guest


Re: Arrows always finding the shortest way
Reply #2 - Nov 15th, 2005 at 8:21am
Print Post  
Hm, this leads to some strange behaviour (at least when using bezier or Perpendicular draw style).

I set flowChart1.DynamicArrows = true;

Sometimes the arrow is not drawn completeley, it is only a line, without pointer.
Other times the arrow ends or starts within the object, not at the edges.
This behaviour is only, when I use Perpendicular draw style.
When I use Bezier, only the target object (of the arrow) is affected. The start position of the object never changes.

And when I use Polyline style, it works quite ok.
I think I'll just use this one.

Thanks!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Arrows always finding the shortest way
Reply #3 - Nov 15th, 2005 at 8:38am
Print Post  
Hi,

Actually the dynamic arrows only update their last segments to make them go a short way from the next-to-last control points to the boxes. When the arrow is not of the polyline style having one segment, there are always more than 2 control points so the arrows won't be the shortest possible...

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