AvoidsNodes routing - make it always go over the nodes

Hi,

I am adding multiple spouses capability into my pedigree editor that is based on Genogram. One thing I noticed is that if I set the routing to go.Link.AvoidsNodes, some of the line underneath the avoided nodes. Is there a way to restrict this? Making the line always go over the nodes instead of underneath?

Thanks.

Because you are using “…Side” Spots for the fromSpot and toSpot, causing the link connection points to be spread out along the sides of the nodes, some of the links will connect below the vertical middle of the node. Because the AvoidsNodes routing looks for a shortest path, the route will go below the middle.

I suggest that you use port spots that are go.Spot.LeftRightSides and set the Node.portSpreading to go.Node.SpreadingNone. The presence of the text label below the port should guide the link routes above other nodes in the same layer.

Awesome, it works. Thanks.