v1.18.x
Barış Soner Uşaklı 6 years ago
parent eb6062819f
commit 29a85aecc7

@ -34,7 +34,7 @@ define('pictureCropper', ['cropper'], function (Cropper) {
}, function (cropperModal) { }, function (cropperModal) {
cropperModal.modal({ cropperModal.modal({
backdrop: 'static', backdrop: 'static',
}).modal('hide'); }).modal('show');
// Set cropper image max-height based on viewport // Set cropper image max-height based on viewport
var cropBoxHeight = parseInt($(window).height() / 2, 10); var cropBoxHeight = parseInt($(window).height() / 2, 10);
@ -62,11 +62,9 @@ define('pictureCropper', ['cropper'], function (Cropper) {
}, },
ready: function () { ready: function () {
if (!checkCORS(cropperTool, data)) { if (!checkCORS(cropperTool, data)) {
return; return cropperModal.modal('hide');
} }
cropperModal.modal('show');
if (data.restrictImageDimension) { if (data.restrictImageDimension) {
var origDimension = (img.width < img.height) ? img.width : img.height; var origDimension = (img.width < img.height) ? img.width : img.height;
var dimension = (origDimension > data.imageDimension) ? data.imageDimension : origDimension; var dimension = (origDimension > data.imageDimension) ? data.imageDimension : origDimension;

Loading…
Cancel
Save