From 3c3d88613a462138b84c2b0cfcc6fd8d57c1fbee Mon Sep 17 00:00:00 2001 From: "huangtong.ht" Date: Mon, 30 Jul 2018 11:06:53 +0800 Subject: [PATCH 1/2] fix mapper destroy bug --- demos/gallery-graphanalyzer.html | 5 ++++- plugins/tool.mapper/index.js | 4 +--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/demos/gallery-graphanalyzer.html b/demos/gallery-graphanalyzer.html index c13d3be2ef..837c88c824 100644 --- a/demos/gallery-graphanalyzer.html +++ b/demos/gallery-graphanalyzer.html @@ -94,13 +94,16 @@ modes: { default: ['panCanvas', 'wheelZoom'] }, - height: 600, + height: 500, }); graph.read(data); const minimap = document.getElementById('minimap'); const legend = document.getElementById('legend'); if (minimap !== undefined) minimap.style.display = 'none'; if (legend !== undefined) legend.style.display = 'none'; + setTimeout(()=>{ + graph.destroy(); + }, 1000) }); diff --git a/plugins/tool.mapper/index.js b/plugins/tool.mapper/index.js index b7f9e69746..727ea5f6ce 100644 --- a/plugins/tool.mapper/index.js +++ b/plugins/tool.mapper/index.js @@ -475,9 +475,7 @@ class Plugin { } } destroy() { - this.legend.destroy(); - this.legendCanvas.destroy(); - this.scale.destroy(); + this.legendCanvas && this.legendCanvas.destroy(); } } From 28e31cfa354721049c2dfd0812450c0b1f3038a5 Mon Sep 17 00:00:00 2001 From: "huangtong.ht" Date: Mon, 30 Jul 2018 11:08:33 +0800 Subject: [PATCH 2/2] publish 2.0.5-beta.9 --- src/version.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.js b/src/version.js index 66ffd88866..ddf41140e5 100755 --- a/src/version.js +++ b/src/version.js @@ -1 +1 @@ -module.exports = '2.0.5-beta.8'; +module.exports = '2.0.5-beta.9';