Fixed "fit to height" upscaling small posts
This commit is contained in:
parent
8db72633f6
commit
b75df289e9
1 changed files with 3 additions and 0 deletions
|
@ -36,6 +36,9 @@ App.Presenters.PostContentPresenter = function(
|
|||
var ratio = originalWidth / originalHeight;
|
||||
var height = jQuery(window).height() - $wrapper.offset().top;
|
||||
var width = (height - 10) * ratio;
|
||||
if (width > originalWidth) {
|
||||
width = originalWidth;
|
||||
}
|
||||
$wrapper.css({maxWidth: width + 'px', width: ''});
|
||||
},
|
||||
'fit-width': function($wrapper) {
|
||||
|
|
Loading…
Reference in a new issue