From 880ff7b79e2a660f23c253c4ed8d9d9f9d3a9742 Mon Sep 17 00:00:00 2001 From: Aaron Date: Thu, 24 Oct 2024 15:42:19 +0800 Subject: [PATCH 1/2] fix: fix issue canvas cannot destroy --- packages/g-lite/src/utils/canvas.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/g-lite/src/utils/canvas.ts b/packages/g-lite/src/utils/canvas.ts index 6d295911a..cc8ef3310 100644 --- a/packages/g-lite/src/utils/canvas.ts +++ b/packages/g-lite/src/utils/canvas.ts @@ -15,9 +15,8 @@ export function cleanExistedCanvas( typeof container === 'string' ? document.getElementById(container) : container; - if (CANVAS_Map.has($dom)) CANVAS_Map.get($dom).destroy(cleanUp); - else CANVAS_Map.set($dom, canvas); + CANVAS_Map.set($dom, canvas); } } From 8036fd30265b4c564a2c31ac1763003b8959c4bd Mon Sep 17 00:00:00 2001 From: Aaron Date: Thu, 24 Oct 2024 15:43:38 +0800 Subject: [PATCH 2/2] chore: commit changeset --- .changeset/friendly-stingrays-buy.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/friendly-stingrays-buy.md diff --git a/.changeset/friendly-stingrays-buy.md b/.changeset/friendly-stingrays-buy.md new file mode 100644 index 000000000..396574f42 --- /dev/null +++ b/.changeset/friendly-stingrays-buy.md @@ -0,0 +1,5 @@ +--- +'@antv/g-lite': patch +--- + +fix canvas cannot destroy