I have requirement uploaded the image and resizing the image. it should be resize as per aspect ratio of image. please provide your suggestion. please find the code your reference.
$$(go.Node, “Auto”, { selectable: false },
new go.Binding(“location”, “loc”, go.Point.parse).makeTwoWay(go.Point.stringify),
$$(go.Part, “Viewbox”,
{ resizable: true },
$$(go.Panel, “Auto”,
$$(go.Picture,
{
sourceCrossOrigin: function (pict) { return “use-credentials”; },
//width: 40, height: 40,
imageStretch: go.GraphObject.UniformToFill,
maxSize: new go.Size(200, 200),
//angle: 30,
},
new go.Binding(“source”, “path”),
new go.Binding(“width”, “imageWidth”),
new go.Binding(“height”, “imageHeight”),
new go.Binding(“imageStretch”, “imageStretchOption”),
new go.Binding(“desiredSize”, “imageDesiredSize”),
new go.Binding(“maxSize”, “imageMaxSize”))
)
));
but currently image not resized properly.