this is my diagram and i want my node should have one port outgoing source of link
there is one incoming link towards the group after that if we expand the group then link should distribute on specific node. In my case links are distributed already before the group expand.
const myDiagram = new go.Diagram(“myDiagramDiv1”,
{
padding: 20, // extra space when scrolled all the way
“draggingTool.isGridSnapEnabled”: true,
handlesDragDropForTopLevelParts: true,
initialAutoScale: go.Diagram.Uniform,
layout: $(go.CircularLayout, {spacing:150, isInitial: true, isOngoing: true}),
“undoManager.isEnabled”: true,
“SelectionGrouped”: e => {
const grp = e.subject;
const b = e.diagram.computePartsBounds(grp.memberParts);
grp.location = b.center;
grp.findExternalLinksConnected().each(l => l.invalidateRoute());
},
});
myDiagram.linkTemplate =
$(go.Link,
{
layerName: "Foreground",
routing: go.Link.AvoidsNodes,
corner: 10,
fromShortLength: 0,
toShortLength: 10,
relinkableFrom: false,
relinkableTo: false,
reshapable: false,
resegmentable: true,
curve: go.Link.JumpGap
},
$(go.Shape, { strokeWidth: 2 },
new go.Binding("stroke", "color"),
new go.Binding("strokeWidth", "thickness"),
new go.Binding("strokeDashArray", "dash")),
$(go.Shape,
{ segmentIndex: -1,
segmentOffset: new go.Point(-5, 6),
segmentOrientation: go.Link.OrientPlus90,
alignmentFocus: go.Spot.Right,
figure: "triangle",
width: 12,
height: 12,
strokeWidth: 0
},
new go.Binding("fill", "color"),
),
);