mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #7138
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user