Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG export #46

Open
eyssette opened this issue Nov 28, 2021 · 2 comments
Open

SVG export #46

eyssette opened this issue Nov 28, 2021 · 2 comments

Comments

@eyssette
Copy link

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!

@davekinkead
Copy link
Owner

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?

@eyssette
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants