A Javascript library to export svg charts from the DOM and download them as an SVG file, PDF, or raster image (JPEG, PNG) format. Can be done all in client-side.
MIT License
44
stars
23
forks
source link
PullRequest: Add callback function after Download #17
Background
For one project it was necessary to export several SVGs one after the other as separate files. To do this, each SVG had to be created, then edited and then exported.
Since downloadSvg works asyncronously, I needed a feedback when the triggerDownload is completed. After that I can now change my SVG and then start a new export.
Update svg-export.js
I added an event "onDone" that fires when triggerDownload is finished, i.e. when it is ok to change the original SVG.
Please check the PullRequest. Thank you very much!
Background For one project it was necessary to export several SVGs one after the other as separate files. To do this, each SVG had to be created, then edited and then exported. Since downloadSvg works asyncronously, I needed a feedback when the triggerDownload is completed. After that I can now change my SVG and then start a new export.
Update svg-export.js I added an event "onDone" that fires when triggerDownload is finished, i.e. when it is ok to change the original SVG.
Please check the PullRequest. Thank you very much!