Hello,
I receive a list off nodes and links (without information about the positions) and I want to avoid overlapping of nodes and links as shown in my png. How can I do that ?
Thanks in advance.
let textLinkTemplate =
$(go.Link, // the whole link panel
{ routing: go.Link.AvoidsNodes, curve: go.Link.JumpOver }, // link route should avoid nodes
$(go.Shape, { stroke: “rgb(46, 117, 182)” }),
$(go.Shape, { toArrow: “Standard”, stroke: “rgb(46, 117, 182)” }),
$(go.TextBlock, // this is a link label
{stroke: “white”,
background: “rgb(170, 170, 170”,
width: 70,
height: 20,
verticalAlignment: go.Spot.Center,
textAlign: “center”},
new go.Binding(“text”, “text”))
);
let editedTemplate = $(go.Node, ‘Auto’,
$(go.Shape, ‘Ellipse’, {width: 100, stroke: “rgb(38, 112, 178)”, fill: “rgb(46, 117, 182)”}),
$(go.TextBlock,{cursor: “pointer”, margin: 8, editable: true, stroke: “rgb(202, 212, 221)”},
new go.Binding(‘text’).makeTwoWay()),
{
click: function(e, obj) { // @ts-ignore
window.alert("Edit diagram of " + obj.part.data.text); },
}
);