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 is not correctly mapped to SVG viewport #93

Open
bsweeney opened this issue Jul 17, 2022 · 0 comments
Open

viewbox is not correctly mapped to SVG viewport #93

bsweeney opened this issue Jul 17, 2022 · 0 comments

Comments

@bsweeney
Copy link
Member

Per the SVG spec the viewBox "(specifes) a rectangle in user space that should be mapped to the bounds of the SVG viewport established by the given element, taking into account the preserveAspectRatio attribute. The presence of the viewBox attribute results in a transformation being applied to the viewport coordinate system."

Essentially, when the viewBox doesn't match the viewport a transformation is applied. While the x/y values are correctly applied, the width/height do not define a transformation to the viewport.
https://svgwg.org/svg2-draft/coords.html

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