removed cropper zoom and using image scaling to show entire image. Click on modal backdrop during crop will no longer close modal

v1.18.x
Julian Lam 8 years ago
parent 5cb53406fe
commit 30bec51a21

@ -145,7 +145,8 @@
#crop-picture-modal {
#cropped-image {
max-width: 100%;
max-width: 50%;
max-height: 350px;
}
.cropper-container.cropper-bg {

@ -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);

@ -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) {

Loading…
Cancel
Save