diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-09-23 14:56:13 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-09-23 14:56:13 +0200 |
commit | d0ea62a51cc689d19c3be8d2c1775f2c343b914e (patch) | |
tree | d7c459a2142f49e9fa416fd699f8b263099312e4 /apps/files/js/mainfileinfodetailview.js | |
parent | ee649d58c5f82ee209ddc1812c1a896da53de707 (diff) | |
download | nextcloud-server-d0ea62a51cc689d19c3be8d2c1775f2c343b914e.tar.gz nextcloud-server-d0ea62a51cc689d19c3be8d2c1775f2c343b914e.zip |
adjust the height of the sidebar preview image when resizing the browser
Diffstat (limited to 'apps/files/js/mainfileinfodetailview.js')
-rw-r--r-- | apps/files/js/mainfileinfodetailview.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/files/js/mainfileinfodetailview.js b/apps/files/js/mainfileinfodetailview.js index 830f074f3f1..82cca0d0fb3 100644 --- a/apps/files/js/mainfileinfodetailview.js +++ b/apps/files/js/mainfileinfodetailview.js @@ -176,9 +176,7 @@ $iconDiv.removeClass('icon-loading icon-32'); var targetHeight = getTargetHeight(img); if (this.model.isImage() && targetHeight > smallPreviewSize) { - if (!isLandscape(img)) { - $container.addClass('portrait'); - } + $container.addClass(isLandscape(img)? 'landscape': 'portrait'); $container.addClass('image'); } @@ -186,7 +184,7 @@ // when we dont have a preview we show the mime icon in the error handler $iconDiv.css({ 'background-image': 'url("' + previewUrl + '")', - 'height': targetHeight + height: (isLandscape(img) && targetHeight > smallPreviewSize)? 'auto': targetHeight }); }.bind(this), error: function () { |