- fix cropper checking

This commit is contained in:
ashubawork
2023-10-13 12:43:54 +03:00
parent 079cad9819
commit 0c94a55af6
2 changed files with 8 additions and 6 deletions
+2 -1
View File
@@ -718,8 +718,9 @@ function um_modal_responsive() {
}
function um_remove_modal() {
// jQuery('img.cropper-hidden').cropper('destroy');
if ( jQuery('.cropper-hidden').length > 0 ) {
cropper.destroy();
}
jQuery('body,html,textarea').css("overflow", "auto");
+3 -2
View File
@@ -111,13 +111,14 @@ jQuery(document).ready(function() {
mode = $formWrapper.attr('data-mode');
}
if ( jQuery('.cropper-hidden').length > 0 ) {
var data = cropper.getData();
var coord = Math.round(data.x) + ',' + Math.round(data.y) + ',' + Math.round(data.width) + ',' + Math.round(data.height);
}
if ( coord ) {
jQuery(this).html( jQuery(this).attr('data-processing') ).addClass('disabled');
console.log(src);
jQuery.ajax({
url: wp.ajax.settings.url,
type: 'POST',