I do like this, the text in TextBlock may be long, so PIC is resizable; Any advice?
$(go.Node,“Spot”,
{ locationSpot: go.Spot.Center },
{resizable: true, resizeObjectName: “PIC”},
new go.Binding(“location”, “loc”, go.Point.parse).makeTwoWay(go.Point.stringify),
$(go.Panel, “Horizontal”,
$(go.Picture,
{
name: “PIC”,
},
new go.Binding(“desiredSize”, “size”, go.Size.parse).makeTwoWay(go.Size.stringify),
new go.Binding(“source”, “img”))
),
$(go.Panel, “Horizontal”,
$(go.TextBlock,“test”,
{
font: “bold 14px sans-serif”,
stroke: ‘#333’,
margin: 0,
isMultiline: true,
editable: false
},
new go.Binding(“text”, “text”))
),
{ // if double-clicked, an input node will change its value, represented by the color.
doubleClick: function (e, obj) {
}
}
);