You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2020/04/01 13:34:19 UTC
[incubator-echarts] branch next updated: refact: fix tree visual.
fix treemap roam not update caused by refactor
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/next by this push:
new beeac98 refact: fix tree visual. fix treemap roam not update caused by refactor
beeac98 is described below
commit beeac989d5214d2953144fb4e53ee75f232999f0
Author: pissang <bm...@gmail.com>
AuthorDate: Wed Apr 1 21:33:46 2020 +0800
refact: fix tree visual. fix treemap roam not update caused by refactor
---
src/chart/tree.ts | 2 +-
src/chart/treemap/TreemapView.ts | 5 +++--
src/chart/treemap/treemapAction.ts | 7 +++++--
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/chart/tree.ts b/src/chart/tree.ts
index 52b14c5..4dd7310 100644
--- a/src/chart/tree.ts
+++ b/src/chart/tree.ts
@@ -27,4 +27,4 @@ import treeLayout from './tree/treeLayout';
import treeVisual from './tree/treeVisual';
echarts.registerLayout(treeLayout);
-echarts.registerLayout(treeVisual);
+echarts.registerVisual(treeVisual);
diff --git a/src/chart/treemap/TreemapView.ts b/src/chart/treemap/TreemapView.ts
index 8111b91..370ccc6 100644
--- a/src/chart/treemap/TreemapView.ts
+++ b/src/chart/treemap/TreemapView.ts
@@ -525,7 +525,7 @@ class TreemapView extends ChartView {
x: rootLayout.x + e.dx, y: rootLayout.y + e.dy,
width: rootLayout.width, height: rootLayout.height
}
- });
+ } as TreemapMovePayload);
}
}
@@ -575,7 +575,7 @@ class TreemapView extends ChartView {
x: rect.x, y: rect.y,
width: rect.width, height: rect.height
}
- });
+ } as TreemapRenderPayload);
}
}
@@ -805,6 +805,7 @@ function renderNode(
// x,y are not set when el is above view root.
group.x = thisLayout.x || 0;
group.y = thisLayout.y || 0;
+ group.markRedraw();
inner(group).nodeWidth = thisWidth;
inner(group).nodeHeight = thisHeight;
diff --git a/src/chart/treemap/treemapAction.ts b/src/chart/treemap/treemapAction.ts
index 72c0894..61b19f5 100644
--- a/src/chart/treemap/treemapAction.ts
+++ b/src/chart/treemap/treemapAction.ts
@@ -23,6 +23,7 @@ import * as helper from '../helper/treeHelper';
import { Payload } from '../../util/types';
import TreemapSeriesModel from './TreemapSeries';
import { TreeNode } from '../../data/Tree';
+import { RectLike } from 'zrender/src/core/BoundingRect';
const noop = function () {};
@@ -36,10 +37,12 @@ export interface TreemapZoomToNodePayload extends Payload {
type: 'treemapZoomToNode'
}
export interface TreemapRenderPayload extends Payload {
- type: 'treemapRender'
+ type: 'treemapRender',
+ rootRect?: RectLike
}
export interface TreemapMovePayload extends Payload {
- type: 'treemapMove'
+ type: 'treemapMove',
+ rootRect?: RectLike
}
export interface TreemapRootToNodePayload extends Payload {
type: 'treemapRootToNode'
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org