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/07/17 11:39:15 UTC
[incubator-echarts] 16/16: Merge branch 'next' into remove-component
This is an automated email from the ASF dual-hosted git repository.
sushuang pushed a commit to branch remove-component
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
commit 31544592351e68c9a1eb86e5aa9f31e7a06c1e1e
Merge: 548bf37 446f96d
Author: 100pah <su...@gmail.com>
AuthorDate: Fri Jul 17 19:29:57 2020 +0800
Merge branch 'next' into remove-component
src/chart/line/LineView.ts | 6 +++
src/chart/map/MapView.ts | 67 +++++++------------------
src/chart/parallel/ParallelView.ts | 8 ++-
src/chart/sankey/SankeyView.ts | 4 +-
src/component/axis/ParallelAxisView.ts | 3 +-
src/component/axis/parallelAxisAction.ts | 2 -
src/component/dataZoom/SliderZoomView.ts | 4 ++
src/component/dataZoom/roams.ts | 4 ++
src/component/helper/MapDraw.ts | 21 ++++----
src/component/parallel.ts | 4 +-
src/coord/radar/RadarModel.ts | 6 +--
src/echarts.ts | 18 ++++++-
src/label/LabelManager.ts | 5 +-
src/model/Global.ts | 13 +++++
src/util/graphic.ts | 84 +++++++++++++++++++-------------
src/util/types.ts | 13 +++++
16 files changed, 152 insertions(+), 110 deletions(-)
diff --cc src/model/Global.ts
index 6328032,d0cf090..9073aab
--- a/src/model/Global.ts
+++ b/src/model/Global.ts
@@@ -412,23 -323,21 +417,31 @@@ class GlobalModel extends Model<ECUnitO
return this._theme;
}
+ setUpdatePayload(payload: Payload) {
+ this._payload = payload;
+ }
+
+ getUpdatePayload(): Payload {
+ return this._payload;
+ }
+
/**
- * @param idx 0 by default
+ * @param idx If not specified, return the first one.
*/
- getComponent(mainType: string, idx?: number): ComponentModel {
+ getComponent(mainType: ComponentMainType, idx?: number): ComponentModel {
const list = this._componentsMap.get(mainType);
if (list) {
- return list[idx || 0];
+ const cmpt = list[idx || 0];
+ if (cmpt) {
+ return cmpt;
+ }
+ else if (idx == null) {
+ for (let i = 0; i < list.length; i++) {
+ if (list[i]) {
+ return list[i];
+ }
+ }
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org