Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic PathFinder (cycles) (Read 2976 times)
daniVerz
YaBB Newbies
*
Offline



Posts: 8
Joined: May 20th, 2008
PathFinder (cycles)
May 20th, 2008 at 8:01pm
Print Post  
I'm trying to avoid cycles in my ASP.NET/Javascript page.

I read the documentation and looked up the sample code, but did not find a way.

How can I use PathFinder in Javascript or avoid cyclic box references?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: PathFinder (cycles)
Reply #1 - May 21st, 2008 at 9:40am
Print Post  
We'll have to add a new method to ScriptHelper to let you create a PathFinder. Are you using Netdiagram V1.0.4 or the version 2 beta?

Stoyan
  
Back to top
 
IP Logged
 
daniVerz
YaBB Newbies
*
Offline



Posts: 8
Joined: May 20th, 2008
Re: PathFinder (cycles)
Reply #2 - May 21st, 2008 at 11:34am
Print Post  
I'm using v.1.0.4. At least I was looking for it in the right place...  Smiley

If you permit the suggestion, I would put the method in com.mindfusion.jdiagram.FlowChartApplet, like the getFlowChart() method, once both classes are under the same namespace.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: PathFinder (cycles)
Reply #3 - May 21st, 2008 at 3:08pm
Print Post  
Click on the link at the top of this page to get to the private messages page. There you will find an updated jdiagram.jar that adds a createPathFinder method. Thanks for the suggestion, but for consistency the new method will stay in ScriptHelper for now 8)

Now you can handle the ArrowModifying and ArrowCreating events, and use PathFinder together with FlowChart.getBoxAt() to find out whether there is a path from the would-be-destination to the origin. That would lead to a cycle if the arrow is created / modified at that location, so you return false from the handler.

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



Posts: 8
Joined: May 20th, 2008
Re: PathFinder (cycles)
Reply #4 - May 21st, 2008 at 5:09pm
Print Post  
Wow! Thanks!  Shocked
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint