Could you post the whole node template so that we can try it?
Ok, this is how it looks like at the moment:
This is for the target diagram:
$(go.Node, 'Spot', {
locationSpot: go.Spot.Center,
locationObjectName: 'BODY',
resizeObjectName: 'PIC',
resizable: true,
dragComputation: draggingFunctionsProvider.stayInGroup
},
$(go.Panel, 'Auto',
$(go.Shape, shape, nodeShapeSettings(fillColor)),
$(go.Picture, {
name: 'PIC',
background: 'white',
margin: 10,
minSize: minSize,
// desiredSize: new go.Size(200, 200),
maxSize: new go.Size(480, 320)
},
new go.Binding('source', 'value'))
),
getPort(portTypes.input),
$(go.TextBlock, {
editable: false,
margin: 2,
alignment: go.Spot.Bottom
},
new go.Binding('text', 'description')
))
This is the template I use for the palette:
$(go.Node, 'Spot', {
locationSpot: go.Spot.Center,
locationObjectName: 'BODY'
},
$(go.Panel, 'Auto',
$(go.Shape, shape, nodeShapeSettings(fillColor)),
$(go.Picture, {
name: 'PIC',
background: 'white',
margin: 10,
minSize: minSize
})
),
getPort(portTypes.input),
$(go.TextBlock, {
editable: false,
margin: 2,
visible: true,
alignment: go.Spot.Bottom
},
new go.Binding('text', 'description')
))
This is the same in both templates:
let nodeShapeSettings = function (fillColor) {
return {
name: 'BODY',
strokeWidth: 0,
fill: fillColor,
minSize: minSize,
stretch: go.GraphObject.Fill
};
};
Should I include the code for the port?
No, thanks – it’s enough for us to have reproduced the bug. Thanks for reporting the bug! Apparently it’s only a problem with Picture.
phew… good to hear :-D I was afraid I might have made a silly mistake (again) :-)
This will be fixed in 1.7.25 (currently in beta), which should be coming out in a couple days.
Tnx for the info walter.
It’s now released as “latest”.
Thanks walter!