Hi, I have a setup that ends up looking like this and I can’t quite figure out why:
The link properties:
$go(go.Link,
{
routing: go.Routing.AvoidsNodes,
curve: go.Curve.JumpOver,
corner: 10,
reshapable: true,
// resegmentable: true,
relinkableFrom: true, relinkableTo: true,
fromEndSegmentLength: 20,
toEndSegmentLength: 20,
toolTip: linkToolTiptemplate,
contextMenu: linkMenu,
layerName: "LinkLayer"
},
...
)
The node properties:
$go(go.Node, "Spot",
{
toolTip: tooltiptemplate,
locationObjectName: "BODY",
locationSpot: go.Spot.Center,
selectionAdorned: true,
selectionObjectName: "BODY",
toolTip: tooltiptemplate,
shadowBlur: 20,
isShadowed: true,
selectionAdorned: true, // use a Binding on the Shape.stroke to show selection
contextMenu: activityNodeMenu,
resizable: false,
resizeObjectName: "SHAPE",
},
...
)
The nodes have ports defined like this on all sides (this is the right-hand side one)
$go(go.Shape, "Circle",
{
desiredSize: new go.Size(1, 20),
fromLinkable: true, toLinkable: true, cursor: "pointer",
fromLinkableDuplicates: true, toLinkableDuplicates: true,
portId: "rightPort", fromSpot: go.Spot.RightSide, toSpot: go.Spot.RightSide,
alignment: go.Spot.RightCenter,
margin: new go.Margin(0, 0, 0, 0),
opacity: 0
}
),
I also use AvoidsLinksRouter without any parameters and LayeredDigraphLayout with these parameters
new go.LayeredDigraphLayout({
setsPortSpots: false,
direction: direction,
layerSpacing: layerSpacing,
columnSpacing: columnSpacing,
// layeringOption: go.LayeredDigraphLayout.LayerOptimalLinkLength, // the default
aggressiveOption: go.LayeredDigraphAggressive.More,
alignOption: go.LayeredDigraphAlign.All,
// initializeOption: go.LayeredDigraphLayout.InitDepthFirstOut // the default,
iterations: 10
})
Triggering a relayout repetedly, it sometimes ends up looking like this instead, which is also a bit weird.
I suspect that it is something to do with the fact that the nodes have these invisible panels which show up on hover - but I am not sure how to go about fixing the link issue
Any help is appreciated