-
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
ViewBox value is wrong in svg image #648
Comments
This would cause the issue in #411 wouldn't it? |
I can not imagine the case when somebody need not drawable space. As you see in your demo it adds empty spaces on bottom and right. I use the same code to handling high DPI
as result drawable area scaled and I want to use result svg image as it was in creation step to display it for the user without additional operations with svg. |
I am having a hard time reproducing the issue in #411. I'm thinking this was fixed before that was merged. I think it would be ok to change it back. If you want to create a PR that would be very helpful 😁👍 |
🎉 This issue has been resolved in version 4.0.8 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@UziTech the issue is still happening in version. |
@dnlrbz the best way to get this fixed would be to create a new issue and provide some code or a repo that can reproduce it along with a video. |
From 4.0.0 version when use toDataURL("image/svg+xml") function resulting svg viewBox value has wrong height and width. The problem is
viewBox="${minX} ${minY} ${this.canvas.width} ${this.canvas.height}"
Width should be
this.canvas.width / ratio
and height should bethis.canvas.height / ratio
as in previous version.Bug can be reproduced by demo
The text was updated successfully, but these errors were encountered: