We have the following graph with sub-graphs. There are 3 parts
- Root graph - user cannot collapse this and contains sub-graph and Nodes
- Sub graph - User can collapse this and contains the Nodes
- Nodes - These can be inside the sub-graph or root graph
User is allowed to draw links between Nodes ONLY and we want these links to not overlap Nodes/Groups.
We are using the avoidsNodes
routing but even then the links are overlapping the nodes as per the image
Current Behavior
Expected behavior
Following is the Diagram, Node and the Link template:
$(go.Diagram, {
initialAutoScale: go.Diagram.Uniform,
layout: $(go.CircularLayout),
validCycle: go.Diagram.CycleDestinationTree,
"animationManager.isEnabled": true,
allowMove: false,
allowCopy: false,
model: $(go.GraphLinksModel, {
nodeGroupKeyProperty: "parent",
linkKeyProperty: "key",
}),
})
$(
go.Node,
"Auto",
{
padding: 0,
isShadowed: false,
shadowOffset: new go.Point(0, 2),
shadowBlur: 8,
width: 162,
click: (e, obj) => handleClick(e, obj),
deletable: false,
fromLinkable: true,
toLinkable: true,
toMaxLinks: 1,
fromMaxLinks: 1,
cursor: "pointer",
portId: "",
}
....// other stuff
)
$(
go.Link,
{
routing: go.Link.AvoidsNodes,
curve: go.Link.JumpOver,
relinkableFrom: true,
relinkableTo: true,
},
$(go.Shape),
$(go.Shape, {
toArrow: "Standard",
})
)