From dc0a4f4cb8bf85a541a9a1a85c7cf60dfac362c9 Mon Sep 17 00:00:00 2001 From: lissitz <53315888+lissitz@users.noreply.github.com> Date: Wed, 22 Jan 2020 11:09:49 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20Preview=20image=20is=20being=20stretched?= =?UTF-8?q?=20when=20the=20proportions=20are=20w=E2=80=A6=20(#503)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #490. Preserves the ratio of the preview image when width / height reaches max-width/max-height --- src/scene/getExportCanvasPreview.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/scene/getExportCanvasPreview.ts b/src/scene/getExportCanvasPreview.ts index 75b66f03..a25c50c6 100644 --- a/src/scene/getExportCanvasPreview.ts +++ b/src/scene/getExportCanvasPreview.ts @@ -21,8 +21,6 @@ export function getExportCanvasPreview( height ) { const tempCanvas = document.createElement("canvas"); - tempCanvas.style.width = width + "px"; - tempCanvas.style.height = height + "px"; tempCanvas.width = width * scale; tempCanvas.height = height * scale; return tempCanvas;