Open Pipozor opened 8 years ago
This may be a duplicate of Issue #26
Hmm yes the issue is almost the same
$(".cropit-image-preview").css("background-image", "none"); is not completly working. the preview over the crop area is still displayed and it's not possible to reload the same picture.
I think a real clean up of the JS object is necessary :(
i just found a hack that allows adding of the same image after removing. you have to do 2 things on cancel:
$('.cropit-image-preview').css( 'background-image', 'none' );
$('.input.cropit-image-input')[0].value = null;
@jpodpro thank you very much for your idea. almost ok :) but it's not working very well for me : background main image is well removed and it's now possible to drop the same image but "background preview overflow" is still visible. any idea ?
edit: I found a solution
in addition to your above Js code, add this line $(".cropit-image-background").attr("src", "");
now everything is cleared. ^_^
A function to remove the loaded image (and its preview) would be great. Like a reset of the container. Thanks