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

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

commit abc092fb7c92d0fde7be0a5e8a7c264d938cac2e
Author: sushuang <[email protected]>
AuthorDate: Tue May 29 22:50:58 2018 +0800

    Rename roam controller event for tree.
---
 src/chart/tree/TreeView.js | 18 +++++++++---------
 test/tree-image.html       |  2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/chart/tree/TreeView.js b/src/chart/tree/TreeView.js
index fbc56f7..6267723 100644
--- a/src/chart/tree/TreeView.js
+++ b/src/chart/tree/TreeView.js
@@ -199,23 +199,23 @@ export default echarts.extendChartView({
         controllerHost.zoom = seriesModel.coordinateSystem.getZoom();
 
         controller.off('pan').off('zoom')
-            .on('pan', function (dx, dy) {
-                roamHelper.updateViewOnPan(controllerHost, dx, dy);
+            .on('pan', function (e) {
+                roamHelper.updateViewOnPan(controllerHost, e.dx, e.dy);
                 api.dispatchAction({
                     seriesId: seriesModel.id,
                     type: 'treeRoam',
-                    dx: dx,
-                    dy: dy
+                    dx: e.dx,
+                    dy: e.dy
                 });
             }, this)
-            .on('zoom', function (zoom, mouseX, mouseY) {
-                roamHelper.updateViewOnZoom(controllerHost, zoom, mouseX, 
mouseY);
+            .on('zoom', function (e) {
+                roamHelper.updateViewOnZoom(controllerHost, e.scale, 
e.originX, e.originY);
                 api.dispatchAction({
                     seriesId: seriesModel.id,
                     type: 'treeRoam',
-                    zoom: zoom,
-                    originX: mouseX,
-                    originY: mouseY
+                    zoom: e.scale,
+                    originX: e.originX,
+                    originY: e.originY
                 });
                 this._updateNodeAndLinkScale(seriesModel);
             }, this);
diff --git a/test/tree-image.html b/test/tree-image.html
index 554280d..21af666 100644
--- a/test/tree-image.html
+++ b/test/tree-image.html
@@ -65,7 +65,7 @@ under the License.
                                     type: 'tree',
 
                                     data: [data],
-
+                                    roam: true,
                                     top: '1%',
                                     left: '7%',
                                     bottom: '1%',

-- 
To stop receiving notification emails like this one, please contact
[email protected].

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to