Hi,
I am having problem with making resizable shape based on .svg variable ‘d’ that can be filled.
If I create this object like separate geometry, then it is not resizable.
On other hand I am able to create resizable shape in node by using just geometry string (sendMsgStr), but in that case doesn’t work /code is in bottom of post/
Can you give me some suggestions how to deal with this?
Thank you
var sendMsgStr = “M69.6,0H9.9c-2.4,0-4.4,2-4.4,4.4l-5.2,14l5.2,13.8c0,2.4,2,4.7,4.4,4.7h45.6V48L67,36.8h2.6c2.4,0,4.4-2.2,4.4-4.7V4.3C74,1.9,72,0,69.6,0z”
var receive_msgNodeTemplate =
$(go.Node, “Spot”, nodeStyle(),
{ locationObjectName: "SHAPE", locationSpot: go.Spot.Center,
selectionAdorned: false, // use a Binding on the Shape.stroke to show selection
resizable: true, resizeObjectName: "SHAPE",
toolTip: tooltiptemplate, //TODO
contextMenu: activityNodeMenu, // includes properties menu
layoutConditions: go.Part.LayoutStandard & ~go.Part.LayoutNodeSized // don't re-layout when node changes size
// itemTemplate: boundaryEventItemTemplate //TODO
},
new go.Binding("location", "loc", go.Point.parse).makeTwoWay(go.Point.stringify),
$(go.Panel, "Auto",
{ name: "PANEL",
},
$(go.Shape,
{ name: "SHAPE", geometryString: receiveMsgStr,
width:74 , height:48,
fill: "#15572C", strokeWidth: 1, stroke: "15572C"}
),
$(go.TextBlock,
{ //text: "civilian",
alignment: go.Spot.Center, textAlign: "center",
font: "11pt Helvetica, Arial, sans-serif",
//stroke: lightText,
margin: 8,
maxSize: new go.Size(160, NaN),
wrap: go.TextBlock.WrapFit,
editable: true },
new go.Binding("text", "text").makeTwoWay()
)
),
// four named ports, one on each side except the bottom, all input only:
makePort("T", go.Spot.Top, false, true),
makePort("L", go.Spot.Left, false, true),
makePort("R", go.Spot.Right, true, false),
makePort("B", go.Spot.Bottom, true, false)
); // end go.Node