scottcheng / cropit

A "customizable crop and zoom" jQuery plugin.
http://scottcheng.github.io/cropit/
MIT License
874 stars 304 forks source link

Changing zoom options dynamically #90

Closed starky7 closed 9 years ago

starky7 commented 9 years ago

Hi @scottcheng,

First thank you for the great plugin you made, it's really useful.

However, there is one thing I miss:

I'm trying to change the zoom options (exportZoom or maxZoom) after the cropit initialization and in function of the uploaded image size. That means I want to change theses options dynamically (in "onFileChange" or "onImageLoaded" function for example) each time an image is uploaded (just before, during or after the upload).

Do you think it is possible?

Thank you in advance, starky7

scottcheng commented 9 years ago

There's no API for that at the moment, but yes it's possible. I'll add it in a recent release.

starky7 commented 9 years ago

Thank you for your answer. Ok cool, please let me know when it will be done. Have a nice day.

scottcheng commented 9 years ago

@starky7 I added getters and setters for initialZoom, minZoom, maxZoom and exportZoom in the dev branch. Feel free to play with it and let me know what you think.

scottcheng commented 9 years ago

Closing due to inactivity.

starky7 commented 8 years ago

@scottcheng sorry for my late answer... Just to tell you that it works great (I did it with 'maxZoom')! Thank you!

scottcheng commented 8 years ago

Great to hear that :)