This is a requirement I had to solve so I thought I would post the solution I used for others.
I needed a button that would allow me to save a VivaGraph SVG rendering as PNG.
This is a requirement I had to solve so I thought I would post the solution I used for others.
I needed a button that would allow me to save a VivaGraph SVG rendering as PNG.
Copyright © 2021 Jogjafile Inc.
If you use: https://github.com/exupero/saveSvgAsPng It worked perfectly for me.
The only file you need is
saveSvgAsPng.jsIf you include that in your html you can call it like so:
Wire it up to some handler and when you invoke it you should see export.png as a download.