echarts 3.5.1 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -18
- package/README.md +10 -0
- package/dist/echarts.common.js +11010 -9830
- package/dist/echarts.common.min.js +13 -13
- package/dist/echarts.js +13291 -10852
- package/dist/echarts.min.js +22 -21
- package/dist/echarts.simple.js +9904 -8990
- package/dist/echarts.simple.min.js +9 -10
- package/index.js +1 -0
- package/lib/ExtensionAPI.js +2 -4
- package/lib/chart/bar/BarView.js +141 -49
- package/lib/chart/bar/BaseBarSeries.js +2 -6
- package/lib/chart/bar.js +1 -0
- package/lib/chart/boxplot/BoxplotSeries.js +1 -1
- package/lib/chart/boxplot/boxplotLayout.js +23 -7
- package/lib/chart/candlestick/CandlestickSeries.js +3 -22
- package/lib/chart/candlestick/candlestickLayout.js +23 -7
- package/lib/chart/custom.js +442 -0
- package/lib/chart/funnel/funnelLayout.js +10 -3
- package/lib/chart/gauge/GaugeView.js +1 -1
- package/lib/chart/graph/GraphView.js +15 -9
- package/lib/chart/graph/categoryVisual.js +3 -2
- package/lib/chart/heatmap/HeatmapLayer.js +1 -1
- package/lib/chart/heatmap/HeatmapView.js +75 -73
- package/lib/chart/helper/Symbol.js +8 -31
- package/lib/chart/helper/createListFromArray.js +15 -10
- package/lib/chart/helper/labelHelper.js +48 -0
- package/lib/chart/helper/whiskerBoxCommon.js +25 -44
- package/lib/chart/map/mapDataStatistic.js +9 -8
- package/lib/chart/parallel/ParallelSeries.js +2 -0
- package/lib/chart/parallel/ParallelView.js +13 -12
- package/lib/chart/parallel/parallelVisual.js +9 -1
- package/lib/chart/pie/pieLayout.js +25 -17
- package/lib/chart/radar/RadarSeries.js +1 -1
- package/lib/chart/sankey/sankeyLayout.js +1 -1
- package/lib/chart/scatter/ScatterSeries.js +2 -3
- package/lib/chart/themeRiver/ThemeRiverSeries.js +6 -5
- package/lib/chart/themeRiver/themeRiverVisual.js +1 -1
- package/lib/chart/treemap/TreemapSeries.js +3 -3
- package/lib/chart/treemap/TreemapView.js +1 -1
- package/lib/chart/treemap/treemapLayout.js +6 -1
- package/lib/component/axis/AxisBuilder.js +53 -34
- package/lib/component/axis/ParallelAxisView.js +45 -37
- package/lib/component/axisPointer/AxisPointerModel.js +1 -1
- package/lib/component/axisPointer/BaseAxisPointer.js +20 -15
- package/lib/component/axisPointer/CartesianAxisPointer.js +9 -6
- package/lib/component/axisPointer/PolarAxisPointer.js +10 -8
- package/lib/component/axisPointer/SingleAxisPointer.js +11 -7
- package/lib/component/axisPointer/axisTrigger.js +87 -72
- package/lib/component/axisPointer/viewHelper.js +6 -3
- package/lib/component/axisPointer.js +2 -2
- package/lib/component/brush/BrushModel.js +6 -4
- package/lib/component/brush/BrushView.js +1 -1
- package/lib/component/brush/visualEncoding.js +6 -4
- package/lib/component/calendar/CalendarView.js +5 -5
- package/lib/component/dataZoom/AxisProxy.js +76 -13
- package/lib/component/dataZoom/DataZoomModel.js +21 -5
- package/lib/component/dataZoom/InsideZoomModel.js +4 -1
- package/lib/component/dataZoom/InsideZoomView.js +17 -27
- package/lib/component/dataZoom/SliderZoomView.js +63 -26
- package/lib/component/dataZoom/roams.js +9 -4
- package/lib/component/graphic.js +13 -12
- package/lib/component/helper/BrushController.js +75 -114
- package/lib/component/helper/BrushTargetManager.js +16 -8
- package/lib/component/helper/MapDraw.js +25 -11
- package/lib/component/helper/RoamController.js +111 -139
- package/lib/component/helper/brushHelper.js +25 -213
- package/lib/component/helper/cursorHelper.js +21 -0
- package/lib/component/helper/roamHelper.js +54 -0
- package/lib/component/helper/selectableMixin.js +7 -7
- package/lib/component/helper/sliderMove.js +66 -37
- package/lib/component/legend/LegendView.js +6 -6
- package/lib/component/legend/legendAction.js +1 -1
- package/lib/component/marker/MarkAreaView.js +3 -6
- package/lib/component/marker/MarkLineView.js +3 -5
- package/lib/component/marker/MarkPointView.js +3 -5
- package/lib/component/marker/MarkerView.js +10 -12
- package/lib/component/marker/markerHelper.js +1 -1
- package/lib/component/parallel.js +94 -29
- package/lib/component/polar.js +5 -0
- package/lib/component/timeline/SliderTimelineView.js +1 -1
- package/lib/component/toolbox/feature/Brush.js +7 -0
- package/lib/component/toolbox/feature/DataZoom.js +17 -4
- package/lib/component/tooltip/TooltipView.js +92 -20
- package/lib/component/visualMap/ContinuousView.js +6 -4
- package/lib/coord/Axis.js +34 -2
- package/lib/coord/axisDefault.js +4 -1
- package/lib/coord/axisHelper.js +32 -26
- package/lib/coord/axisModelCommonMixin.js +1 -1
- package/lib/coord/calendar/Calendar.js +14 -17
- package/lib/coord/calendar/prepareCustom.js +31 -0
- package/lib/coord/cartesian/Axis2D.js +0 -12
- package/lib/coord/cartesian/Cartesian2D.js +1 -0
- package/lib/coord/cartesian/Grid.js +5 -2
- package/lib/coord/cartesian/prepareCustom.js +36 -0
- package/lib/coord/geo/Geo.js +9 -14
- package/lib/coord/geo/GeoModel.js +5 -5
- package/lib/coord/geo/geoCreator.js +3 -3
- package/lib/coord/geo/parseGeoJson.js +11 -4
- package/lib/coord/geo/prepareCustom.js +36 -0
- package/lib/coord/parallel/Parallel.js +225 -101
- package/lib/coord/parallel/ParallelModel.js +7 -1
- package/lib/coord/polar/Polar.js +2 -1
- package/lib/coord/polar/prepareCustom.js +53 -0
- package/lib/coord/single/Single.js +9 -8
- package/lib/coord/single/SingleAxis.js +0 -27
- package/lib/coord/single/prepareCustom.js +33 -0
- package/lib/data/DataDiffer.js +2 -1
- package/lib/data/Graph.js +11 -7
- package/lib/data/List.js +59 -20
- package/lib/data/helper/completeDimensions.js +184 -23
- package/lib/echarts.js +68 -36
- package/lib/helper.js +1 -8
- package/lib/layout/barGrid.js +91 -19
- package/lib/layout/barPolar.js +286 -0
- package/lib/layout/points.js +22 -16
- package/lib/model/Global.js +34 -31
- package/lib/model/Series.js +41 -29
- package/lib/model/globalDefault.js +4 -1
- package/lib/model/mixin/colorPalette.js +2 -1
- package/lib/model/mixin/textStyle.js +7 -13
- package/lib/scale/Interval.js +46 -76
- package/lib/scale/Log.js +5 -7
- package/lib/scale/Scale.js +10 -1
- package/lib/scale/Time.js +34 -12
- package/lib/scale/helper.js +93 -0
- package/lib/util/format.js +20 -9
- package/lib/util/graphic.js +70 -8
- package/lib/util/layout.js +7 -3
- package/lib/util/model.js +63 -7
- package/lib/util/number.js +59 -19
- package/lib/util/throttle.js +14 -3
- package/map/js/world.js +1 -1
- package/map/json/world.json +1 -1
- package/package.json +3 -3
- package/src/ExtensionAPI.js +2 -4
- package/src/chart/bar/BarView.js +141 -49
- package/src/chart/bar/BaseBarSeries.js +2 -6
- package/src/chart/bar.js +1 -0
- package/src/chart/boxplot/BoxplotSeries.js +1 -1
- package/src/chart/boxplot/boxplotLayout.js +23 -7
- package/src/chart/candlestick/CandlestickSeries.js +3 -22
- package/src/chart/candlestick/candlestickLayout.js +23 -7
- package/src/chart/custom.js +442 -0
- package/src/chart/funnel/funnelLayout.js +10 -4
- package/src/chart/gauge/GaugeView.js +1 -1
- package/src/chart/graph/GraphView.js +15 -9
- package/src/chart/graph/categoryVisual.js +3 -2
- package/src/chart/heatmap/HeatmapLayer.js +1 -1
- package/src/chart/heatmap/HeatmapView.js +75 -73
- package/src/chart/helper/Symbol.js +8 -31
- package/src/chart/helper/createListFromArray.js +15 -10
- package/src/chart/helper/labelHelper.js +49 -0
- package/src/chart/helper/whiskerBoxCommon.js +25 -44
- package/src/chart/map/mapDataStatistic.js +9 -8
- package/src/chart/parallel/ParallelSeries.js +2 -0
- package/src/chart/parallel/ParallelView.js +13 -12
- package/src/chart/parallel/parallelVisual.js +9 -1
- package/src/chart/pie/pieLayout.js +25 -17
- package/src/chart/radar/RadarSeries.js +1 -1
- package/src/chart/sankey/sankeyLayout.js +1 -1
- package/src/chart/scatter/ScatterSeries.js +2 -3
- package/src/chart/themeRiver/ThemeRiverSeries.js +6 -5
- package/src/chart/themeRiver/themeRiverVisual.js +1 -1
- package/src/chart/treemap/TreemapSeries.js +3 -3
- package/src/chart/treemap/TreemapView.js +1 -1
- package/src/chart/treemap/treemapLayout.js +6 -1
- package/src/component/axis/AxisBuilder.js +53 -34
- package/src/component/axis/ParallelAxisView.js +45 -37
- package/src/component/axisPointer/AxisPointerModel.js +1 -1
- package/src/component/axisPointer/BaseAxisPointer.js +20 -15
- package/src/component/axisPointer/CartesianAxisPointer.js +9 -6
- package/src/component/axisPointer/PolarAxisPointer.js +10 -8
- package/src/component/axisPointer/SingleAxisPointer.js +11 -7
- package/src/component/axisPointer/axisTrigger.js +87 -72
- package/src/component/axisPointer/viewHelper.js +6 -3
- package/src/component/axisPointer.js +2 -2
- package/src/component/brush/BrushModel.js +6 -4
- package/src/component/brush/BrushView.js +1 -1
- package/src/component/brush/visualEncoding.js +6 -4
- package/src/component/calendar/CalendarView.js +5 -5
- package/src/component/dataZoom/AxisProxy.js +76 -13
- package/src/component/dataZoom/DataZoomModel.js +21 -5
- package/src/component/dataZoom/InsideZoomModel.js +4 -1
- package/src/component/dataZoom/InsideZoomView.js +17 -27
- package/src/component/dataZoom/SliderZoomView.js +63 -26
- package/src/component/dataZoom/roams.js +9 -4
- package/src/component/graphic.js +13 -12
- package/src/component/helper/BrushController.js +75 -114
- package/src/component/helper/BrushTargetManager.js +16 -8
- package/src/component/helper/MapDraw.js +25 -11
- package/src/component/helper/RoamController.js +111 -139
- package/src/component/helper/brushHelper.js +41 -0
- package/src/component/helper/cursorHelper.js +22 -0
- package/src/component/helper/roamHelper.js +55 -0
- package/src/component/helper/selectableMixin.js +7 -7
- package/src/component/helper/sliderMove.js +66 -37
- package/src/component/legend/LegendView.js +6 -6
- package/src/component/legend/legendAction.js +1 -1
- package/src/component/marker/MarkAreaView.js +3 -6
- package/src/component/marker/MarkLineView.js +3 -5
- package/src/component/marker/MarkPointView.js +3 -5
- package/src/component/marker/MarkerView.js +10 -12
- package/src/component/marker/markerHelper.js +1 -1
- package/src/component/parallel.js +94 -29
- package/src/component/polar.js +5 -0
- package/src/component/timeline/SliderTimelineView.js +1 -1
- package/src/component/toolbox/feature/Brush.js +7 -0
- package/src/component/toolbox/feature/DataZoom.js +17 -4
- package/src/component/tooltip/TooltipView.js +92 -20
- package/src/component/visualMap/ContinuousView.js +6 -4
- package/src/coord/Axis.js +34 -2
- package/src/coord/axisDefault.js +4 -1
- package/src/coord/axisHelper.js +32 -26
- package/src/coord/axisModelCommonMixin.js +1 -1
- package/src/coord/calendar/Calendar.js +14 -17
- package/src/coord/calendar/prepareCustom.js +32 -0
- package/src/coord/cartesian/Axis2D.js +0 -12
- package/src/coord/cartesian/Cartesian2D.js +1 -0
- package/src/coord/cartesian/Grid.js +5 -2
- package/src/coord/cartesian/prepareCustom.js +37 -0
- package/src/coord/geo/Geo.js +9 -14
- package/src/coord/geo/GeoModel.js +5 -5
- package/src/coord/geo/geoCreator.js +3 -3
- package/src/coord/geo/parseGeoJson.js +11 -4
- package/src/coord/geo/prepareCustom.js +37 -0
- package/src/coord/parallel/Parallel.js +225 -101
- package/src/coord/parallel/ParallelModel.js +7 -1
- package/src/coord/polar/Polar.js +2 -1
- package/src/coord/polar/prepareCustom.js +54 -0
- package/src/coord/single/Single.js +9 -8
- package/src/coord/single/SingleAxis.js +0 -27
- package/src/coord/single/prepareCustom.js +34 -0
- package/src/data/DataDiffer.js +2 -1
- package/src/data/Graph.js +11 -7
- package/src/data/List.js +59 -20
- package/src/data/helper/completeDimensions.js +184 -23
- package/src/echarts.js +68 -36
- package/src/helper.js +1 -8
- package/src/layout/barGrid.js +91 -19
- package/src/layout/barPolar.js +287 -0
- package/src/layout/points.js +22 -16
- package/src/model/Global.js +34 -31
- package/src/model/Series.js +41 -29
- package/src/model/globalDefault.js +4 -1
- package/src/model/mixin/colorPalette.js +2 -1
- package/src/model/mixin/textStyle.js +7 -13
- package/src/scale/Interval.js +46 -76
- package/src/scale/Log.js +5 -7
- package/src/scale/Scale.js +10 -1
- package/src/scale/Time.js +34 -12
- package/src/scale/helper.js +94 -0
- package/src/util/format.js +20 -9
- package/src/util/graphic.js +70 -8
- package/src/util/layout.js +7 -3
- package/src/util/model.js +63 -7
- package/src/util/number.js +59 -19
- package/src/util/throttle.js +14 -3
- package/src/coord/cartesian/axisLabelInterval.js +0 -26
- package/theme/default.js +0 -23
- package/theme/halloween.js +0 -528
|
@@ -3,163 +3,34 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
|
|
7
6
|
var Eventful = require('zrender/lib/mixin/Eventful');
|
|
8
7
|
var zrUtil = require('zrender/lib/core/util');
|
|
9
8
|
var eventTool = require('zrender/lib/core/event');
|
|
10
9
|
var interactionMutex = require('./interactionMutex');
|
|
11
10
|
|
|
12
|
-
function mousedown(e) {
|
|
13
|
-
if (e.target && e.target.draggable) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
var x = e.offsetX;
|
|
18
|
-
var y = e.offsetY;
|
|
19
|
-
|
|
20
|
-
if (this.containsPoint && this.containsPoint(x, y)) {
|
|
21
|
-
this._x = x;
|
|
22
|
-
this._y = y;
|
|
23
|
-
this._dragging = true;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function mousemove(e) {
|
|
28
|
-
if (!this._dragging) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
eventTool.stop(e.event);
|
|
33
|
-
|
|
34
|
-
if (e.gestureEvent !== 'pinch') {
|
|
35
|
-
|
|
36
|
-
if (interactionMutex.isTaken(this._zr, 'globalPan')) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
var x = e.offsetX;
|
|
41
|
-
var y = e.offsetY;
|
|
42
|
-
|
|
43
|
-
var oldX = this._x;
|
|
44
|
-
var oldY = this._y;
|
|
45
|
-
|
|
46
|
-
var dx = x - oldX;
|
|
47
|
-
var dy = y - oldY;
|
|
48
|
-
|
|
49
|
-
this._x = x;
|
|
50
|
-
this._y = y;
|
|
51
|
-
|
|
52
|
-
var target = this.target;
|
|
53
|
-
|
|
54
|
-
if (target) {
|
|
55
|
-
var pos = target.position;
|
|
56
|
-
pos[0] += dx;
|
|
57
|
-
pos[1] += dy;
|
|
58
|
-
target.dirty();
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
eventTool.stop(e.event);
|
|
62
|
-
this.trigger('pan', dx, dy, oldX, oldY, x, y);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function mouseup(e) {
|
|
67
|
-
this._dragging = false;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function mousewheel(e) {
|
|
71
|
-
// wheelDelta maybe -0 in chrome mac.
|
|
72
|
-
if (e.wheelDelta === 0) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
// Convenience:
|
|
76
|
-
// Mac and VM Windows on Mac: scroll up: zoom out.
|
|
77
|
-
// Windows: scroll up: zoom in.
|
|
78
|
-
var zoomDelta = e.wheelDelta > 0 ? 1.1 : 1 / 1.1;
|
|
79
|
-
zoom.call(this, e, zoomDelta, e.offsetX, e.offsetY);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function pinch(e) {
|
|
83
|
-
if (interactionMutex.isTaken(this._zr, 'globalPan')) {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
var zoomDelta = e.pinchScale > 1 ? 1.1 : 1 / 1.1;
|
|
87
|
-
zoom.call(this, e, zoomDelta, e.pinchX, e.pinchY);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function zoom(e, zoomDelta, zoomX, zoomY) {
|
|
91
|
-
if (this.containsPoint && this.containsPoint(zoomX, zoomY)) {
|
|
92
|
-
// When mouse is out of roamController rect,
|
|
93
|
-
// default befavoius should be be disabled, otherwise
|
|
94
|
-
// page sliding is disabled, contrary to expectation.
|
|
95
|
-
eventTool.stop(e.event);
|
|
96
|
-
|
|
97
|
-
var target = this.target;
|
|
98
|
-
var zoomLimit = this.zoomLimit;
|
|
99
|
-
|
|
100
|
-
if (target) {
|
|
101
|
-
var pos = target.position;
|
|
102
|
-
var scale = target.scale;
|
|
103
|
-
|
|
104
|
-
var newZoom = this.zoom = this.zoom || 1;
|
|
105
|
-
newZoom *= zoomDelta;
|
|
106
|
-
if (zoomLimit) {
|
|
107
|
-
var zoomMin = zoomLimit.min || 0;
|
|
108
|
-
var zoomMax = zoomLimit.max || Infinity;
|
|
109
|
-
newZoom = Math.max(
|
|
110
|
-
Math.min(zoomMax, newZoom),
|
|
111
|
-
zoomMin
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
var zoomScale = newZoom / this.zoom;
|
|
115
|
-
this.zoom = newZoom;
|
|
116
|
-
// Keep the mouse center when scaling
|
|
117
|
-
pos[0] -= (zoomX - pos[0]) * (zoomScale - 1);
|
|
118
|
-
pos[1] -= (zoomY - pos[1]) * (zoomScale - 1);
|
|
119
|
-
scale[0] *= zoomScale;
|
|
120
|
-
scale[1] *= zoomScale;
|
|
121
|
-
|
|
122
|
-
target.dirty();
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
this.trigger('zoom', zoomDelta, zoomX, zoomY);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
11
|
/**
|
|
130
12
|
* @alias module:echarts/component/helper/RoamController
|
|
131
13
|
* @constructor
|
|
132
14
|
* @mixin {module:zrender/mixin/Eventful}
|
|
133
15
|
*
|
|
134
16
|
* @param {module:zrender/zrender~ZRender} zr
|
|
135
|
-
* @param {module:zrender/Element} target
|
|
136
17
|
*/
|
|
137
|
-
function RoamController(zr
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* @type {module:zrender/Element}
|
|
141
|
-
*/
|
|
142
|
-
this.target = target;
|
|
18
|
+
function RoamController(zr) {
|
|
143
19
|
|
|
144
20
|
/**
|
|
145
21
|
* @type {Function}
|
|
146
22
|
*/
|
|
147
|
-
this.
|
|
23
|
+
this.pointerChecker;
|
|
148
24
|
|
|
149
25
|
/**
|
|
150
|
-
* {
|
|
151
|
-
* @type {Object}
|
|
26
|
+
* @type {module:zrender}
|
|
152
27
|
*/
|
|
153
|
-
this.
|
|
28
|
+
this._zr = zr;
|
|
154
29
|
|
|
155
30
|
/**
|
|
156
|
-
* @type {
|
|
157
|
-
*/
|
|
158
|
-
this.zoom;
|
|
159
|
-
/**
|
|
160
|
-
* @type {module:zrender}
|
|
31
|
+
* @type {Object}
|
|
161
32
|
*/
|
|
162
|
-
this.
|
|
33
|
+
this._opt = {};
|
|
163
34
|
|
|
164
35
|
// Avoid two roamController bind the same handler
|
|
165
36
|
var bind = zrUtil.bind;
|
|
@@ -172,12 +43,12 @@
|
|
|
172
43
|
Eventful.call(this);
|
|
173
44
|
|
|
174
45
|
/**
|
|
175
|
-
* @param {Function}
|
|
46
|
+
* @param {Function} pointerChecker
|
|
176
47
|
* input: x, y
|
|
177
48
|
* output: boolean
|
|
178
49
|
*/
|
|
179
|
-
this.
|
|
180
|
-
this.
|
|
50
|
+
this.setPointerChecker = function (pointerChecker) {
|
|
51
|
+
this.pointerChecker = pointerChecker;
|
|
181
52
|
};
|
|
182
53
|
|
|
183
54
|
/**
|
|
@@ -188,11 +59,22 @@
|
|
|
188
59
|
* @param {boolean|string} [controlType=true] Specify the control type,
|
|
189
60
|
* which can be null/undefined or true/false
|
|
190
61
|
* or 'pan/move' or 'zoom'/'scale'
|
|
62
|
+
* @param {Object} [opt]
|
|
63
|
+
* @param {Object} [opt.zoomOnMouseWheel=true]
|
|
64
|
+
* @param {Object} [opt.moveOnMouseMove=true]
|
|
65
|
+
* @param {Object} [opt.preventDefaultMouseMove=true] When pan.
|
|
191
66
|
*/
|
|
192
|
-
this.enable = function (controlType) {
|
|
67
|
+
this.enable = function (controlType, opt) {
|
|
68
|
+
|
|
193
69
|
// Disable previous first
|
|
194
70
|
this.disable();
|
|
195
71
|
|
|
72
|
+
this._opt = zrUtil.defaults(zrUtil.clone(opt) || {}, {
|
|
73
|
+
zoomOnMouseWheel: true,
|
|
74
|
+
moveOnMouseMove: true,
|
|
75
|
+
preventDefaultMouseMove: true
|
|
76
|
+
});
|
|
77
|
+
|
|
196
78
|
if (controlType == null) {
|
|
197
79
|
controlType = true;
|
|
198
80
|
}
|
|
@@ -229,4 +111,94 @@
|
|
|
229
111
|
|
|
230
112
|
zrUtil.mixin(RoamController, Eventful);
|
|
231
113
|
|
|
114
|
+
|
|
115
|
+
function mousedown(e) {
|
|
116
|
+
if (e.target && e.target.draggable) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
var x = e.offsetX;
|
|
121
|
+
var y = e.offsetY;
|
|
122
|
+
|
|
123
|
+
// Only check on mosedown, but not mousemove.
|
|
124
|
+
// Mouse can be out of target when mouse moving.
|
|
125
|
+
if (this.pointerChecker && this.pointerChecker(e, x, y)) {
|
|
126
|
+
this._x = x;
|
|
127
|
+
this._y = y;
|
|
128
|
+
this._dragging = true;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function mousemove(e) {
|
|
133
|
+
if (!checkKeyBinding(this, 'moveOnMouseMove', e) || !this._dragging) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (e.gestureEvent === 'pinch') {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (interactionMutex.isTaken(this._zr, 'globalPan')) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
var x = e.offsetX;
|
|
146
|
+
var y = e.offsetY;
|
|
147
|
+
|
|
148
|
+
var oldX = this._x;
|
|
149
|
+
var oldY = this._y;
|
|
150
|
+
|
|
151
|
+
var dx = x - oldX;
|
|
152
|
+
var dy = y - oldY;
|
|
153
|
+
|
|
154
|
+
this._x = x;
|
|
155
|
+
this._y = y;
|
|
156
|
+
|
|
157
|
+
this._opt.preventDefaultMouseMove && eventTool.stop(e.event);
|
|
158
|
+
|
|
159
|
+
this.trigger('pan', dx, dy, oldX, oldY, x, y);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function mouseup(e) {
|
|
163
|
+
this._dragging = false;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function mousewheel(e) {
|
|
167
|
+
// wheelDelta maybe -0 in chrome mac.
|
|
168
|
+
if (!checkKeyBinding(this, 'zoomOnMouseWheel', e) || e.wheelDelta === 0) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// Convenience:
|
|
173
|
+
// Mac and VM Windows on Mac: scroll up: zoom out.
|
|
174
|
+
// Windows: scroll up: zoom in.
|
|
175
|
+
var zoomDelta = e.wheelDelta > 0 ? 1.1 : 1 / 1.1;
|
|
176
|
+
zoom.call(this, e, zoomDelta, e.offsetX, e.offsetY);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function pinch(e) {
|
|
180
|
+
if (interactionMutex.isTaken(this._zr, 'globalPan')) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
var zoomDelta = e.pinchScale > 1 ? 1.1 : 1 / 1.1;
|
|
184
|
+
zoom.call(this, e, zoomDelta, e.pinchX, e.pinchY);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function zoom(e, zoomDelta, zoomX, zoomY) {
|
|
188
|
+
if (this.pointerChecker && this.pointerChecker(e, zoomX, zoomY)) {
|
|
189
|
+
// When mouse is out of roamController rect,
|
|
190
|
+
// default befavoius should not be be disabled, otherwise
|
|
191
|
+
// page sliding is disabled, contrary to expectation.
|
|
192
|
+
eventTool.stop(e.event);
|
|
193
|
+
|
|
194
|
+
this.trigger('zoom', zoomDelta, zoomX, zoomY);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function checkKeyBinding(roamController, prop, e) {
|
|
199
|
+
var setting = roamController._opt[prop];
|
|
200
|
+
return setting
|
|
201
|
+
&& (!zrUtil.isString(setting) || e.event[setting + 'Key']);
|
|
202
|
+
}
|
|
203
|
+
|
|
232
204
|
module.exports = RoamController;
|
|
@@ -1,228 +1,40 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
var each = zrUtil.each;
|
|
3
|
+
var cursorHelper = require('./cursorHelper');
|
|
4
|
+
var BoundingRect = require('zrender/lib/core/BoundingRect');
|
|
5
|
+
var graphicUtil = require('../../util/graphic');
|
|
7
6
|
|
|
8
7
|
var helper = {};
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
each(areas, function (area, index) {
|
|
16
|
-
var panelId = area.panelId;
|
|
17
|
-
|
|
18
|
-
if (panelId) {
|
|
19
|
-
panelId = panelId.split(PANEL_ID_SPLIT);
|
|
20
|
-
|
|
21
|
-
area[panelId[0] + 'Index'] = +panelId[1];
|
|
22
|
-
|
|
23
|
-
var coordInfo = findCoordInfo(area, coordInfoList);
|
|
24
|
-
area.coordRange = coordConvert[area.brushType](
|
|
25
|
-
1, coordInfo, area.range
|
|
26
|
-
);
|
|
27
|
-
rangesCoordInfo && (rangesCoordInfo[index] = coordInfo);
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
helper.parseInputRanges = function (brushModel, ecModel) {
|
|
33
|
-
each(brushModel.areas, function (area) {
|
|
34
|
-
var coordInfo = findCoordInfo(area, brushModel.coordInfoList);
|
|
35
|
-
|
|
36
|
-
if (__DEV__) {
|
|
37
|
-
zrUtil.assert(
|
|
38
|
-
!coordInfo || coordInfo === true || area.coordRange,
|
|
39
|
-
'coordRange must be specified when coord index specified.'
|
|
40
|
-
);
|
|
41
|
-
zrUtil.assert(
|
|
42
|
-
!coordInfo || coordInfo !== true || area.range,
|
|
43
|
-
'range must be specified.'
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
area.range = area.range || [];
|
|
48
|
-
|
|
49
|
-
// convert coordRange to global range and set panelId.
|
|
50
|
-
if (coordInfo && coordInfo !== true) {
|
|
51
|
-
area.range = coordConvert[area.brushType](
|
|
52
|
-
0, coordInfo, area.coordRange
|
|
53
|
-
);
|
|
54
|
-
area.panelId = coordInfo.panelId;
|
|
55
|
-
}
|
|
56
|
-
});
|
|
9
|
+
helper.makeRectPanelClipPath = function (rect) {
|
|
10
|
+
rect = normalizeRect(rect);
|
|
11
|
+
return function (localPoints, transform) {
|
|
12
|
+
return graphicUtil.clipPointsByRect(localPoints, rect);
|
|
13
|
+
};
|
|
57
14
|
};
|
|
58
15
|
|
|
59
|
-
helper.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
var
|
|
64
|
-
var rect;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
rect = coordSys.getBoundingRect().clone();
|
|
68
|
-
// geo roam and zoom transform
|
|
69
|
-
rect.applyTransform(graphic.getTransform(coordSys));
|
|
70
|
-
}
|
|
71
|
-
else { // xAxis or yAxis
|
|
72
|
-
// grid is not Transformable.
|
|
73
|
-
rect = coordSys.grid.getRect().clone();
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
panelOpts.push({panelId: coordInfo.panelId, rect: rect});
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
return panelOpts;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* @param {Object} option {xAxisIndex, yAxisIndex, geoIndex}
|
|
84
|
-
* @param {module:echarts/model/Global} ecModel
|
|
85
|
-
* @return {Array.<Obejct>} coordInfoList
|
|
86
|
-
*/
|
|
87
|
-
helper.makeCoordInfoList = function (option, ecModel) {
|
|
88
|
-
var coordInfoList = [];
|
|
89
|
-
|
|
90
|
-
each(COMPONENT_NAMES, function (componentName) {
|
|
91
|
-
var componentIndices = option[componentName + 'Index'];
|
|
92
|
-
if (componentIndices == null || componentIndices === 'none') {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
if (componentIndices !== 'all' && !zrUtil.isArray(componentIndices)) {
|
|
96
|
-
componentIndices = [componentIndices];
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
ecModel.eachComponent({mainType: componentName}, function (componentModel, index) {
|
|
100
|
-
if (componentIndices !== 'all' && zrUtil.indexOf(componentIndices, index) < 0) {
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
var grid;
|
|
105
|
-
var coordSys;
|
|
106
|
-
|
|
107
|
-
(componentName === 'xAxis' || componentName === 'yAxis')
|
|
108
|
-
? (grid = componentModel.axis.grid)
|
|
109
|
-
: (coordSys = componentModel.coordinateSystem); // geo
|
|
110
|
-
|
|
111
|
-
var coordInfo;
|
|
112
|
-
|
|
113
|
-
// Check duplicate and find cartesian when tranval to yAxis.
|
|
114
|
-
for (var i = 0, len = coordInfoList.length; i < len; i++) {
|
|
115
|
-
var cInfo = coordInfoList[i];
|
|
116
|
-
if (__DEV__) {
|
|
117
|
-
zrUtil.assert(
|
|
118
|
-
cInfo[componentName + 'Index'] != index,
|
|
119
|
-
'Coord should not be defined duplicately: ' + componentName + index
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
// CoordSys is always required for `rect brush` or `polygon brush`.
|
|
123
|
-
// If both xAxisIndex and yAxisIndex specified, fetch cartesian by them.
|
|
124
|
-
if (componentName === 'yAxis' && !cInfo.yAxis && cInfo.xAxis) {
|
|
125
|
-
var aCoordSys = grid.getCartesian(cInfo.xAxisIndex, index);
|
|
126
|
-
if (aCoordSys) { // The yAxis and xAxis are in the same cartesian.
|
|
127
|
-
coordSys = aCoordSys;
|
|
128
|
-
coordInfo = cInfo;
|
|
129
|
-
break;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
!coordInfo && coordInfoList.push(coordInfo = {});
|
|
135
|
-
|
|
136
|
-
coordInfo[componentName] = componentModel;
|
|
137
|
-
coordInfo[componentName + 'Index'] = index;
|
|
138
|
-
// If both xAxisIndex and yAxisIndex specified, panelId only use yAxisIndex,
|
|
139
|
-
// which is enough to index panel.
|
|
140
|
-
coordInfo.panelId = componentName + PANEL_ID_SPLIT + index;
|
|
141
|
-
coordInfo.coordSys = coordSys
|
|
142
|
-
// If only xAxisIndex or only yAxisIndex specified, find its first cartesian.
|
|
143
|
-
|| grid.getCartesian(coordInfo.xAxisIndex, coordInfo.yAxisIndex);
|
|
144
|
-
|
|
145
|
-
coordInfo.coordSys
|
|
146
|
-
? (coordInfoList[componentName + 'Has'] = true)
|
|
147
|
-
: coordInfoList.pop(); // If a coordInfo exists originally, existance of coordSys is ensured.
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
return coordInfoList;
|
|
16
|
+
helper.makeLinearBrushOtherExtent = function (rect, specifiedXYIndex) {
|
|
17
|
+
rect = normalizeRect(rect);
|
|
18
|
+
return function (xyIndex) {
|
|
19
|
+
var idx = specifiedXYIndex != null ? specifiedXYIndex : xyIndex;
|
|
20
|
+
var brushWidth = idx ? rect.width : rect.height;
|
|
21
|
+
var base = idx ? rect.x : rect.y;
|
|
22
|
+
return [base, base + (brushWidth || 0)];
|
|
23
|
+
};
|
|
152
24
|
};
|
|
153
25
|
|
|
154
|
-
helper.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
26
|
+
helper.makeRectIsTargetByCursor = function (rect, api, targetModel) {
|
|
27
|
+
rect = normalizeRect(rect);
|
|
28
|
+
return function (e, localCursorPoint, transform) {
|
|
29
|
+
return rect.contain(localCursorPoint[0], localCursorPoint[1])
|
|
30
|
+
&& !cursorHelper.onIrrelevantElement(e, api, targetModel);
|
|
31
|
+
};
|
|
159
32
|
};
|
|
160
33
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
return
|
|
34
|
+
// Consider width/height is negative.
|
|
35
|
+
function normalizeRect(rect) {
|
|
36
|
+
return BoundingRect.create(rect);
|
|
164
37
|
}
|
|
165
38
|
|
|
166
|
-
/**
|
|
167
|
-
* If return Object, a coord found.
|
|
168
|
-
* If reutrn true, global found.
|
|
169
|
-
* Otherwise nothing found.
|
|
170
|
-
*
|
|
171
|
-
* @param {Object} area {<componentName>Index}
|
|
172
|
-
* @param {Array} coordInfoList
|
|
173
|
-
* @return {Obejct|boolean}
|
|
174
|
-
*/
|
|
175
|
-
function findCoordInfo(area, coordInfoList) {
|
|
176
|
-
var isGlobal = true;
|
|
177
|
-
for (var j = 0; j < COMPONENT_NAMES.length; j++) {
|
|
178
|
-
var indexAttr = COMPONENT_NAMES[j] + 'Index';
|
|
179
|
-
if (area[indexAttr] >= 0) {
|
|
180
|
-
isGlobal = false;
|
|
181
|
-
for (var i = 0; i < coordInfoList.length; i++) {
|
|
182
|
-
if (coordInfoList[i][indexAttr] === area[indexAttr]) {
|
|
183
|
-
return coordInfoList[i];
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
return isGlobal;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
function axisConvert(axisName, to, coordInfo, coordRange) {
|
|
192
|
-
var axis = coordInfo.coordSys.getAxis(axisName);
|
|
193
|
-
|
|
194
|
-
if (__DEV__) {
|
|
195
|
-
zrUtil.assert(axis, 'line brush is only available in cartesian (grid).');
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
return formatMinMax(zrUtil.map([0, 1], function (i) {
|
|
199
|
-
return to
|
|
200
|
-
? axis.coordToData(axis.toLocalCoord(coordRange[i]))
|
|
201
|
-
: axis.toGlobalCoord(axis.dataToCoord(coordRange[i]));
|
|
202
|
-
}));
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
var coordConvert = {
|
|
206
|
-
|
|
207
|
-
lineX: zrUtil.curry(axisConvert, 'x'),
|
|
208
|
-
|
|
209
|
-
lineY: zrUtil.curry(axisConvert, 'y'),
|
|
210
|
-
|
|
211
|
-
rect: function (to, coordInfo, coordRange) {
|
|
212
|
-
var coordSys = coordInfo.coordSys;
|
|
213
|
-
var xminymin = coordSys[COORD_CONVERTS[to]]([coordRange[0][0], coordRange[1][0]]);
|
|
214
|
-
var xmaxymax = coordSys[COORD_CONVERTS[to]]([coordRange[0][1], coordRange[1][1]]);
|
|
215
|
-
return [
|
|
216
|
-
formatMinMax([xminymin[0], xmaxymax[0]]),
|
|
217
|
-
formatMinMax([xminymin[1], xmaxymax[1]])
|
|
218
|
-
];
|
|
219
|
-
},
|
|
220
|
-
|
|
221
|
-
polygon: function (to, coordInfo, coordRange) {
|
|
222
|
-
var coordSys = coordInfo.coordSys;
|
|
223
|
-
return zrUtil.map(coordRange, coordSys[COORD_CONVERTS[to]], coordSys);
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
|
|
227
39
|
module.exports = helper;
|
|
228
40
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
var helper = {};
|
|
4
|
+
|
|
5
|
+
var IRRELEVANT_EXCLUDES = {'axisPointer': 1, 'tooltip': 1, 'brush': 1};
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Avoid that: mouse click on a elements that is over geo or graph,
|
|
9
|
+
* but roam is triggered.
|
|
10
|
+
*/
|
|
11
|
+
helper.onIrrelevantElement = function (e, api, targetCoordSysModel) {
|
|
12
|
+
var model = api.getComponentByElement(e.topTarget);
|
|
13
|
+
// If model is axisModel, it works only if it is injected with coordinateSystem.
|
|
14
|
+
var coordSys = model && model.coordinateSystem;
|
|
15
|
+
return model
|
|
16
|
+
&& model !== targetCoordSysModel
|
|
17
|
+
&& !IRRELEVANT_EXCLUDES[model.mainType]
|
|
18
|
+
&& (coordSys && coordSys.model !== targetCoordSysModel);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
module.exports = helper;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
var helper = {};
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* For geo and graph.
|
|
7
|
+
*
|
|
8
|
+
* @param {Object} controllerHost
|
|
9
|
+
* @param {module:zrender/Element} controllerHost.target
|
|
10
|
+
*/
|
|
11
|
+
helper.updateViewOnPan = function (controllerHost, dx, dy) {
|
|
12
|
+
var target = controllerHost.target;
|
|
13
|
+
var pos = target.position;
|
|
14
|
+
pos[0] += dx;
|
|
15
|
+
pos[1] += dy;
|
|
16
|
+
target.dirty();
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* For geo and graph.
|
|
21
|
+
*
|
|
22
|
+
* @param {Object} controllerHost
|
|
23
|
+
* @param {module:zrender/Element} controllerHost.target
|
|
24
|
+
* @param {number} controllerHost.zoom
|
|
25
|
+
* @param {number} controllerHost.zoomLimit like: {min: 1, max: 2}
|
|
26
|
+
*/
|
|
27
|
+
helper.updateViewOnZoom = function (controllerHost, zoomDelta, zoomX, zoomY) {
|
|
28
|
+
var target = controllerHost.target;
|
|
29
|
+
var zoomLimit = controllerHost.zoomLimit;
|
|
30
|
+
var pos = target.position;
|
|
31
|
+
var scale = target.scale;
|
|
32
|
+
|
|
33
|
+
var newZoom = controllerHost.zoom = controllerHost.zoom || 1;
|
|
34
|
+
newZoom *= zoomDelta;
|
|
35
|
+
if (zoomLimit) {
|
|
36
|
+
var zoomMin = zoomLimit.min || 0;
|
|
37
|
+
var zoomMax = zoomLimit.max || Infinity;
|
|
38
|
+
newZoom = Math.max(
|
|
39
|
+
Math.min(zoomMax, newZoom),
|
|
40
|
+
zoomMin
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
var zoomScale = newZoom / controllerHost.zoom;
|
|
44
|
+
controllerHost.zoom = newZoom;
|
|
45
|
+
// Keep the mouse center when scaling
|
|
46
|
+
pos[0] -= (zoomX - pos[0]) * (zoomScale - 1);
|
|
47
|
+
pos[1] -= (zoomY - pos[1]) * (zoomScale - 1);
|
|
48
|
+
scale[0] *= zoomScale;
|
|
49
|
+
scale[1] *= zoomScale;
|
|
50
|
+
|
|
51
|
+
target.dirty();
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
module.exports = helper;
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
|
|
14
14
|
updateSelectedMap: function (targetList) {
|
|
15
15
|
this._selectTargetMap = zrUtil.reduce(targetList || [], function (targetMap, target) {
|
|
16
|
-
targetMap
|
|
16
|
+
targetMap.set(target.name, target);
|
|
17
17
|
return targetMap;
|
|
18
|
-
},
|
|
18
|
+
}, zrUtil.createHashMap());
|
|
19
19
|
},
|
|
20
20
|
/**
|
|
21
21
|
* @param {string} name
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
// PENGING If selectedMode is null ?
|
|
24
24
|
select: function (name) {
|
|
25
25
|
var targetMap = this._selectTargetMap;
|
|
26
|
-
var target = targetMap
|
|
26
|
+
var target = targetMap.get(name);
|
|
27
27
|
var selectedMode = this.get('selectedMode');
|
|
28
28
|
if (selectedMode === 'single') {
|
|
29
|
-
|
|
29
|
+
targetMap.each(function (target) {
|
|
30
30
|
target.selected = false;
|
|
31
31
|
});
|
|
32
32
|
}
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
* @param {string} name
|
|
38
38
|
*/
|
|
39
39
|
unSelect: function (name) {
|
|
40
|
-
var target = this._selectTargetMap
|
|
40
|
+
var target = this._selectTargetMap.get(name);
|
|
41
41
|
// var selectedMode = this.get('selectedMode');
|
|
42
42
|
// selectedMode !== 'single' && target && (target.selected = false);
|
|
43
43
|
target && (target.selected = false);
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
* @param {string} name
|
|
48
48
|
*/
|
|
49
49
|
toggleSelected: function (name) {
|
|
50
|
-
var target = this._selectTargetMap
|
|
50
|
+
var target = this._selectTargetMap.get(name);
|
|
51
51
|
if (target != null) {
|
|
52
52
|
this[target.selected ? 'unSelect' : 'select'](name);
|
|
53
53
|
return target.selected;
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
* @param {string} name
|
|
59
59
|
*/
|
|
60
60
|
isSelected: function (name) {
|
|
61
|
-
var target = this._selectTargetMap
|
|
61
|
+
var target = this._selectTargetMap.get(name);
|
|
62
62
|
return target && target.selected;
|
|
63
63
|
}
|
|
64
64
|
};
|