From 14277774983ebfcac892fe5b06b6312a4ec8c8b4 Mon Sep 17 00:00:00 2001 From: Mun94 Date: Mon, 17 Jul 2023 10:29:12 +0900 Subject: [PATCH] =?UTF-8?q?[#1491]=20=EC=B0=A8=ED=8A=B8=20Resize=20>=20Dra?= =?UTF-8?q?wChart=20>=20DrawImage=20=ED=95=A0=20=EB=95=8C=20BufferCanvas?= =?UTF-8?q?=EC=9D=98=20width=20=EB=98=90=EB=8A=94=20height=EA=B0=80=201=20?= =?UTF-8?q?=EB=B3=B4=EB=8B=A4=20=EC=9E=91=EC=9C=BC=EB=A9=B4=20=EB=B0=9C?= =?UTF-8?q?=EC=83=9D=ED=95=98=EB=8A=94=20=EC=97=90=EB=9F=AC=20(#1493)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ############################ [원인] - drawImage의 argument인 with와 height가 1보다 작으면 에러가 발생한다고 함. [작업 내용] - BufferCanvas의 width 또는 height가 1보다 클 때 drawImage가 가능하도록 수정 --- src/components/chart/chart.core.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/chart/chart.core.js b/src/components/chart/chart.core.js index a399f8800..495f76b1c 100644 --- a/src/components/chart/chart.core.js +++ b/src/components/chart/chart.core.js @@ -189,7 +189,11 @@ class EvChart { this.drawTip(); - if (this.bufferCanvas) { + if ( + this.bufferCanvas + && this.bufferCanvas?.width > 1 + && this.bufferCanvas?.height > 1 + ) { this.displayCtx.drawImage(this.bufferCanvas, 0, 0); } }