From d84de29031bad01eb625f2bcfdc432695cd5db18 Mon Sep 17 00:00:00 2001 From: Erik Tiekstra Date: Thu, 1 Jun 2017 06:54:57 +0200 Subject: [PATCH] Fixed issue with smaller heights --- src/js/components/ImageEditor/Canvas.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/components/ImageEditor/Canvas.js b/src/js/components/ImageEditor/Canvas.js index 0ac2411..25e9788 100644 --- a/src/js/components/ImageEditor/Canvas.js +++ b/src/js/components/ImageEditor/Canvas.js @@ -163,7 +163,7 @@ var Canvas = fabric.util.createClass(fabric.Canvas, { var maxWidth = this.getWidth() - 100; img.scaleToHeight(maxHeight < img.height ? maxHeight : img.height); - img.scaleToWidth(maxWidth < (img.width * img.scaleX) ? maxWidth : img.width); + img.scaleToWidth(maxWidth < (img.width * img.scaleX) ? maxWidth : img.width * img.scaleX); return img; },