reasons
reasons copied to clipboard
SVG export
Hi @davekinkead ! Do you think it's possible to include in your code a function to save the argument map as SVG (maybe with canvas2svg) ? Thanks again for your wonderful app!
Canvas should automatically export to PNG in most browsers and in the hosted version, I made an embed script for interactive webpages ... <script async id="86d9086" src="http://reasons.io/maps/86d9086.js"></script> ... see https://reasons.io/learn/06
But SVG would be cool tool. Looking at canvas2svg, I think it would be best used as an additional, optional library to limit dependencies. Reasons could export a ctx context or something that could be consumed by the wrapper around canvas2svg.
Wanna send me a PR?
I've added the function to save the map as PNG in my fork of your software, and also the possibility to create a custom URL that can be used with an iframe for interactive webpages, but yes SVG would be cool ! For example, with SVG you can hide a part of the map, and gradually reveal the rest.