mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 11:28:23 -07:00
fix image scaling
This commit is contained in:
parent
277b5941e4
commit
c1400969db
@ -31,14 +31,17 @@
|
||||
|
||||
function getDesiredAspect(shape) {
|
||||
|
||||
switch (shape) {
|
||||
|
||||
case 'square':
|
||||
return 1;
|
||||
case 'backdrop':
|
||||
return (16 / 9);
|
||||
case 'portrait':
|
||||
if (shape) {
|
||||
shape = shape.toLowerCase();
|
||||
if (shape.indexOf('portrait') != -1) {
|
||||
return (2 / 3);
|
||||
}
|
||||
if (shape.indexOf('backdrop') != -1) {
|
||||
return (16 / 9);
|
||||
}
|
||||
if (shape.indexOf('square') != -1) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user