-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix svg viewBox bug 🎱 #440
Conversation
fixes #439 |
@@ -563,9 +563,7 @@ export default class SignaturePad { | |||
'<svg' + | |||
' xmlns="http://www.w3.org/2000/svg"' + | |||
' xmlns:xlink="http://www.w3.org/1999/xlink"' + | |||
` viewBox="${minX} ${minY} ${maxX} ${maxY}"` + | |||
` width="${maxX}"` + | |||
` height="${maxY}"` + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mesqueeb Why did you remove width and height? It makes the tests fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry!
I never include it on my SVGs, viewBox should be enough.
@@ -1,5 +1,4 @@ | |||
node_modules/ | |||
dist/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mesqueeb Why are you adding the dist folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't remember! 😅
Unfortunately, I don't have the permissions to merge it. |
The main problem was here:
![image](https://user-images.githubusercontent.com/3253920/58394230-2c0fa180-807d-11e9-8481-9146b40cf6b3.png)
This should be set to the canvas width and height that the dev has chosen.