Hello,
I have a problem with links from one port to another. Unfortunately, they overlap and are not automatically displayed on top of each other.
It should look like this:
But that’s the way it looks at the moment:
As you can see, I use dimensioning links with the following template.
$(DimensioningLink, {
relinkableFrom: true,
relinkableTo: true,
reshapable: true,
resegmentable: true,
layerName: "Foreground"
},
new go.Binding("fromSpot", "fromSpot", go.Spot.parse),
new go.Binding("toSpot", "toSpot", go.Spot.parse),
$(go.Shape, { stroke: "black" },
new go.Binding("stroke", "color")),
$(go.Shape, { fromArrow: "BackwardOpenTriangle", segmentIndex: 2, stroke: "black" },
new go.Binding("stroke", "color")),
$(go.Shape, { toArrow: "OpenTriangle", segmentIndex: -3, stroke: "black" },
new go.Binding("stroke", "color")),
$(go.TextBlock,
{
segmentIndex: 2,
segmentFraction: 0.5,
segmentOrientation: go.Link.OrientUpright,
alignmentFocus: go.Spot.Bottom,
stroke: "black",
font: "8pt sans-serif"
},
new go.Binding("stroke", "color"),
new go.Binding("text", "desc"))
);
Also, here is the template of the group in which the links are placed.
$(go.Group, "Vertical", {
layout: $(go.LayeredDigraphLayout, { direction: 90, columnSpacing: 3}),
selectable: false
},
$(go.TextBlock, // group title
{ alignment: go.Spot.TopCenter,
font: "Bold 12pt Sans-Serif"
},
new go.Binding("text", "key")),
$(go.Panel, "Auto",
$(go.Shape, "RoundedRectangle", // surrounds the Placeholder
{ name: "BorderRectangle",
fill: "transparent" }),
new go.Binding("minSize", "size", go.Size.parse).makeTwoWay(go.Size.stringify),
$(go.Placeholder, // represents the area of all member parts,
{ padding: new go.Margin(30, 5, 5, 3)}) // with some extra padding around them
)
);