Node.js based forum software built for the modern web
removed cropper zoom and using image scaling to show entire image. Click on modal backdrop during crop will no longer close modal
Julian Lam30bec51a21f6
diff --git a/public/less/generics.less b/public/less/generics.lessindex bab162e81f..d0980f9f48 100644--- a/public/less/generics.less+++ b/public/less/generics.less@@ -145,7 +145,8 @@#crop-picture-modal {#cropped-image {- max-width: 100%;+ max-width: 50%;+ max-height: 350px;}.cropper-container.cropper-bg {diff --git a/public/src/client/account/edit.js b/public/src/client/account/edit.jsindex 02c1e57200..87675643a3 100644--- a/public/src/client/account/edit.js+++ b/public/src/client/account/edit.js@@ -219,8 +219,6 @@ define('forum/account/edit', ['forum/account/header', 'translator', 'components'paramValue: ajaxify.data.theirid,fileSize: ajaxify.data.maximumProfileImageSize,allowSkippingCrop: false,- restrictImageDimension: true,- imageDimension: ajaxify.data.profileImageDimension,title: '[[user:upload_picture]]',description: '[[user:upload_a_picture]]',accept: '.png,.jpg,.bmp',@@ -258,8 +256,6 @@ define('forum/account/edit', ['forum/account/header', 'translator', 'components'socketMethod: 'user.uploadCroppedPicture',aspectRatio: '1 / 1',allowSkippingCrop: false,- restrictImageDimension: true,- imageDimension: ajaxify.data.profileImageDimension,paramName: 'uid',paramValue: ajaxify.data.theirid,}, onUploadComplete);diff --git a/public/src/modules/pictureCropper.js b/public/src/modules/pictureCropper.jsindex bbe0a76735..a1d9b17f71 100644--- a/public/src/modules/pictureCropper.js+++ b/public/src/modules/pictureCropper.js@@ -37,13 +37,16 @@ define('pictureCropper', ['translator', 'cropper'], function (translator, croppe}, function (cropperHtml) {translator.translate(cropperHtml, function (translated) {var cropperModal = $(translated);- cropperModal.modal('show');+ cropperModal.modal({+ backdrop: 'static',+ }).modal('show');var img = document.getElementById('cropped-image');var cropperTool = new cropper.default(img, {aspectRatio: data.aspectRatio,autoCropArea: 1,viewMode: 1,+ zoomable: 0,cropmove: function () {if (data.restrictImageDimension) {if (cropperTool.cropBoxData.width > data.imageDimension) {