From 09949fc7eea10e592339fd620d140eb92a18e28b Mon Sep 17 00:00:00 2001
From: taehoon
Date: Fri, 8 Feb 2019 11:01:50 -0500
Subject: [PATCH] Crop avatar image using minWidth/minHeight
---
src/components/user_settings/user_settings.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js
index b3d31d67..8987c691 100644
--- a/src/components/user_settings/user_settings.js
+++ b/src/components/user_settings/user_settings.js
@@ -119,7 +119,7 @@ const UserSettings = {
reader.readAsDataURL(file)
},
submitAvatar (cropper) {
- const img = cropper.getCroppedCanvas({ width: 150, height: 150 }).toDataURL('image/jpeg')
+ const img = cropper.getCroppedCanvas({ minWidth: 150, minHeight: 150 }).toDataURL('image/jpeg')
this.avatarUploading = true
this.$store.state.api.backendInteractor.updateAvatar({ params: { img } }).then((user) => {
if (!user.error) {