Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Unconnected arrows (Read 2983 times)
koosala
Full Member
***
Offline


Java Happens

Posts: 136
Joined: May 13th, 2007
Unconnected arrows
Jun 24th, 2008 at 9:20am
Print Post  
Hi,

I am still on Version 1.03 - 1. 04 of NetDiagram. I have two questions here:

1. In an earlier thread,

http://mindfusion.eu/Forum/YaBB.pl?board=netdg_disc;action=display;num=1205902864;start=

you had suggested ways to improve arrow routing which  needed change in Jdiagram source. I received a mail about 2.0 being released. In the 2.0 source code, I see that the arrow routing happens as before and doesn't include the change from that thread.

Will this arrow routing change be added to a later version of 2.0?

Also,

2. With the changes I did according to the above mentioned thread, I see that the feature of creating unconnected arrows:

[code]
flowChart.setAllowUnconnectedArrows(true);
[/code]

is broken. On creating an unconnected arrow, the arrow starts from the left most part of the screen.

Some way I can fix this?

Thanks,
Praveen
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Unconnected arrows
Reply #1 - Jun 25th, 2008 at 8:57am
Print Post  
Hi,

All changes I can see in that thread have been implemented in Netdiagram 2. What exactly are you referring to?

These are the properties you need enabled to have the links routed as you expect them -

diag.setLinkStyle(LinkStyle.Cascading);
diag.getRoutingOptions().setTriggerRerouting(RerouteLinks.WhileCreating);
diag.setLinksSnapToBorders(true);
diag.setRouteLinks(true);

Stoyan
  
Back to top
 
IP Logged
 
koosala
Full Member
***
Offline


Java Happens

Posts: 136
Joined: May 13th, 2007
Re: Unconnected arrows
Reply #2 - Jun 25th, 2008 at 9:52am
Print Post  
Oh cool. Thanks for that. I had missed out:

[code]
diag.setRouteLinks(true);
[/code]

and done:

[code]
flowChart.setSnapToAnchor(SnapToAnchor.OnCreateOrModify);
[/code]

instead.

ok, that works for me.


Only, I have the other problem showing up now, where unconnected arrow starts from the left side of the diagram. Do you see that problem too?

Thanks,
Praveen
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Unconnected arrows
Reply #3 - Jun 25th, 2008 at 11:21am
Print Post  
Yes, I can see that in version 2 too. We'll fix it as soon as possible.

Stoyan
  
Back to top
 
IP Logged
 
koosala
Full Member
***
Offline


Java Happens

Posts: 136
Joined: May 13th, 2007
Re: Unconnected arrows
Reply #4 - Jul 4th, 2008 at 1:24am
Print Post  
Hi Stoyan,

Will this fix be for version 2.0, or can it be for version 1.03 even?

If you cannot do it for 1.03, and if it isn't a major change, maybe you can list it out for me and I apply it myself? I am still migrating my code to your 2.0.

Also, can it be done anytime soon?

Thanks,
Praveen
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Unconnected arrows
Reply #5 - Jul 4th, 2008 at 4:43am
Print Post  
Hi Praveen,

We've fixed that and we'll release it with v2.0.1 soon. In whatever version you are using, find the following comment in the startCreate method

// align to the nearest point of the node border if specified,

and replace the line below it -

if (snapToNodeBorder)

with

if (snapToNodeBorder && !(orgNode instanceof DummyNode))

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint