jonasundderwolf / django-image-cropping

Django helper application to easily and non-destructively crop arbitrarily large images in admin and frontend.
Other
553 stars 131 forks source link

Formset "extra forms" don't crop #63

Closed jonmer85 closed 9 years ago

jonmer85 commented 9 years ago

Hello, I am using a django formset in which each form represents an "Image" object which has an ImageField as well as an ImageRatioField. This library works great if I already have an image populated. However, I am using the "extra" kwarg in the formset in which you can specify a number of extra blank forms for the user to fill out These extra forms don't have an image selected, and therefore are skipped by image_processing.js when it is initializing. I am trying to get image_processing.js to work when I upload a new image to these extra forms by using Javascript's new FileReader function (I took this code from a recent pull request). Any tips on how I can basically trigger a new reinit when I populate a new image? Should I just call init again?

Thanks, Jon