Fixed "fit to height" upscaling small posts

This commit is contained in:
rr- 2015-07-19 18:05:16 +02:00
parent 8db72633f6
commit b75df289e9

View file

@ -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) {