1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Tweak max-height of square primary images

This commit is contained in:
Bill Thornton 2020-12-18 13:19:44 -05:00
parent f0792e940b
commit 900ae8dde3
2 changed files with 7 additions and 0 deletions

View file

@ -600,6 +600,9 @@ function renderPrimaryImage(page, item, apiClient) {
const imageElem = page.querySelector('#primaryImage');
imageElem.src = imageUrl;
imageElem.alt = item.Name;
if (item.PrimaryImageAspectRatio === 1) {
imageElem.classList.add('aspect-square');
}
page.querySelector('.primaryImageWrapper')?.classList.remove('hide');
}
}