I added the Geometry.parse like this.
function parseSvg(name) {
console.log('[NAME]', name)
return go.Geometry.parse(name, true);
}
let imgDiagram =
$(go.Node, 'Auto',
$(go.Shape, 'Square',
{ fill: 'lighcoral', strokeWidth: 0, width: 56, height: 56 }
),
$(go.Shape,
new go.Binding('geometry', 'img', parseSvg)
)
);
but I still see the black node and not the SVG.
My svg string looks like this.
<svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny" width="55.3" height="51.8" viewBox="21 6 158 148"><path d="M25,50 l150,0 0,100 -150,0 z" stroke-width="4" stroke="black" fill="rgb(128,224,255)" fill-opacity="1" ></path><path d="M25,50 L175,150 M25,150 L175,50" stroke-width="4" stroke="black" fill="black" ></path><path d="M85,55 L100,75 115,55" stroke-width="4" stroke="black" fill="none" ></path><g transform="translate(0,0)" stroke-width="4" stroke="black" fill="none" ><path d="M87.5,40 l25,-25 m0,25 l-25,-25" ></path></g></svg>