Gojs I need a textblock with background image

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) { 



                    }
                }
            );

I do not know what behavior that you want.

If you just want the Picture to always surround the text, and if the Picture is stretchable, you can change the Node from being a “Spot” Panel to being an “Auto” Panel, if you also remove the “Horizontal” Panel that is surrounding the Picture.

Note that you appear to have two “Horizontal” Panels, each with only one object in them. Is that what you really need? Are you getting warning messages about this when using the debug library, go-debug.js?