scottcheng / cropit

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

How to upload multiple image , where is image dragging function ? #212

Open los5szus4s opened 8 years ago

los5szus4s commented 8 years ago

Hi really thank you for your awesome plugin.It's really help me to complete my project .I am mainly using the drag and drop property of this plugin . Let me know how can i use multiple images here . That is user can upload first foto , then he can upload next photo then next photo , then he can drag each photos to whichever position he want . How can i do this ? Please help .

Currently i added functionality for multiple photos .What i did is when user click on select new image on next time , i generate a new image-cropper div by the following code

$(".image-cropper:last").after('<div id="image-cropper"><div class="cropit-preview cropit-loaded" style="background-image:CURRENT UPLOAD IMAGE URL"></div></div>');

But that time the photo can't be dragged .Please help .

los5szus4s commented 8 years ago

.That is user first upload one photo and drag and position it , then he upload second photo then drag and position it .That is div structure will become

  <div class="cropit-image-preview">
          <img 1>
          <img 2>
          <img 3> 
          etc ..
     </div>

i see this question https://forum.jquery.com/topic/multiple-preview-images-diffrent-height-and-width-using-cropit . Here the question is about multiple image with multiple image preview div . But my question is about multiple image in same image preview div.