Add button to download drawingArea as svg#197
Closed
sents wants to merge 2 commits intolovasoa:masterfrom
Closed
Conversation
Owner
|
See #195 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.cssortools/*.cssinto 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.