Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Better description of the zoomLevel in the documentation #72

Open
Ost-Frost opened this issue Jun 24, 2021 · 4 comments
Open

Better description of the zoomLevel in the documentation #72

Ost-Frost opened this issue Jun 24, 2021 · 4 comments

Comments

@Ost-Frost
Copy link

I worked with the zoomLevel attribute of the zoomableEventObject yesterday and I think it should be documented more clearly how the zoom relates to the scale of the view. The initial assumption would be that the zoomLevel is the factor the view is scaled by, but it is actually the square root of it.

It might have some advantages in the usability to scale it twice by the zoomLevel factor, but it should be written somewhere in the documentation to avoid confusion.

@nbarshain
Copy link

Extremely helpful. I could not figure out how zoomLevel was calculated.
Thank you @Ost-Frost for spelling it out.

@nbarshain
Copy link

Just curious, why would the author write it as the square root?

@Ost-Frost
Copy link
Author

My interpretation would be that the zoom feels more natural when you zoom out if it is not linear.

@nbarshain
Copy link

Oh that makes sense. They are zooming based on log.
I guess for computing the rate of zoom, log makes more sense, but for calculating things based on scaling after the zoom happens, it's easier to work with the linear ratio.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants