scottcheng / cropit

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

Unable to use the same editor instance twice #218

Closed kongakong closed 7 years ago

kongakong commented 7 years ago

Hi all,

I have embedded a cropit editor in a modal dialog box for picture manipulation.

When I open the dialog box for the first time, everything works OK and as expected.

However, if I open the modal dialog box for the second time, the 'select image', zoom and move functions are no longer responding.

I have tried calling cropit('reenable') before the dialog appears for the second time, but the editor is still unresponsive.

I think maybe the best way forward is to destroy the editor instance and recreate it.

How can i achieve it?

Is there any other alternative?

kongakong commented 7 years ago

User error: I set the cropped image back to the image editor. Since the image already fits the preview window exactly, zoom and slider do not work.