Link is going through some other route and how to handle opacity changed links

Hi,

I am facing 2 issues with the links.
attaching the screenshot for better understanding.

image

  1. When the auto layout(LayeredDiagraph) occurs it shows link going above and then coming back for no reason when it can go straight from Node to Node.

  2. I want to hide all the links when the diagram loads, depending on the user clicks the Node, the connected links should be visible. I have used opacity property to control this, since if I use visible property then it ignores the positioning of nodes during the initial layout. Now because I have controlled it through opacity sometime when I click somewhere it highlights node as shown in the image as highlighted in yellow.

Can you please suggest a way to handle the above-mentioned issues?

Thanks.

Use go.Link.Orthogonal routing, not AvoidsNodes routing. The LayeredDigraphLayout will route the links to avoid the nodes.

Try setting pickable to false as well as opacity to zero.

1 Like

Thanks, it worked.