From 3d5c068aed479769f89199901e5b68c413564e46 Mon Sep 17 00:00:00 2001 From: tamaina Date: Wed, 12 Apr 2023 14:17:17 +0000 Subject: [PATCH] Revert "Revert "fix?"" This reverts commit 9cb4fbfd96db9adaf92cf3ec1f6f15b1b257d7b3. --- packages/frontend/src/components/MkMediaList.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/MkMediaList.vue b/packages/frontend/src/components/MkMediaList.vue index 1438023837..bcba181a57 100644 --- a/packages/frontend/src/components/MkMediaList.vue +++ b/packages/frontend/src/components/MkMediaList.vue @@ -49,7 +49,7 @@ function calcAspectRatio() { let img = props.mediaList[0]; - if (!(img.properties.width && img.properties.height)) { + if (props.mediaList.length !== 1 || !(img.properties.width && img.properties.height)) { gallery.value.style.aspectRatio = ''; return; } @@ -57,7 +57,7 @@ function calcAspectRatio() { switch (defaultStore.state.mediaListWithOneImageAppearance) { // アスペクト比上限設定では、横長の場合は高さを縮小させる case '16_9': - gallery.value.style.aspectRatio = Math.max(16 / 9, img.properties.width / img.properties.height).toString(); + gallery.value.style.aspectRatio = Math.max(16 / 9, img.properties.width / img.properties.height).toString() + '/1'; break; default: gallery.value.style.aspectRatio = '';