mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
Fixed "fit to height" upscaling small posts
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user