walter
June 3, 2019, 12:24pm
4
In that case you will need to customize the Diagram.makeSvg function by using its elementFinished option: Diagram | GoJS API
I think you’ll want your elementFinished function, when the element was for a Picture , modifies the resulting SVG element by inserting the contents of the SVG file.
Hi, when exporting the diagram as SVG (makeSVG), is it possible to embed nodes images (SVG Picture) instead of using xmlns:xlink?
Right now I’m retrieving those SVG images from a server, and when opening a saved SVG file and the server if offline, the nodes are showing empty. Also in the case of distributing the diagrams to people without access to the server they won’t be able to see it correctly.
Thanks for your help in advance.
I haven’t found a way to do this so I suspect the answer is ‘no’ but I’ll ask anyway, in case I am missing something or am being stupid.
I’m making an image of my diagram with diagram.makeSvg and saving that to a .SVG file for display later. The diagram contains Picture elements with .source set to a URL of an SVG file. The result of the makeSvg() call contains those URLs rather than the contents of what they point to.
The problem is that these generated SVG files from makeSvg need to work in …