Don't let cropper overflow the canvas (or upload fails)

This commit is contained in:
SillyLossy
2023-05-29 01:18:11 +03:00
parent 602bceb26e
commit 3b72be402e
2 changed files with 3 additions and 2 deletions

View File

@ -4476,6 +4476,7 @@ function callPopup(text, type, inputValue = '') {
$('#avatarToCrop').cropper({ $('#avatarToCrop').cropper({
aspectRatio: 2 / 3, aspectRatio: 2 / 3,
autoCropArea: 1, autoCropArea: 1,
viewMode: 2,
rotatable: false, rotatable: false,
crop: function (event) { crop: function (event) {
crop_data = event.detail; crop_data = event.detail;

View File

@ -2797,7 +2797,7 @@ h5 {
#avatarCropWrap { #avatarCropWrap {
margin: 10px auto; margin: 10px auto;
max-height: 90%; max-height: 90%;
max-width: 90%; max-width: 100%;
} }
#avatarToCrop { #avatarToCrop {
@ -4470,4 +4470,4 @@ body.waifuMode #avatar_zoom_popup {
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
} }
} }