Hello,
as described in the title I try to get a value from the other panels shape which is the width property but I don’t know how to. Is this even Possible in the way I want to do this ?
this is my Node Template:
myDiagram.nodeTemplate =
$(go.Node, "Spot", {selectionObjectName: "BASE"},
$(go.Panel,"Auto",
$(go.Shape, "LineH",
{
name:"HLINE",
fill:"white",
name:'line',
minSize: new go.Size(200, 0),
maxSize: new go.Size(100,0),
strokeWidth: 3,
alignment: go.Spot.Center,
portId: "",
fromSpot: go.Spot.LeftRightSides,
toSpot: go.Spot.LeftRightSides
},
// make sure links come in from the proper direction and go out appropriately
new go.Binding("stroke", "brush"),
// make sure links come in from the proper direction and go out appropriately
new go.Binding("fromSpot", "dir", function(d) { return spotConverter(d, true); }),
new go.Binding("toSpot", "dir", function(d) { return spotConverter(d, false); }))
),
// This draws a "RoundedRectangle" over the horizontal line
$(go.Panel,"Auto",
$(go.Shape, "RoundedRectangle",
{name:"BASE",fill:"white", strokeWidth: 3,alignment: go.Spot.Center },
new go.Binding("stroke","brush"),
new go.Binding("fill","brush")),
$(go.TextBlock, "text",
{name:"TEXT", editable: true, isMultiline: false},
new go.Binding("text", "text").makeTwoWay(),
new go.Binding("scale", "scale").makeTwoWay(),
new go.Binding("font", "font").makeTwoWay())),
// remember the locations of each node in the node data
new go.Binding("location", "loc", go.Point.parse).makeTwoWay(go.Point.stringify),
// make sure text "grows" in the desired direction
new go.Binding("locationSpot", "dir", function(d) { return spotConverter(d, false); })
);
It looks like this when it get’s fed with data:
So my Question is how do I get the HLine width the exact same width as the RoundedRectangle Shapes width ?