#2284 fix aspect ratio with "resize to window"

For some reason the height is getting scaled twice for ugoira, causing a
messed up aspect ratio because it was relative to the current height.
This makes it relative to the original height, so it should always be
correct even after multiple scales.
This commit is contained in:
Toks
2014-10-26 11:34:57 -04:00
parent 37e33cb7f2
commit bb0adfb00b

View File

@@ -358,8 +358,8 @@
if ($img.width() > client_width) {
var ratio = client_width / $img.width();
$img.data("scale_factor", ratio);
$img.css("width", $img.width() * ratio);
$img.css("height", $img.height() * ratio);
$img.css("width", $img.data("original_width") * ratio);
$img.css("height", $img.data("original_height") * ratio);
}
} else {
$img.data("scale_factor", 1);