I created a node which consists of text blocks and a picture. The text blocks are stacked vertically to the left of the picture. I need for the link come out of the picture centered on the picture. Unfortunately, I haven’t figured how to accomplish this. It seems the link output is centered on the node. Is there a way to have the link centered on the picture.
Here’s s snippet of the template:
myDiagram.nodeTemplate =
$(go.Node, "Horizontal",
{
locationSpot: go.Spot.Center, // Node.location is the center of the Shape
locationObjectName: "SHAPE",
selectionObjectName: "SHAPE"
//selectionAdorned: false,
},
new go.Binding("location", "", toLocation).makeTwoWay(fromLocation),
$(go.Panel, "Vertical", {},
$(go.TextBlock, {
alignment: go.Spot.Center,
textAlign: "center",
font: '9px bold sans-serif',
},
new go.Binding("text")),
$(go.TextBlock, {
alignment: go.Spot.Center,
textAlign: "center",
stroke: "#ff8c00",
font: '9px bold sans-serif',
},
new go.Binding("text")),
$(go.TextBlock, {
alignment: go.Spot.Center,
textAlign: "center",
stroke: "red",
font: '9px bold sans-serif',
},
new go.Binding("text")),
),
$(go.Panel, "Auto",
$(go.Picture,
{
name: "SHAPE",
},
new go.Binding("source", "type", nodeTypeImage),
new go.Binding("desiredSize", "type", nodeTypeSize)
),
),
);