fix image scaling

This commit is contained in:
Luke Pulverenti 2016-01-27 11:58:21 -05:00
parent 277b5941e4
commit c1400969db

View File

@ -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;
} }