The MindFusion Forums
Flow Diagramming Components >> Java Swing >> strange issue while performing drag/drop for link
https://mindfusion.eu/Forum/YaBB.pl?num=1514543707

Message started by Gaurav Dubey on Dec 29th, 2017 at 10:35am

Title: strange issue while performing drag/drop for link
Post by Gaurav Dubey on Dec 29th, 2017 at 10:35am
I am implementing drag/drop feature for links in application, however facing strange issue in that, If a link is straight i.e. no segment, link won't move in diagram and looks like freeze. However if there is at least 1 segment in link, it moves.

Following attributes have been set for link in diagram:
      diag.setAllowSplitLinks( false);
      diag.setLinkEndsMovable( true);
      diag.setLinkCrossings( LinkCrossings.Arcs);
      diag.setAllowUnconnectedLinks( false);
      diag.setAllowLinksRepeat( true);


we have set AllowSplitLinks property as false because it creates unnecessary segments and bit annoying to user.

If we make it true, then link moves at least but create new segment instead of move.

Thanks in advance.

Gaurav

Mindfusion_Drag_Issue.png ( 11 KB | 197 Downloads )

Title: Re: strange issue while performing drag/drop for link
Post by Slavcho on Jan 2nd, 2018 at 9:15am
I think you might be using an older version of the library. Current one gives higher priority to end points of a link and should pick them up for moving immediately.

Older versions hit-test by points' index order and try to grab the next-to-last point when it coincides with last to one, the former won't be able to move when in 2-segment cascading link (cascading links always have at least two segments, and if it looks like a single straight one as in the image, it means one of the segments has zero-length).

If you don't want to upgrade, create a three-segment link instead and make sure second and third points are in the middle.

Regards,
Slavcho
Mindfusion

The MindFusion Forums » Powered by YaBB 2.6.11!
YaBB Forum Software © 2000-2024. All Rights Reserved.