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

Zoom not working correctly when maxZoom > 1 and image smaller than cropbox #75

Open
tektraveler opened this issue Aug 8, 2015 · 2 comments

Comments

@tektraveler
Copy link

See this JsFiddle

When maxZoom is set to >1 and the image is smaller than the cropbox the zoom in and out buttons do not work correctly. The "plus" button zooms out and the "minus" button zooms in (reversed functions).

In the JsFiddle above, the supplied image is 300px high and the crop box is 350px high which results in a zoom percentage of 1.1666+. As we are allowing the user to zoom to 1.5, clicking the plus button should increase the percentage and clicking the minus button reduce the percentage (to the smallest amount allowed). Instead the buttons work in reverse.

Expected behavior: Clicking the zoom "plus" button, the image would zoom in (up) to the maxZoom amount of 1.5. Instead the zoom "minus" button actually zooms in to maxZoom.

If the image is larger than cropbox, the issue does not occur.

Any help very much appreciated.
Thanks.

@mnshdw
Copy link

mnshdw commented May 19, 2016

Hey @tektraveler,
Take a look at PR #86, it should fix your issue.

@dustyyy
Copy link

dustyyy commented Jun 1, 2016

Just to follow up on this, if the image is the exact same size as the cropbox zoom in/out does not work.

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

3 participants