Преглед на файлове

fix: Preview image is being stretched when the proportions are w… (#503)

Fixes #490. Preserves the ratio of the preview image when width / height reaches max-width/max-height
lissitz преди 5 години
родител
ревизия
dc0a4f4cb8
променени са 1 файла, в които са добавени 0 реда и са изтрити 2 реда
  1. 0 2
      src/scene/getExportCanvasPreview.ts

+ 0 - 2
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;