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

if the cropbox height is the same as the image height, it cant be zoomed. #30

Open
jeacott opened this issue Apr 13, 2014 · 1 comment

Comments

@jeacott
Copy link

jeacott commented Apr 13, 2014

lets say I have three images.
image1 , w=400, h=200
image2 , w=400, h=205
image3, w=400, h=400
if I feed each into a cropbox like this
$('myimage').cropbox({
width: 200,
height: 200,
zoom:10,
maxZoom:10
}).on('cropbox', function(e, data) {
console.log('crop window: ' + data);
});

image3 will zoomIn/zoomOut with a reasonable speed.
image1 wont zoomIn/zoomOut at all.
image2 will zoomIn/zoomOut veeeeeeeery slowly

Theres something not right with the zoom % calculation,
such that if the cropbox height is the same as the image height, it cant be zoomed.

hope you can help.
Cheers.

@jeacott jeacott changed the title zoom steps is dependent on the height if the cropbox height is the same as the image height, it cant be zoomed. Apr 17, 2014
@httpnb
Copy link

httpnb commented Aug 4, 2014

it seems like when the image is smaller than the width/height dimension in the plugin, zoom controls are reversed / partially broken. here's a jsfiddle that demonstrates: http://jsfiddle.net/5WLmj/

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

2 participants