mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix image scaling
This commit is contained in:
parent
74111fe9ac
commit
dac11784d9
1 changed files with 10 additions and 7 deletions
|
@ -31,15 +31,18 @@
|
||||||
|
|
||||||
function getDesiredAspect(shape) {
|
function getDesiredAspect(shape) {
|
||||||
|
|
||||||
switch (shape) {
|
if (shape) {
|
||||||
|
shape = shape.toLowerCase();
|
||||||
case 'square':
|
if (shape.indexOf('portrait') != -1) {
|
||||||
return 1;
|
|
||||||
case 'backdrop':
|
|
||||||
return (16 / 9);
|
|
||||||
case 'portrait':
|
|
||||||
return (2 / 3);
|
return (2 / 3);
|
||||||
}
|
}
|
||||||
|
if (shape.indexOf('backdrop') != -1) {
|
||||||
|
return (16 / 9);
|
||||||
|
}
|
||||||
|
if (shape.indexOf('square') != -1) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue