From 61c5fec01527b34f3d9467b9db21b1fe611bb559 Mon Sep 17 00:00:00 2001 From: Atalya Alon Date: Thu, 31 Oct 2024 23:59:51 +0200 Subject: [PATCH] change to const canvas height and width in download --- src/services/to-image.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/to-image.service.ts b/src/services/to-image.service.ts index a768810d..9df71170 100644 --- a/src/services/to-image.service.ts +++ b/src/services/to-image.service.ts @@ -17,8 +17,8 @@ export const widgetToImageH2I = (fileName: string, widgetElement: HTMLElement) = // https://github.com/bubkoo/html-to-image const usingHtml2Image = (fileName: string, widgetElement: HTMLElement, scale = DEFAULT_SCALE) => { - const canvasWidth = widgetElement.offsetWidth * scale; - const canvasHeight = widgetElement.offsetHeight * scale; + const canvasWidth = 3300; + const canvasHeight = 3300; htmlToImage.toPng(widgetElement, { canvasWidth,