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

viewBox calculation mixed up #9

Open
florianfesti opened this issue May 16, 2018 · 1 comment
Open

viewBox calculation mixed up #9

florianfesti opened this issue May 16, 2018 · 1 comment

Comments

@florianfesti
Copy link

Hi!
I get users complaining that the SVGs I generate with Boxes.py (https://github.com/florianfesti/boxes) cannot be rendered with Laserweb. A quick look into the code raised the suspicion that the viewBox calculation may be off. Especially those two lines in tagparser.js seem to be in the wrong order. Swapping them out at least shows something:

this.tag.scale(scaleX, scaleY)
this.tag.translate(-translateX, -translateY)

Test with any SVG with has a viewBox not starting at 0 0 - like all Boxes.py artifacts.

Sorry, for not submitting a proper PR.

@florianfesti
Copy link
Author

florianfesti commented May 29, 2018

Is a PR going to help with this or should it be filed directly against LaserWeb4?

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

No branches or pull requests

1 participant