Skip to content

Commit

Permalink
[#1491] 차트 Resize > DrawChart > DrawImage 할 때 BufferCanvas의 width 또는 …
Browse files Browse the repository at this point in the history
…height가 1 보다 작으면 발생하는 에러 (#1493)

############################
[원인]
 - drawImage의 argument인 with와 height가 1보다 작으면 에러가 발생한다고 함.

[작업 내용]
 - BufferCanvas의 width 또는 height가 1보다 클 때 drawImage가 가능하도록 수정
  • Loading branch information
Mun94 committed Jul 17, 2023
1 parent 8ea2655 commit 1427777
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/chart/chart.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 1427777

Please sign in to comment.