Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic JDiagram Link Issue (Read 7255 times)
Jasef
YaBB Newbies
*
Offline



Posts: 26
Joined: Jul 17th, 2011
JDiagram Link Issue
Jul 5th, 2013 at 3:15am
Print Post  
Hi,

I'm getting an issue when dragging a cascading DiagramLink's control point too close to the end control point will break the DiagramLink and causes the DiagramLink to become disjoint from one of it's end points. The TableNodes are positioned such that one is above the other so that the two end control points of the DiagramLink between the TableNodes is exactly (however has been reproduced without being exact) vertical (same x-coordinate) of each other.

I've attached some sample code that you can use to reproduce it and an image to display what/how to reproduce it.
In image.
1) Select a DiagramLink. Select the control point as highlighted by red circle.
2) Move the control point horizontally to the end point on TableNode as highlighted by red circle. May require a circular motion around the end point if it doesn't display as in image.
3) Move control point away from end point and you should see that the DiagramLink has been broken.

From inspection of the control points. ( DiagramLink.getControlPoints() )
The list returns 4 points where either the 2nd or 3rd (depending on which control point you didn't move) will have a y-coordinate of value NaN.
  

DiagramTester.rar (Attachment deleted)
Step1_001.png (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: JDiagram Link Issue
Reply #1 - Jul 5th, 2013 at 12:50pm
Print Post  
Hi,

Apparently there's some problem with the Orientation.Auto code when it tries to change the segments orientation to vertical. Our developer will debug this next week. For the time being you could set diagram.setLinkCascadeOrientation(Orientation.Horizontal) to avoid that; you probably want the links starting horizontal anyway when connecting to table rows.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Jasef
YaBB Newbies
*
Offline



Posts: 26
Joined: Jul 17th, 2011
Re: JDiagram Link Issue
Reply #2 - Jul 8th, 2013 at 10:24pm
Print Post  
Hi,

Alright, cool. Yeah, that solution works for one scenario. I switch between table rows and not table rows for our diagrams, so that is the reason for the Orientation.Auto and would be required in the latter scenario. Can manage for a while given the specific case to reproduce this bug.


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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: JDiagram Link Issue
Reply #3 - Jul 14th, 2013 at 10:07am
Print Post  
Hi,

In DiagramLink.java find the "if (getParent().getAllowSplitLinks())" line, and then change its corresponding "else" to "else if (dX != 0 && dY != 0)". That's on line 1205 in our current code.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Jasef
YaBB Newbies
*
Offline



Posts: 26
Joined: Jul 17th, 2011
Re: JDiagram Link Issue
Reply #4 - Jul 16th, 2013 at 11:56pm
Print Post  
That definitely works!

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