Resizing Pictures in a Node

Hello, please could you help me on this ?
The images don’t get rezise very well as you can see.

thanks in advance.

Is the resizeObjectName set to reference the Auto Panel, and the Picture set with stretch: go.GraphObject.fill as in the codepen provided in your previous post?

By the way, please split questions on different topics into new posts to make it easier for people to search for answers.

Sorry about the mixing of topics.

The answer of your question is “yes” i guess. i didn’t change anything in the provided code.
Although i can’t see the stretch property anywhere.

_ $$(go.Node, “Spot”,_
_ { locationSpot: go.Spot.Center },_
_ new go.Binding(“location”, “loc”, go.Point.parse).makeTwoWay(go.Point.stringify),_
_ { selectable: true },_
_ // { draggable: true },_
_ { resizable: true, resizeObjectName: “PANEL” },_

Hope it helps to debug.

Are you sure you’ve looked at the codepen recently? On the go.Picture within the ImageNode template, stretch is set.


I found it, and it works fine.
Thank you very much.

Is there a way to specify a size for some nodes in the palette ?
I’ve tried this:
myPalette =
$$(go.Palette, “custom_palette”, // must name or refer to the DIV HTML element
maxSelectionCount: 1,
nodeTemplateMap: myDiagram.nodeTemplateMap, // share the templates used by myDiagram
model: new go.GraphLinksModel([ // specify the contents of the Palette
text: “”,
figure: “Triangle”,
fill: “green”,
width: 15,
height: 10

There is a binding on size, so in the Palette’s model, add this: size: "15 10". Many of these questions can be answered if you read the code more carefully. I’d also advise reading the various intro pages.

I’ve seen that,
May be i didn’t express my problem very well.

i’d like to set the size of the palette nodes, separately.
Like one Node could have a different size from the others.

I’m still not sure I’m understanding the problem. Each node in the Palette has data in the model, so you can set a different size for each.

If you mean you don’t want the templates to be shared between the Palette and the main diagram, you’ll need to create different node templates for each.

Again, I urge you to read the intro pages.

Ok, i’ll do it.
Thanks for your time.