Skip to content

Add button to download drawingArea as svg#197

Closed
sents wants to merge 2 commits intolovasoa:masterfrom
sents:exportsvg
Closed

Add button to download drawingArea as svg#197
sents wants to merge 2 commits intolovasoa:masterfrom
sents:exportsvg

Conversation

@sents
Copy link
Contributor

@sents sents commented May 28, 2021

This PR adds a Button to download the canvas as a svg file.
It basically copies the canvas svg, appends the active style sheets that match either board.css or tools/*.css into the svg and downloads the resulting file. It also restricts the viewPort of the svg to the bounding box of the drawing area.
The download Button is located on the bottom of menu bar.

As I do not speak all the languages in the translations I used online dictionaries to translate "download".

For the download of an internal string as file I used: https://gist.github.com/danallison/3ec9d5314788b337b682
I understand what that gist does and I could now rewrite it if that is necessary for copyright reasons but it is so short
that I left it unchanged for now.

This PR potentially fixes #15.

I am aware of #195 but I think the Download button does not really belong in the tool section of board as it is a simple one click function.

By opening a pull request, I certify that I hold the intellectual property of the code I am submitting,
and I am granting the initial authors of WBO a perpetual, worldwide, non-exclusive, royalty-free, and irrevocable license to this code.

@lovasoa
Copy link
Owner

lovasoa commented May 28, 2021

See #195

@lovasoa lovasoa closed this May 28, 2021
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

Successfully merging this pull request may close these issues.

Option to export to pdf/jpg/...

2 participants