bupy7 / yii2-widget-cropbox

This widget allows crop image before upload to server and send informations about crop in JSON format.
BSD 3-Clause "New" or "Revised" License
91 stars 33 forks source link

Select Wrong Image Type #4

Closed skworden closed 9 years ago

skworden commented 9 years ago

If you select anything that isn't considered valid i.e. .docx it will still open the crop field and lock everything.

break

It would be nice if there was an edit/recrop button.

I.e A user upload an image and cropped it. They could want to recrop it before saving. You have to reselect the image if you want to crop it again.

It would also be nice to have a remove image / clear button. A user may select an image then want to remove it and not save one.

var control = $("#image-file");
    $(".btnClear").on("click", function() {
        control.replaceWith(control = control.clone(true));
        $("#cropInfo").val('');
        $(".cropped").html('');
    });
bupy7 commented 9 years ago

Hi! This is good a proposals. I add it to new version of extension. Thanks!