My nodeTemplate has changed,why?

this is my nodeTemplate code;
var stateTemplate=(go.Node, "Auto", { locationSpot: go.Spot.Center }, //new go.Binding("angle").makeTwoWay(), new go.Binding("location", "loc", go.Point.parse).makeTwoWay(go.Point.stringify), new go.Binding("desiredSize", "size", go.Size.parse).makeTwoWay(go.Size.stringify), { resizable: true, //rotatable: true, resizeObjectName: "pic" }, //contextMenu { contextMenu: (go.Adornment)},
//desiredSize: new go.Size(75, 75)
//maxSize: new go.Size(75, 75)
new go.Binding(“source”, “img”),
new go.Binding(“text”)

and the data that is saved in diagram is like this :

{“category”:“state”, “size”:“15 15”, “img”:"/uploads/pic/state_green.svg", “text”:{“0”:"/uploads/pic/state_green.svg", “1”:"/uploads/pic/state_red.svg", “3”:"/uploads/pic/state_black.svg"}, “key”:-35, “loc”:“1.5 -83.5”},
{“category”:“state”, “size”:“80 45”, “img”:"/uploads/pic/belt_red.png", “text”:{“0”:"/uploads/pic/belt_red.png", “255”:"/uploads/pic/belt_green.png"}, “key”:-43, “loc”:"-412.5 -342.5"},

this is my node show in myPalette;
but when i drop it to my diagram ,it changes like this;

that green picture shows like this; many weeks ago,it is ok,but today,i find it show likes this,and i do not change my code,they are the same template alright?

can you help me?

Here’s the template that you are using, reformatted and without commented-out code:

The node is resizable, but you say that the object to be resized by the user should be named “pic”, yet there is no object with name: "pic". I suspect you forgot to set that on your Picture.

It is probably wrong to have an “Auto” Panel with only one element in it. The point of an “Auto” panel is to have the main element surround the rest of the elements, such as with a border. If there aren’t any other elements, it’s pointless to have the panel.

If the Picture is supposed to be resized by the user, the binding to save the size to the model should be on that Picture, not on the Node.

The Picture also does not set either GraphObject.desiredSize or both GraphObject.width and GraphObject.height. It probably should.

Picture has no Picture.text property, so it does not make sense to try to bind that property. Always use go-debug.js and check the console window for warnings and error messages.

The context menu is an empty Adornment, but maybe that’s because you simplified it for posting here.

i need the picture’s size is changed with the node’s size ,
and the picture’s text property is used to save some information that is useful for me;
maybe the usage is irregular,I will study for better.
finally, i deal with the picture with the PS,then,it works;

If you want to show any text, you will need to use a TextBlock.

I recommend rereading and at least the first dozen pages of