svgdotjs / svg.js

The lightweight library for manipulating and animating SVG
https://svgjs.dev
Other
11.04k stars 1.08k forks source link

Viewbox doesn't have zoom property in 3.0 #1070

Closed marekjedrzejewski closed 4 years ago

marekjedrzejewski commented 4 years ago

2.7 had zoom property when viewbox() was called. Really useful feature for scalling things. Even the docs for 2.7 said:

But the best thing about the viewbox() method is that you can get the zoom of the viewbox

3.0 doesn't have it, or it's somehow hidden, 3.0 docs don't give any result when I search for 'zoom'.

Fuzzyma commented 4 years ago

There should be a zoom() method on any element which supports viewbox. You can get and set the zoom with this method. Seems like we forgot it in the 3.0 docs

marekjedrzejewski commented 4 years ago

That works, thanks :)