You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by su...@apache.org on 2020/11/17 09:24:14 UTC

[incubator-echarts-examples] branch next updated: fix: fix example.

This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/incubator-echarts-examples.git


The following commit(s) were added to refs/heads/next by this push:
     new 1dd2d05  fix: fix example.
1dd2d05 is described below

commit 1dd2d054ec83523d1697c24e1b1bc7154c771e13
Author: 100pah <su...@gmail.com>
AuthorDate: Tue Nov 17 17:23:07 2020 +0800

    fix: fix example.
---
 public/data/circle-packing-with-d3.js | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/public/data/circle-packing-with-d3.js b/public/data/circle-packing-with-d3.js
index 0e70bab..4cedb94 100644
--- a/public/data/circle-packing-with-d3.js
+++ b/public/data/circle-packing-with-d3.js
@@ -12,8 +12,6 @@ $.when(
     run(res[0]);
 });
 
-var _doReset;
-
 function run(rawData) {
 
     var dataWrap = prepareData(rawData);
@@ -212,12 +210,10 @@ function initChart(seriesData, maxDepth) {
         });
     }
 
-    _doReset = drillDown;
+    // Reset: click on the blank area.
+    myChart.getZr().on('click', function (event) {
+        if (!event.target) {
+            drillDown();
+        }
+    });
 }
-
-// Control panel.
-app.config = {
-    'Reset': function () {
-        _doReset && _doReset();
-    }
-};


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org