From e586903f8d2fd0146aab0268ce6b697c254de6af Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Tue, 15 Feb 2022 14:52:51 -0800 Subject: [PATCH] Revert hardcode limits --- .../src/components/export/BinaryImageExporter.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/mindplot/src/components/export/BinaryImageExporter.ts b/packages/mindplot/src/components/export/BinaryImageExporter.ts index ae1bd704..3d0d7ff0 100644 --- a/packages/mindplot/src/components/export/BinaryImageExporter.ts +++ b/packages/mindplot/src/components/export/BinaryImageExporter.ts @@ -65,13 +65,14 @@ class BinaryImageExporter extends Exporter { height = (this.height * dpr); } - // Prevents an image too big. Failures seen during export in couple of browsers - if (Math.max(width, height) > BinaryImageExporter.maxAllowedSize) { - const scale = Math.max(width, height) / BinaryImageExporter.maxAllowedSize; - width /= scale; - height /= scale; - } + // // Prevents an image too big. Failures seen during export in couple of browsers + // if (Math.max(width, height) > BinaryImageExporter.maxAllowedSize) { + // const scale = Math.max(width, height) / BinaryImageExporter.maxAllowedSize; + // width /= scale; + // height /= scale; + // } + console.log(`Export size: ${width}: ${height}`); canvas.setAttribute('width', width.toFixed(0)); canvas.setAttribute('height', height.toFixed(0));