From 46d4096352663f8f0ce9f7681b3a592888bd7e39 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Sat, 8 Apr 2023 11:14:12 +0200 Subject: [PATCH] Improvements to cropper --- frontend/src/components/modals/AvatarChangeModal.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/modals/AvatarChangeModal.vue b/frontend/src/components/modals/AvatarChangeModal.vue index d2ea1919..2aa6cca6 100644 --- a/frontend/src/components/modals/AvatarChangeModal.vue +++ b/frontend/src/components/modals/AvatarChangeModal.vue @@ -19,15 +19,17 @@ :src="cropperInput" class="h-200px" :min-height="150" + :default-size="{ + width: 256, + height: 256, + }" :canvas="{ imageSmoothingQuality: 'high', - maxWidth: 256, - maxHeight: 256, }" :stencil-props="{ - handlers: {}, - movable: false, - scalable: false, + handlers: { eastNorth: true, westNorth: true, eastSouth: true, westSouth: true }, + movable: true, + scalable: true, aspectRatio: 1, }" :resize-image="{