Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 6969

Issue with makeSVG method with embeded svg files

$
0
0

@piotr.b wrote:

Hi.
I'm trying to make a svg image from a diagram and I have a problem. I have nodes which have svg pictures. When I'm trying to call a makeSVG method, nodes are generated well, but without these embeded svg elements. I've noticed that I get an error:

"Error: <image> attribute width: Expected length, "undefined"."

I've checked svg which has been generated by this method and I saw that emebeded svgs exist in the file as an image:

<image x="0" y="0" width="undefined" height="undefined" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...

and as you can see width and height are undefined. I've changed these values manually and I was able to see nodes with emebeded svgs. So here is the problem.

My question is. Is it possible, in somehow, to set these values. I've tried to assign width/height to the node template:

(go.Picture,
{
   name: 'Picture',
   desiredSize: new go.Size(200, 200)
}

or

(go.Picture,
{
   name: 'Picture,',
   width: 200,
   height: 200
}

but with no luck. Thanks for any help!

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6969

Trending Articles