Hello
I want to make a square bracket up to half a rectangle But horizontal lines stretch to the end.
I use geometryString.
I want something like this
How can I do it?
Could you please show us how you defined your Shape and the Panel that it is in?
You can see example here - https://codepen.io/alexzanel/pen/dLEVQb
Maybe you need to set Shape.geometryStretch.
myDiagram.nodeTemplate =
$(go.Node, "Spot",
$(go.Shape,
{
strokeWidth: 3,
geometryString: "M30 0 L0 0 0 30 30 30",
geometryStretch: go.GraphObject.None
},
new go.Binding("stroke", "color")),
$(go.TextBlock,
{ alignment: new go.Spot(0, 0.5, 6, 0), alignmentFocus: go.Spot.Left },
new go.Binding("text"))
);
Yes it works, but how to make it resizable?
I thought you didn’t want it to be resizable.
OK, have the geometry stretch with the Shape:
$(go.Node, "Auto",
{ resizable: true },
$(go.Shape,
{ strokeWidth: 3, geometryString: "M1 0 L0 0 0 1 1 1 M2 1" },
new go.Binding("stroke", "color")),
$(go.TextBlock,
{ margin: 3 },
new go.Binding("text"))
);
But then the border does not stretch
Look again at the node template. See the differences from what I posted first?
Thank you so much