mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-27 21:10:20 +01:00
fix?
This commit is contained in:
parent
15be36ba55
commit
e39d832dd1
1 changed files with 2 additions and 2 deletions
|
@ -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 = '';
|
||||
|
|
Loading…
Reference in a new issue