In this particular case showed in image, is there any way to help link calculation in a way so it always takes shortest path between nodes.
I assume you have Link.routing set to
What’s happening is that the “Conference Call in Voting Week?” node is too close to the “Wait until Monday, 9 Am” node, so it thinks there is no route that avoids all other nodes unless it tunnels through the “Wait…” node.
If you move the “Conference…” node a bit to the left or the “Wait…” node a bit to the right, the route should be as short as you can imagine.
You can see the area occupied by the nodes better if you (temporarily) set the Node.background to be “lightgray” or some other obvious color on both of those nodes.
Moving “Wait…” node don’t do any difference. But moving “Conference…” node it does. It does in both directions that route is as short as is possible. First picture shows when “Conference…” node is moved to be more closer to “Wait…” node, while second one when I moved this node to the left.
According to your answer I conclude that there is no any link parameter I could change in such situations that will cause different behavior of link in similar situations. This is default state when I load existing BPMN diagram and use elements sizes and positions as provided in original BPMN file. But if you look at first picture link that going to node “Delay 13 days” has also unnecessary curves that I want to avoid too.
And yes, Link.routing is set to go.Link.AvoidNodes.
Perhaps you didn’t move the “Wait…” node far enough to the right for there to be room to route the link without crossing the actualBounds of that “Wait…” node.
In your second screenshot the link has three turns in order to avoid crossing over the “Wait…” node. A route that has only one turn would cross over the “Wait…” node.
Unless you don’t mind links passing through the text? If that’s the case, on those node templates you could set Node.avoidableMargin to something like
new go.Margin(2, 2, -20, 2) or something like that. I’m just guessing about the bottom margin.
In version 1.7 I believe AvoidsNodes routing will be more likely to take a shorter route in the original situation that you showed.
Is there any 1.7 beta version I can try and see how could all of this look like?
There have been a few alpha releases, but we haven’t built one since yesterday. Beta should start within a few weeks.