Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic arrow orientation (Read 6482 times)
iazeibak
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!
A little.

Posts: 14
Joined: Jul 27th, 2007
arrow orientation
Sep 18th, 2007 at 8:50pm
Print Post  
I would like to know what is the best way to create arrow orientation where they can route left and right while not touching each other, similar to a flowchart where they are not polyline but cascade style.

I have a list of boxes in set positions and a list of arrows telling me which box they go and come to. The problem i am having is with the orientation.

They either attach themselves to the wrong edge (crossing right over the box) or they do attach to the box but the head of the arrows disappear. I have tried many combinations of orientation but no success. I feel I may be missing something.

Thank you for a reply.
  

Jdiagram-ing,&&&&Issam
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: arrow orientation
Reply #1 - Sep 19th, 2007 at 6:28am
Print Post  
Use the FlowChart.getRoutingOptions().setsetStartOrientation() and setEndOrientation() methods to set the initial orientation of routed arrows to horizontal. Then call either the FlowChart.routeAllArrows() or the Arrow.route() method.

Routing preserves the original start and end points of the arrow, and changes only the intermediate control points positions. So before calling a routing method, you might have to set the end point coordinates. Another option is to set anchor points only at the left and right sides of boxes, so that arrows initially connect there.

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


I love YaBB 1G - SP1!
A little.

Posts: 14
Joined: Jul 27th, 2007
Re: arrow orientation
Reply #2 - Sep 20th, 2007 at 3:49pm
Print Post  
I am more concerned with the arrowheads appearing than how they connect to the boxes. Is there any way to guarantee that they will appear on the side of the box and not the middle without setting anchor points? Something like this would be fine:


  

Jdiagram-ing,&&&&Issam
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: arrow orientation
Reply #3 - Sep 20th, 2007 at 4:09pm
Print Post  
The arrows preserve their end points when routed, so you have a few options:

- if you create the arrows after placing the nodes, the arrows will choose end points similar to the ones from your screenshot
- you could set the arrow end points coordinates yourself before routing
- if you call setArrowDynamic(true), the arrows will readjust their end point positions even if you move the nodes after creating the arrows

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


I love YaBB 1G - SP1!
A little.

Posts: 14
Joined: Jul 27th, 2007
Re: arrow orientation
Reply #4 - Sep 25th, 2007 at 7:10pm
Print Post  
It still isn't working with me. Whenever I set the Jdiagram flowchart's arrows and Orientation to be cascading and set the routing so the arrows don't  go over each other, either some of the arrow heads are missing or the arrowheads dig into the box as oppoeed

Can you give me some sample code to do what is done in the screenshot?
  

Jdiagram-ing,&&&&Issam
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: arrow orientation
Reply #5 - Sep 26th, 2007 at 6:30am
Print Post  
Is that a big Box in the background of your screenshot? If so, set its Obstacle property to false, otherwise the link routing algorithm won't be able to find a path between the smaller boxes.

Stoyan
  
Back to top
 
IP Logged
 
iazeibak
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!
A little.

Posts: 14
Joined: Jul 27th, 2007
Re: arrow orientation
Reply #6 - Sep 26th, 2007 at 3:46pm
Print Post  
Ah, everything works now! I thought all of the boxes by default were set not to be obstacles.

Thank you so much!
  

Jdiagram-ing,&&&&Issam
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint