Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic link overlapping to node on dragging link segment? (Read 3388 times)
jay
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 59
Joined: Feb 4th, 2009
link overlapping to node on dragging link segment?
Feb 11th, 2009 at 6:17am
Print Post  
Hi,

   I have set link properties like,
(((DiagramLink)e.getLink()).setAllowMoveEnd(true);
((DiagramLink)e.getLink()).setAllowMoveStart(true);
((DiagramLink)e.getLink()).setAutoRoute(true);
((DiagramLink)e.getLink()).setSnapToNodeBorder(true);


But when a link is dragged and supposse there is node in between, then it overlaps that node. some time dragging a segment of a link can also passes through its source or target node i.e. overlaps.  In such cases can't it rotate or adjust itself around that item it is overlapping.

Thank you.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: link overlapping to node on dragging link segm
Reply #1 - Feb 11th, 2009 at 9:31am
Print Post  
Isn't the link re-routed once you drop it, or you want it routed while it is still being dragged?
  
Back to top
 
IP Logged
 
jay
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 59
Joined: Feb 4th, 2009
Re: link overlapping to node on dragging link segm
Reply #2 - Feb 11th, 2009 at 9:50am
Print Post  
Hi,

   It re-routes if i am creating/ dragging a new link from source to destination.
   But my problem is that, if there is already a link present between any node pair. Now if i select this link and drag it from any selection point, so the segment will move, during this if a segment of that link overlaps any node and i stop draging that link segment will remain there overlaping that node without re-reroute.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: link overlapping to node on dragging link segm
Reply #3 - Feb 11th, 2009 at 10:32am
Print Post  
Hi,

If you mean dragging any of the intermediate link points, the control interprets this as the user wanting to refine the link shape set by the routing algorithm, and does not re-route it. You could call the route() method from the LinkModified event if you need that. If you don't want to let users modify the link at all, call link.setLocked(true), or handle the linkModifying event and cancel the modification from there.

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


I love YaBB 1G - SP1!

Posts: 59
Joined: Feb 4th, 2009
Re: link overlapping to node on dragging link segm
Reply #4 - Feb 11th, 2009 at 10:48am
Print Post  
Hi stoyan,

     That is what exactly I was looking for. rout() in linkModified even worked for me.

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