Scale portrait images correctly

This commit is contained in:
Robin Appelman 2015-09-25 16:58:56 +02:00 committed by Morris Jobke
parent f41a38ba15
commit 222a4bd4ac
2 changed files with 2 additions and 2 deletions

View file

@ -40,7 +40,7 @@
height: auto;
}
#app-sidebar .image.landscape .thumbnail::before {
#app-sidebar .image .thumbnail::before {
content: '';
display: block;
padding-bottom: 56.25%; /* sets height of .thumbnail to 9/16 of the width */

View file

@ -186,7 +186,7 @@
// when we dont have a preview we show the mime icon in the error handler
$iconDiv.css({
'background-image': 'url("' + previewUrl + '")',
height: (isLandscape(img) && targetHeight > smallPreviewSize)? 'auto': targetHeight
height: (targetHeight > smallPreviewSize)? 'auto': targetHeight
});
}.bind(this),
error: function () {