Open h-sobhy opened 10 years ago
Bump, same problem. It's related to $preview.appendTo(jcrop_api.ui.holder);
Trying to find out how to "reset" that or update it.
I did note that if you commented this line out that it will work right. However, you might have to code the CSS yourself to make your preview pane look nice.
I have an asp.net page that uses jQuery jCrop and a modal to upload and crop images. the J crop box and preview options including some extra options are working fine as appear in this example show page and code. http://fiddle.jshell.net/4hvE4/show/ http://jsfiddle.net/4hvE4/
User should open the modal to upload an image from iFrame which passes the image data to parent and this working fine too as I guess (I've added a function similar to the one sent from the ASP.NET iFrame). Full code provided in my working example.
My problem started when I try to update the jCrop box and preview and re-attach the api .. only box updated with new image path only without dimensions / aspect ratio and the preview disappeared.
I have tried many of answers including those on this question so I back to call this function that way: