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

fix svg viewBox bug 🎱 #440

Closed
wants to merge 2 commits into from
Closed

fix svg viewBox bug 🎱 #440

wants to merge 2 commits into from

Conversation

mesqueeb
Copy link

The main problem was here:
image

This should be set to the canvas width and height that the dev has chosen.

@mesqueeb
Copy link
Author

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}"` +
Copy link

@jmeinke jmeinke Jul 11, 2019

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.

Copy link
Author

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/
Copy link

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?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't remember! 😅

@mesqueeb
Copy link
Author

@jmeinke I have decided to close my crappy PR lol.
Please review and merge this PR instead. It was trying to solve the same issue as me:

#411

@mesqueeb mesqueeb closed this Jul 11, 2019
@jmeinke
Copy link

jmeinke commented Jul 11, 2019

Unfortunately, I don't have the permissions to merge it.

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.

2 participants