@visactor/vchart 1.13.9-alpha.6 → 1.13.10-alpha.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/build/es5/index.js +1 -1
- package/build/index.es.js +1062 -748
- package/build/index.js +1062 -747
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/index.d.ts +1 -1
- package/cjs/chart/index.js.map +1 -1
- package/cjs/chart/pictogram/interface.d.ts +1 -1
- package/cjs/chart/pictogram/interface.js.map +1 -1
- package/cjs/chart/progress/linear/linear-progress-transformer.js +1 -1
- package/cjs/chart/progress/linear/linear-progress-transformer.js.map +1 -1
- package/cjs/compile/mark/compilable-mark.d.ts +1 -0
- package/cjs/compile/mark/compilable-mark.js +3 -0
- package/cjs/compile/mark/compilable-mark.js.map +1 -1
- package/cjs/component/axis/base-axis.js +7 -2
- package/cjs/component/axis/base-axis.js.map +1 -1
- package/cjs/component/axis/interface/spec.d.ts +7 -2
- package/cjs/component/axis/interface/spec.js.map +1 -1
- package/cjs/component/brush/brush.d.ts +23 -24
- package/cjs/component/brush/brush.js +183 -182
- package/cjs/component/brush/brush.js.map +1 -1
- package/cjs/component/brush/interface.d.ts +2 -0
- package/cjs/component/brush/interface.js.map +1 -1
- package/cjs/component/crosshair/base.js +1 -1
- package/cjs/component/crosshair/base.js.map +1 -1
- package/cjs/component/crosshair/utils/cartesian.js +9 -8
- package/cjs/component/crosshair/utils/cartesian.js.map +1 -1
- package/cjs/component/data-zoom/data-zoom/interface.d.ts +2 -3
- package/cjs/component/data-zoom/data-zoom/interface.js.map +1 -1
- package/cjs/component/marker/mark-area/base-mark-area.js +27 -17
- package/cjs/component/marker/mark-area/base-mark-area.js.map +1 -1
- package/cjs/component/marker/mark-area/interface/theme.d.ts +4 -3
- package/cjs/component/marker/mark-area/interface/theme.js.map +1 -1
- package/cjs/component/marker/mark-line/base-mark-line.js +31 -20
- package/cjs/component/marker/mark-line/base-mark-line.js.map +1 -1
- package/cjs/component/marker/mark-line/cartesian-mark-line.js +32 -26
- package/cjs/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
- package/cjs/component/marker/mark-line/interface/theme.d.ts +4 -3
- package/cjs/component/marker/mark-line/interface/theme.js.map +1 -1
- package/cjs/component/marker/mark-point/cartesian-mark-point.js +3 -1
- package/cjs/component/marker/mark-point/cartesian-mark-point.js.map +1 -1
- package/cjs/component/marker/utils.d.ts +12 -0
- package/cjs/component/marker/utils.js +22 -7
- package/cjs/component/marker/utils.js.map +1 -1
- package/cjs/constant/event.d.ts +1 -0
- package/cjs/constant/event.js +6 -6
- package/cjs/constant/event.js.map +1 -1
- package/cjs/constant/funnel.js +1 -2
- package/cjs/constant/layout.js +2 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +2 -3
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/interface.js +2 -1
- package/cjs/data/transforms/pictogram.d.ts +1 -9
- package/cjs/data/transforms/pictogram.js +3 -3
- package/cjs/data/transforms/pictogram.js.map +1 -1
- package/cjs/data/transforms/pie.js +1 -1
- package/cjs/data/transforms/pie.js.map +1 -1
- package/cjs/index-harmony-simple.js.map +1 -1
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +8 -7
- package/cjs/index.js.map +1 -1
- package/cjs/model/base-model.d.ts +1 -0
- package/cjs/model/base-model.js +6 -0
- package/cjs/model/base-model.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/base.js +8 -0
- package/cjs/plugin/components/tooltip-handler/base.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js +11 -7
- package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/utils/position.d.ts +1 -1
- package/cjs/plugin/components/tooltip-handler/utils/position.js +9 -1
- package/cjs/plugin/components/tooltip-handler/utils/position.js.map +1 -1
- package/cjs/series/bar/bar.js.map +1 -1
- package/cjs/series/gauge/gauge.js +7 -5
- package/cjs/series/gauge/gauge.js.map +1 -1
- package/cjs/series/pictogram/tooltip-helper.d.ts +2 -2
- package/cjs/series/pictogram/tooltip-helper.js.map +1 -1
- package/cjs/series/pie/pie.js +3 -3
- package/cjs/series/pie/pie.js.map +1 -1
- package/cjs/series/polar/progress-like/interface.d.ts +1 -0
- package/cjs/series/polar/progress-like/interface.js.map +1 -1
- package/cjs/series/polar/progress-like/progress-like.js +4 -3
- package/cjs/series/polar/progress-like/progress-like.js.map +1 -1
- package/cjs/series/progress/linear/interface.d.ts +1 -0
- package/cjs/series/progress/linear/interface.js.map +1 -1
- package/cjs/series/progress/linear/linear.js +6 -4
- package/cjs/series/progress/linear/linear.js.map +1 -1
- package/cjs/series/sankey/interface.d.ts +0 -1
- package/cjs/series/sankey/interface.js.map +1 -1
- package/cjs/typings/tooltip/position.d.ts +1 -1
- package/cjs/typings/tooltip/position.js.map +1 -1
- package/cjs/typings/visual.d.ts +1 -1
- package/cjs/typings/visual.js.map +1 -1
- package/esm/chart/index.d.ts +1 -1
- package/esm/chart/index.js.map +1 -1
- package/esm/chart/pictogram/interface.d.ts +1 -1
- package/esm/chart/pictogram/interface.js.map +1 -1
- package/esm/chart/progress/linear/linear-progress-transformer.js +1 -1
- package/esm/chart/progress/linear/linear-progress-transformer.js.map +1 -1
- package/esm/compile/mark/compilable-mark.d.ts +1 -0
- package/esm/compile/mark/compilable-mark.js +3 -0
- package/esm/compile/mark/compilable-mark.js.map +1 -1
- package/esm/component/axis/base-axis.js +7 -2
- package/esm/component/axis/base-axis.js.map +1 -1
- package/esm/component/axis/interface/spec.d.ts +7 -2
- package/esm/component/axis/interface/spec.js.map +1 -1
- package/esm/component/brush/brush.d.ts +23 -24
- package/esm/component/brush/brush.js +179 -177
- package/esm/component/brush/brush.js.map +1 -1
- package/esm/component/brush/interface.d.ts +2 -0
- package/esm/component/brush/interface.js.map +1 -1
- package/esm/component/crosshair/base.js +1 -1
- package/esm/component/crosshair/base.js.map +1 -1
- package/esm/component/crosshair/utils/cartesian.js +9 -8
- package/esm/component/crosshair/utils/cartesian.js.map +1 -1
- package/esm/component/data-zoom/data-zoom/interface.d.ts +2 -3
- package/esm/component/data-zoom/data-zoom/interface.js.map +1 -1
- package/esm/component/marker/mark-area/base-mark-area.js +27 -16
- package/esm/component/marker/mark-area/base-mark-area.js.map +1 -1
- package/esm/component/marker/mark-area/interface/theme.d.ts +4 -3
- package/esm/component/marker/mark-area/interface/theme.js.map +1 -1
- package/esm/component/marker/mark-line/base-mark-line.js +30 -19
- package/esm/component/marker/mark-line/base-mark-line.js.map +1 -1
- package/esm/component/marker/mark-line/cartesian-mark-line.js +31 -26
- package/esm/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
- package/esm/component/marker/mark-line/interface/theme.d.ts +4 -3
- package/esm/component/marker/mark-line/interface/theme.js.map +1 -1
- package/esm/component/marker/mark-point/cartesian-mark-point.js +1 -1
- package/esm/component/marker/mark-point/cartesian-mark-point.js.map +1 -1
- package/esm/component/marker/utils.d.ts +12 -0
- package/esm/component/marker/utils.js +19 -4
- package/esm/component/marker/utils.js.map +1 -1
- package/esm/constant/event.d.ts +1 -0
- package/esm/constant/event.js +6 -6
- package/esm/constant/event.js.map +1 -1
- package/esm/constant/funnel.js +1 -2
- package/esm/constant/layout.js +2 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +2 -3
- package/esm/core/index.js.map +1 -1
- package/esm/core/interface.js +2 -1
- package/esm/data/transforms/pictogram.d.ts +1 -9
- package/esm/data/transforms/pictogram.js +3 -3
- package/esm/data/transforms/pictogram.js.map +1 -1
- package/esm/data/transforms/pie.js +1 -1
- package/esm/data/transforms/pie.js.map +1 -1
- package/esm/index-harmony-simple.js.map +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -0
- package/esm/index.js.map +1 -1
- package/esm/model/base-model.d.ts +1 -0
- package/esm/model/base-model.js +6 -0
- package/esm/model/base-model.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/base.js +8 -0
- package/esm/plugin/components/tooltip-handler/base.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js +11 -7
- package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/utils/position.d.ts +1 -1
- package/esm/plugin/components/tooltip-handler/utils/position.js +9 -1
- package/esm/plugin/components/tooltip-handler/utils/position.js.map +1 -1
- package/esm/series/bar/bar.js.map +1 -1
- package/esm/series/gauge/gauge.js +6 -4
- package/esm/series/gauge/gauge.js.map +1 -1
- package/esm/series/pictogram/tooltip-helper.d.ts +2 -2
- package/esm/series/pictogram/tooltip-helper.js.map +1 -1
- package/esm/series/pie/pie.js +4 -4
- package/esm/series/pie/pie.js.map +1 -1
- package/esm/series/polar/progress-like/interface.d.ts +1 -0
- package/esm/series/polar/progress-like/interface.js.map +1 -1
- package/esm/series/polar/progress-like/progress-like.js +4 -3
- package/esm/series/polar/progress-like/progress-like.js.map +1 -1
- package/esm/series/progress/linear/interface.d.ts +1 -0
- package/esm/series/progress/linear/interface.js.map +1 -1
- package/esm/series/progress/linear/linear.js +6 -4
- package/esm/series/progress/linear/linear.js.map +1 -1
- package/esm/series/sankey/interface.d.ts +0 -1
- package/esm/series/sankey/interface.js.map +1 -1
- package/esm/typings/tooltip/position.d.ts +1 -1
- package/esm/typings/tooltip/position.js.map +1 -1
- package/esm/typings/visual.d.ts +1 -1
- package/esm/typings/visual.js.map +1 -1
- package/package.json +18 -18
|
@@ -28,8 +28,11 @@ export class Brush extends BaseComponent {
|
|
|
28
28
|
this.name = ComponentTypeEnum.brush, this.specKey = "brush", this.layoutZIndex = LayoutZIndex.Brush,
|
|
29
29
|
this._linkedSeries = [], this._itemMap = {}, this._linkedItemMap = {}, this._inBrushElementsMap = {},
|
|
30
30
|
this._outOfBrushElementsMap = {}, this._linkedInBrushElementsMap = {}, this._linkedOutOfBrushElementsMap = {},
|
|
31
|
-
this.
|
|
32
|
-
this.
|
|
31
|
+
this._cacheInteractiveRangeAttrs = [], this._needDisablePickable = !1, this._releatedAxes = [],
|
|
32
|
+
this._regionAxisMap = {}, this._axisDataZoomMap = {}, this._zoomRecord = [];
|
|
33
|
+
}
|
|
34
|
+
static getSpecInfo(chartSpec) {
|
|
35
|
+
return getSpecInfo(chartSpec, this.specKey, this.type, (s => !1 !== s.visible));
|
|
33
36
|
}
|
|
34
37
|
init() {
|
|
35
38
|
const inBrushMarkAttr = this._transformBrushedMarkAttr(this._spec.inBrush), outOfBrushMarkAttr = this._transformBrushedMarkAttr(this._spec.outOfBrush);
|
|
@@ -40,42 +43,67 @@ export class Brush extends BaseComponent {
|
|
|
40
43
|
}));
|
|
41
44
|
}));
|
|
42
45
|
}
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
_initNeedOperatedItem() {
|
|
47
|
+
const seriesUserId = this._spec.seriesId, seriesIndex = this._spec.seriesIndex;
|
|
48
|
+
this._relativeRegions.forEach((r => {
|
|
49
|
+
const allMarks = [];
|
|
50
|
+
r.getSeries().forEach((s => {
|
|
51
|
+
(seriesUserId && array(seriesUserId).includes(s.userId.toString()) || seriesIndex && array(seriesIndex).includes(s.getSpecIndex()) || !seriesIndex && !seriesUserId) && allMarks.push(...s.getMarksWithoutRoot()),
|
|
52
|
+
this._itemMap[r.id] = allMarks;
|
|
53
|
+
}));
|
|
54
|
+
})), this._linkedSeries.forEach((s => {
|
|
55
|
+
this._linkedItemMap[s.id] = s.getMarksWithoutRoot();
|
|
56
|
+
}));
|
|
45
57
|
}
|
|
46
58
|
created() {
|
|
47
59
|
super.created(), this.initEvent(), this._bindRegions(), this._bindLinkedSeries(),
|
|
48
60
|
this._initRegionAxisMap(), this._initAxisDataZoomMap(), this._initNeedOperatedItem();
|
|
49
61
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const data = [];
|
|
53
|
-
for (const brushName in elementsMap) for (const elementKey in elementsMap[brushName]) data.push(Object.assign({}, null === (_b = null === (_a = elementsMap[brushName][elementKey]) || void 0 === _a ? void 0 : _a.data) || void 0 === _b ? void 0 : _b[0]));
|
|
54
|
-
return data;
|
|
62
|
+
_bindRegions() {
|
|
63
|
+
isValid(this._spec.regionId) || isValid(this._spec.regionIndex) ? this._relativeRegions = this._option.getRegionsInUserIdOrIndex(array(this._spec.regionId), array(this._spec.regionIndex)) : this._relativeRegions = this._option.getAllRegions();
|
|
55
64
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
const data = [];
|
|
59
|
-
for (const elementKey in elementsMap) data.push(null === (_a = elementsMap[elementKey].data) || void 0 === _a ? void 0 : _a[0]);
|
|
60
|
-
return data;
|
|
65
|
+
_bindLinkedSeries() {
|
|
66
|
+
(isValid(this._spec.brushLinkSeriesId) || isValid(this._spec.brushLinkSeriesIndex)) && (this._linkedSeries = this._option.getSeriesInUserIdOrIndex(array(this._spec.brushLinkSeriesId), array(this._spec.brushLinkSeriesIndex)));
|
|
61
67
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
_initRegionAxisMap() {
|
|
69
|
+
isValid(this._spec.axisId) ? array(this._spec.axisId).forEach((axisId => {
|
|
70
|
+
this._releatedAxes.push(this._option.getComponentByUserId(axisId));
|
|
71
|
+
})) : isValid(this._spec.axisIndex) ? array(this._spec.axisIndex).forEach((axisIndex => {
|
|
72
|
+
this._releatedAxes.push(this._option.getComponentByIndex("axes", axisIndex));
|
|
73
|
+
})) : this._releatedAxes = this._option.getComponentsByKey("axes"), this._releatedAxes.forEach((axis => {
|
|
74
|
+
null == axis || axis.getRegions().forEach((region => {
|
|
75
|
+
this._regionAxisMap["region_" + region.id] ? this._regionAxisMap["region_" + region.id].push(axis) : this._regionAxisMap["region_" + region.id] = [ axis ];
|
|
76
|
+
}));
|
|
77
|
+
}));
|
|
78
|
+
}
|
|
79
|
+
_initAxisDataZoomMap() {
|
|
80
|
+
this._option.getComponentsByKey("dataZoom").forEach((dz => {
|
|
81
|
+
dz.relatedAxisComponent && (this._axisDataZoomMap[dz.relatedAxisComponent.id] = dz);
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
initEvent() {}
|
|
85
|
+
onRender(ctx) {}
|
|
86
|
+
changeRegions(regions) {}
|
|
87
|
+
_compareSpec(spec, prevSpec) {
|
|
88
|
+
this._brushComponents && this._relativeRegions.forEach(((region, index) => {
|
|
89
|
+
this._updateBrushComponent(region, index);
|
|
90
|
+
}));
|
|
91
|
+
const result = super._compareSpec(spec, prevSpec);
|
|
92
|
+
return isEqual(prevSpec, spec) || (result.reRender = !0, result.reMake = !0), result;
|
|
93
|
+
}
|
|
94
|
+
onLayoutEnd(ctx) {
|
|
95
|
+
var _a;
|
|
96
|
+
if (super.onLayoutEnd(ctx), this._option.disableTriggerEvent) return;
|
|
97
|
+
(null === (_a = this._spec.visible) || void 0 === _a || _a) && (this._brushComponents ? this._relativeRegions.forEach(((region, index) => {
|
|
98
|
+
this._updateBrushComponent(region, index);
|
|
99
|
+
})) : (this._brushComponents = [], this._relativeRegions.forEach(((region, index) => {
|
|
100
|
+
this._createBrushComponent(region, index);
|
|
101
|
+
}))));
|
|
74
102
|
}
|
|
75
103
|
_updateBrushComponent(region, componentIndex) {
|
|
76
104
|
const interactiveAttr = this._getBrushInteractiveAttr(region), brushComponent = this._brushComponents[componentIndex];
|
|
77
105
|
brushComponent.setAttributes(interactiveAttr), this._initMarkBrushState(componentIndex, ""),
|
|
78
|
-
brushComponent.children[0].removeAllChild()
|
|
106
|
+
brushComponent.children[0].removeAllChild();
|
|
79
107
|
}
|
|
80
108
|
_createBrushComponent(region, componentIndex) {
|
|
81
109
|
var _a, _b;
|
|
@@ -86,43 +114,75 @@ export class Brush extends BaseComponent {
|
|
|
86
114
|
disableTriggerEvent: this._option.disableTriggerEvent
|
|
87
115
|
}));
|
|
88
116
|
brush.id = null !== (_b = this._spec.id) && void 0 !== _b ? _b : `brush-${this.id}`,
|
|
89
|
-
this.getContainer().add(brush)
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
brush.addEventListener(BrushEvent.drawStart, (e => {
|
|
117
|
+
this.getContainer().add(brush), this._brushComponents.push(brush), this._cacheInteractiveRangeAttrs.push(interactiveAttr),
|
|
118
|
+
brush.addEventListener(BrushEvent.brushActive, (e => {
|
|
119
|
+
this._initMarkBrushState(componentIndex, "outOfBrush"), this._emitEvent(ChartEvent.brushActive, region);
|
|
120
|
+
})), brush.addEventListener(BrushEvent.drawStart, (e => {
|
|
93
121
|
this._emitEvent(ChartEvent.brushStart, region);
|
|
94
122
|
})), brush.addEventListener(BrushEvent.moveStart, (e => {
|
|
95
123
|
this._emitEvent(ChartEvent.brushStart, region);
|
|
96
124
|
})), brush.addEventListener(BrushEvent.drawing, (e => {
|
|
97
|
-
this.
|
|
98
|
-
this._needInitOutState = !1, this._needDisablePickable = !0, this._handleBrushChange(ChartEvent.brushChange, region, e),
|
|
99
|
-
this._emitEvent(ChartEvent.brushChange, region);
|
|
125
|
+
this._needDisablePickable = !0, this._handleBrushChange(region, e), this._emitEvent(ChartEvent.brushChange, region);
|
|
100
126
|
})), brush.addEventListener(BrushEvent.moving, (e => {
|
|
101
|
-
this._handleBrushChange(
|
|
127
|
+
this._handleBrushChange(region, e), this._emitEvent(ChartEvent.brushChange, region);
|
|
102
128
|
})), brush.addEventListener(BrushEvent.brushClear, (e => {
|
|
103
|
-
this._initMarkBrushState(componentIndex, ""), this.
|
|
104
|
-
this._handleBrushChange(ChartEvent.brushChange, region, e), this._handleBrushChange(ChartEvent.brushClear, region, e),
|
|
105
|
-
this._emitEvent(ChartEvent.brushChange, region), this._emitEvent(ChartEvent.brushClear, region);
|
|
129
|
+
this._initMarkBrushState(componentIndex, ""), this._needDisablePickable = !1, this._emitEvent(ChartEvent.brushClear, region);
|
|
106
130
|
})), brush.addEventListener(BrushEvent.drawEnd, (e => {
|
|
107
|
-
|
|
131
|
+
var _a;
|
|
132
|
+
this._needDisablePickable = !1;
|
|
108
133
|
const {operateMask: operateMask} = e.detail;
|
|
109
|
-
this.
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
134
|
+
if (null === (_a = this._spec) || void 0 === _a ? void 0 : _a.onBrushEnd) !0 === this._spec.onBrushEnd(e) ? (this.clearGraphic(),
|
|
135
|
+
this._initMarkBrushState(componentIndex, ""), this._needDisablePickable = !1, this._emitEvent(ChartEvent.brushClear, region)) : (this._spec.onBrushEnd(e),
|
|
136
|
+
this._emitEvent(ChartEvent.brushEnd, region)); else {
|
|
137
|
+
const inBrushData = this._extendDataInBrush(this._inBrushElementsMap);
|
|
138
|
+
!this._spec.zoomWhenEmpty && inBrushData.length > 0 && this._setAxisAndDataZoom(operateMask, region),
|
|
139
|
+
this._emitEvent(ChartEvent.brushEnd, region);
|
|
140
|
+
}
|
|
113
141
|
})), brush.addEventListener(BrushEvent.moveEnd, (e => {
|
|
114
|
-
const {operateMask: operateMask} = e.detail;
|
|
115
|
-
this._handleBrushChange(ChartEvent.brushEnd, region, e);
|
|
116
|
-
const inBrushData = this._extendDataInBrush(this._inBrushElementsMap);
|
|
142
|
+
const {operateMask: operateMask} = e.detail, inBrushData = this._extendDataInBrush(this._inBrushElementsMap);
|
|
117
143
|
!this._spec.zoomWhenEmpty && inBrushData.length > 0 && this._setAxisAndDataZoom(operateMask, region),
|
|
118
144
|
this._emitEvent(ChartEvent.brushEnd, region);
|
|
119
145
|
}));
|
|
120
146
|
}
|
|
121
|
-
|
|
147
|
+
_getBrushInteractiveAttr(region) {
|
|
148
|
+
const regionLayoutPosition = region.getLayoutStartPoint(), regionLayoutRect = region.getLayoutRect(), seriesRegionStartX = regionLayoutPosition.x, seriesRegionEndX = seriesRegionStartX + regionLayoutRect.width, seriesRegionStartY = regionLayoutPosition.y, seriesRegionEndY = seriesRegionStartY + regionLayoutRect.height;
|
|
149
|
+
return {
|
|
150
|
+
interactiveRange: {
|
|
151
|
+
minY: seriesRegionStartY,
|
|
152
|
+
maxY: seriesRegionEndY,
|
|
153
|
+
minX: seriesRegionStartX,
|
|
154
|
+
maxX: seriesRegionEndX
|
|
155
|
+
},
|
|
156
|
+
xRange: [ seriesRegionStartX, seriesRegionEndX ],
|
|
157
|
+
yRange: [ seriesRegionStartY, seriesRegionEndY ]
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
_transformBrushedMarkAttr(brushedStyle) {
|
|
161
|
+
const styleResult = {};
|
|
162
|
+
return (null == brushedStyle ? void 0 : brushedStyle.symbol) && (styleResult.symbolType = brushedStyle.symbol),
|
|
163
|
+
(null == brushedStyle ? void 0 : brushedStyle.symbolSize) && (styleResult.size = brushedStyle.symbolSize),
|
|
164
|
+
(null == brushedStyle ? void 0 : brushedStyle.color) && (styleResult.fill = brushedStyle.color),
|
|
165
|
+
(null == brushedStyle ? void 0 : brushedStyle.colorAlpha) && (styleResult.fillOpacity = brushedStyle.colorAlpha),
|
|
166
|
+
Object.assign(Object.assign({}, transformToGraphic(brushedStyle)), styleResult);
|
|
167
|
+
}
|
|
168
|
+
_handleBrushChange(region, e) {
|
|
122
169
|
const {operateMask: operateMask} = e.detail;
|
|
123
170
|
this._reconfigItem(operateMask, region), this._reconfigLinkedItem(operateMask, region);
|
|
124
171
|
}
|
|
172
|
+
_extendDataInBrush(elementsMap) {
|
|
173
|
+
var _a, _b;
|
|
174
|
+
const data = [];
|
|
175
|
+
for (const brushName in elementsMap) for (const elementKey in elementsMap[brushName]) data.push(Object.assign({}, null === (_b = null === (_a = elementsMap[brushName][elementKey]) || void 0 === _a ? void 0 : _a.data) || void 0 === _b ? void 0 : _b[0]));
|
|
176
|
+
return data;
|
|
177
|
+
}
|
|
178
|
+
_extendDatumOutOfBrush(elementsMap) {
|
|
179
|
+
var _a;
|
|
180
|
+
const data = [];
|
|
181
|
+
for (const elementKey in elementsMap) data.push(null === (_a = elementsMap[elementKey].data) || void 0 === _a ? void 0 : _a[0]);
|
|
182
|
+
return data;
|
|
183
|
+
}
|
|
125
184
|
_emitEvent(eventType, region) {
|
|
185
|
+
var _a;
|
|
126
186
|
this.event.emit(eventType, {
|
|
127
187
|
model: this,
|
|
128
188
|
value: {
|
|
@@ -137,102 +197,113 @@ export class Brush extends BaseComponent {
|
|
|
137
197
|
linkedInBrushElementsMap: this._linkedInBrushElementsMap,
|
|
138
198
|
linkedOutOfBrushElementsMap: this._linkedOutOfBrushElementsMap,
|
|
139
199
|
zoomRecord: this._zoomRecord
|
|
140
|
-
}
|
|
200
|
+
},
|
|
201
|
+
vchart: null === (_a = this._option) || void 0 === _a ? void 0 : _a.globalInstance
|
|
141
202
|
});
|
|
142
203
|
}
|
|
143
|
-
_transformBrushedMarkAttr(brushedStyle) {
|
|
144
|
-
const styleResult = {};
|
|
145
|
-
return (null == brushedStyle ? void 0 : brushedStyle.symbol) && (styleResult.symbolType = brushedStyle.symbol),
|
|
146
|
-
(null == brushedStyle ? void 0 : brushedStyle.symbolSize) && (styleResult.size = brushedStyle.symbolSize),
|
|
147
|
-
(null == brushedStyle ? void 0 : brushedStyle.color) && (styleResult.fill = brushedStyle.color),
|
|
148
|
-
(null == brushedStyle ? void 0 : brushedStyle.colorAlpha) && (styleResult.fillOpacity = brushedStyle.colorAlpha),
|
|
149
|
-
Object.assign(Object.assign({}, transformToGraphic(brushedStyle)), styleResult);
|
|
150
|
-
}
|
|
151
204
|
_reconfigItem(operateMask, region) {
|
|
205
|
+
var _a, _b, _c;
|
|
206
|
+
if (!(null == operateMask ? void 0 : operateMask.globalTransMatrix) || !(null === (_a = null == operateMask ? void 0 : operateMask.attribute) || void 0 === _a ? void 0 : _a.points)) return;
|
|
207
|
+
const points = null !== (_c = null === (_b = null == operateMask ? void 0 : operateMask.attribute) || void 0 === _b ? void 0 : _b.points) && void 0 !== _c ? _c : [], {a: a, b: b, c: c, d: d, e: e, f: f} = operateMask.globalTransMatrix, pointsCoord = points.map((p => ({
|
|
208
|
+
x: a * p.x + c * p.y + e,
|
|
209
|
+
y: b * p.x + d * p.y + f
|
|
210
|
+
}))), {markTypeFilter: markTypeFilter = []} = this._spec;
|
|
152
211
|
this._itemMap[region.id].forEach((mark => {
|
|
212
|
+
if (markTypeFilter.includes(mark.type)) return;
|
|
153
213
|
const grammarMark = mark.getProduct();
|
|
154
214
|
if (!grammarMark || !grammarMark.elements || !grammarMark.elements.length) return;
|
|
155
215
|
grammarMark.elements.forEach((el => {
|
|
156
216
|
var _a, _b, _c;
|
|
157
|
-
const graphicItem = el.getGraphicItem(), elementKey = mark.id + "_" + el.key;
|
|
158
|
-
(null === (_a = this._outOfBrushElementsMap) || void 0 === _a ? void 0 : _a[elementKey]) &&
|
|
217
|
+
const graphicItem = el.getGraphicItem(), elementKey = mark.id + "_" + el.key, isBrushContainItem = this._isBrushContainItem(operateMask.globalAABBBounds, pointsCoord, graphicItem);
|
|
218
|
+
(null === (_a = this._outOfBrushElementsMap) || void 0 === _a ? void 0 : _a[elementKey]) && isBrushContainItem ? (el.addState("inBrush"),
|
|
159
219
|
this._inBrushElementsMap[null == operateMask ? void 0 : operateMask.name] || (this._inBrushElementsMap[null == operateMask ? void 0 : operateMask.name] = {}),
|
|
160
220
|
this._inBrushElementsMap[null == operateMask ? void 0 : operateMask.name][elementKey] = el,
|
|
161
|
-
delete this._outOfBrushElementsMap[elementKey]) : (null === (_c = null === (_b = this._inBrushElementsMap) || void 0 === _b ? void 0 : _b[null == operateMask ? void 0 : operateMask.name]) || void 0 === _c ? void 0 : _c[elementKey]) && !
|
|
221
|
+
delete this._outOfBrushElementsMap[elementKey]) : (null === (_c = null === (_b = this._inBrushElementsMap) || void 0 === _b ? void 0 : _b[null == operateMask ? void 0 : operateMask.name]) || void 0 === _c ? void 0 : _c[elementKey]) && !isBrushContainItem && (el.removeState("inBrush"),
|
|
162
222
|
el.addState("outOfBrush"), this._outOfBrushElementsMap[elementKey] = el, delete this._inBrushElementsMap[operateMask.name][elementKey]),
|
|
163
223
|
graphicItem.setAttribute("pickable", !this._needDisablePickable);
|
|
164
224
|
}));
|
|
165
225
|
}));
|
|
166
226
|
}
|
|
167
227
|
_reconfigLinkedItem(operateMask, region) {
|
|
228
|
+
var _a;
|
|
229
|
+
if (!(null == operateMask ? void 0 : operateMask.globalTransMatrix) || !(null === (_a = null == operateMask ? void 0 : operateMask.attribute) || void 0 === _a ? void 0 : _a.points)) return;
|
|
168
230
|
const regionLayoutPos = region.getLayoutStartPoint(), seriesId = region.getSeries().map((s => s.id));
|
|
169
231
|
this._linkedSeries.forEach((s => {
|
|
232
|
+
var _a, _b;
|
|
170
233
|
if (!seriesId.includes(s.id)) {
|
|
171
|
-
const sRegionLayoutPos = s.getRegion().getLayoutStartPoint(), regionOffsetX = sRegionLayoutPos.x - regionLayoutPos.x, regionOffsetY = sRegionLayoutPos.y - regionLayoutPos.y
|
|
234
|
+
const sRegionLayoutPos = s.getRegion().getLayoutStartPoint(), regionOffsetX = sRegionLayoutPos.x - regionLayoutPos.x, regionOffsetY = sRegionLayoutPos.y - regionLayoutPos.y, points = null !== (_b = null === (_a = null == operateMask ? void 0 : operateMask.attribute) || void 0 === _a ? void 0 : _a.points) && void 0 !== _b ? _b : [], {a: a, b: b, c: c, d: d, e: e, f: f} = operateMask.globalTransMatrix, dx = regionOffsetX || 0, dy = regionOffsetY || 0, pointsCoord = points.map((p => ({
|
|
235
|
+
x: a * p.x + c * p.y + e + dx,
|
|
236
|
+
y: b * p.x + d * p.y + f + dy
|
|
237
|
+
})));
|
|
238
|
+
operateMask.globalAABBBounds.clone().set(operateMask.globalAABBBounds.x1 + dx, operateMask.globalAABBBounds.y1 + dy, operateMask.globalAABBBounds.x2 + dx, operateMask.globalAABBBounds.y2 + dy);
|
|
239
|
+
const {markTypeFilter: markTypeFilter = []} = this._spec;
|
|
172
240
|
this._linkedItemMap[s.id].forEach((mark => {
|
|
241
|
+
if (markTypeFilter.includes(mark.type)) return;
|
|
173
242
|
const grammarMark = mark.getProduct();
|
|
174
243
|
if (!grammarMark || !grammarMark.elements || !grammarMark.elements.length) return;
|
|
175
244
|
grammarMark.elements.forEach((el => {
|
|
176
245
|
var _a, _b, _c;
|
|
177
246
|
const graphicItem = el.getGraphicItem(), elementKey = mark.id + "_" + el.key;
|
|
178
|
-
(null === (_a = this._linkedOutOfBrushElementsMap) || void 0 === _a ? void 0 : _a[elementKey]) && this._isBrushContainItem(operateMask, graphicItem,
|
|
179
|
-
|
|
180
|
-
dy: regionOffsetY
|
|
181
|
-
}) ? (el.addState("inBrush"), this._linkedInBrushElementsMap[null == operateMask ? void 0 : operateMask.name] || (this._linkedInBrushElementsMap[null == operateMask ? void 0 : operateMask.name] = {}),
|
|
247
|
+
(null === (_a = this._linkedOutOfBrushElementsMap) || void 0 === _a ? void 0 : _a[elementKey]) && this._isBrushContainItem(operateMask.globalAABBBounds, pointsCoord, graphicItem) ? (el.addState("inBrush"),
|
|
248
|
+
this._linkedInBrushElementsMap[null == operateMask ? void 0 : operateMask.name] || (this._linkedInBrushElementsMap[null == operateMask ? void 0 : operateMask.name] = {}),
|
|
182
249
|
this._linkedInBrushElementsMap[null == operateMask ? void 0 : operateMask.name][elementKey] = el,
|
|
183
|
-
delete this._linkedOutOfBrushElementsMap[elementKey]) : (null === (_c = null === (_b = this._linkedInBrushElementsMap) || void 0 === _b ? void 0 : _b[null == operateMask ? void 0 : operateMask.name]) || void 0 === _c ? void 0 : _c[elementKey]) && !this._isBrushContainItem(operateMask, graphicItem,
|
|
184
|
-
|
|
185
|
-
dy: regionOffsetY
|
|
186
|
-
}) && (el.removeState("inBrush"), el.addState("outOfBrush"), this._linkedOutOfBrushElementsMap[elementKey] = el),
|
|
250
|
+
delete this._linkedOutOfBrushElementsMap[elementKey]) : (null === (_c = null === (_b = this._linkedInBrushElementsMap) || void 0 === _b ? void 0 : _b[null == operateMask ? void 0 : operateMask.name]) || void 0 === _c ? void 0 : _c[elementKey]) && !this._isBrushContainItem(operateMask.globalAABBBounds, pointsCoord, graphicItem) && (el.removeState("inBrush"),
|
|
251
|
+
el.addState("outOfBrush"), this._linkedOutOfBrushElementsMap[elementKey] = el),
|
|
187
252
|
graphicItem.setAttribute("pickable", !this._needDisablePickable);
|
|
188
253
|
}));
|
|
189
254
|
}));
|
|
190
255
|
}
|
|
191
256
|
}));
|
|
192
257
|
}
|
|
193
|
-
_isBrushContainItem(
|
|
194
|
-
var _a, _b, _c;
|
|
195
|
-
if (!(null == brushMask ? void 0 : brushMask.globalTransMatrix) || !(null === (_a = null == brushMask ? void 0 : brushMask.attribute) || void 0 === _a ? void 0 : _a.points)) return !1;
|
|
196
|
-
const points = null !== (_c = null === (_b = null == brushMask ? void 0 : brushMask.attribute) || void 0 === _b ? void 0 : _b.points) && void 0 !== _c ? _c : [], {a: a, b: b, c: c, d: d, e: e, f: f} = brushMask.globalTransMatrix, dx = (null == linkedOffset ? void 0 : linkedOffset.dx) || 0, dy = (null == linkedOffset ? void 0 : linkedOffset.dy) || 0, pointsCoord = points.map((p => ({
|
|
197
|
-
x: a * p.x + c * p.y + e + dx,
|
|
198
|
-
y: b * p.x + d * p.y + f + dy
|
|
199
|
-
})));
|
|
200
|
-
brushMask.globalAABBBounds.clone().set(brushMask.globalAABBBounds.x1 + dx, brushMask.globalAABBBounds.y1 + dy, brushMask.globalAABBBounds.x2 + dx, brushMask.globalAABBBounds.y2 + dy);
|
|
201
|
-
const x = item.globalTransMatrix.e, y = item.globalTransMatrix.f;
|
|
258
|
+
_isBrushContainItem(brushMaskAABBBounds, brushMaskPointsCoord, item) {
|
|
202
259
|
let itemBounds = [];
|
|
203
|
-
if ("symbol"
|
|
204
|
-
const {
|
|
260
|
+
if ([ "symbol", "rect" ].includes(item.type)) {
|
|
261
|
+
const {x1: x1, x2: x2, y1: y1, y2: y2} = null == item ? void 0 : item.globalAABBBounds;
|
|
205
262
|
return itemBounds = [ {
|
|
206
|
-
x:
|
|
207
|
-
y:
|
|
263
|
+
x: x1,
|
|
264
|
+
y: y1
|
|
208
265
|
}, {
|
|
209
|
-
x:
|
|
210
|
-
y:
|
|
266
|
+
x: x2,
|
|
267
|
+
y: y1
|
|
211
268
|
}, {
|
|
212
|
-
x:
|
|
213
|
-
y:
|
|
269
|
+
x: x2,
|
|
270
|
+
y: y2
|
|
214
271
|
}, {
|
|
215
|
-
x:
|
|
216
|
-
y:
|
|
217
|
-
} ], polygonIntersectPolygon(
|
|
272
|
+
x: x1,
|
|
273
|
+
y: y2
|
|
274
|
+
} ], polygonIntersectPolygon(brushMaskPointsCoord, itemBounds);
|
|
218
275
|
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
276
|
+
return brushMaskAABBBounds.intersects(item.globalAABBBounds);
|
|
277
|
+
}
|
|
278
|
+
_initMarkBrushState(componentIndex, stateName) {
|
|
279
|
+
this._brushComponents.forEach(((brush, index) => {
|
|
280
|
+
index !== componentIndex && brush.children[0].removeAllChild();
|
|
281
|
+
})), this._inBrushElementsMap = {}, this._outOfBrushElementsMap = {}, this._linkedInBrushElementsMap = {},
|
|
282
|
+
this._linkedOutOfBrushElementsMap = {};
|
|
283
|
+
const {markTypeFilter: markTypeFilter = []} = this._spec;
|
|
284
|
+
Object.entries(this._itemMap).forEach((([regionId, marks]) => {
|
|
285
|
+
marks.forEach((mark => {
|
|
286
|
+
if (markTypeFilter.includes(mark.type)) return;
|
|
287
|
+
const grammarMark = mark.getProduct();
|
|
288
|
+
if (!grammarMark || !grammarMark.elements || !grammarMark.elements.length) return;
|
|
289
|
+
grammarMark.elements.forEach((el => {
|
|
290
|
+
const elementKey = mark.id + "_" + el.key;
|
|
291
|
+
el.removeState("inBrush"), el.removeState("outOfBrush"), el.addState(stateName),
|
|
292
|
+
this._outOfBrushElementsMap[elementKey] = el;
|
|
293
|
+
}));
|
|
294
|
+
}));
|
|
295
|
+
})), Object.entries(this._linkedItemMap).forEach((([seriesId, marks]) => {
|
|
296
|
+
marks.forEach((mark => {
|
|
297
|
+
if (markTypeFilter.includes(mark.type)) return;
|
|
298
|
+
const grammarMark = mark.getProduct();
|
|
299
|
+
if (!grammarMark || !grammarMark.elements || !grammarMark.elements.length) return;
|
|
300
|
+
grammarMark.elements.forEach((el => {
|
|
301
|
+
const elementKey = mark.id + "_" + el.key;
|
|
302
|
+
el.removeState("inBrush"), el.removeState("outOfBrush"), el.addState(stateName),
|
|
303
|
+
this._linkedOutOfBrushElementsMap[elementKey] = el;
|
|
304
|
+
}));
|
|
305
|
+
}));
|
|
306
|
+
}));
|
|
236
307
|
}
|
|
237
308
|
_stateClamp(state) {
|
|
238
309
|
return Math.min(Math.max(0, state), 1);
|
|
@@ -267,79 +338,9 @@ export class Brush extends BaseComponent {
|
|
|
267
338
|
}));
|
|
268
339
|
}
|
|
269
340
|
}
|
|
270
|
-
_bindRegions() {
|
|
271
|
-
isValid(this._spec.regionId) && isValid(this._spec.regionIndex) && (this._relativeRegions = this._option.getAllRegions()),
|
|
272
|
-
this._relativeRegions = this._option.getRegionsInUserIdOrIndex(array(this._spec.regionId), array(this._spec.regionIndex));
|
|
273
|
-
}
|
|
274
|
-
_bindLinkedSeries() {
|
|
275
|
-
isValid(this._spec.brushLinkSeriesId) && isValid(this._spec.brushLinkSeriesIndex) || (this._linkedSeries = this._option.getSeriesInUserIdOrIndex(array(this._spec.brushLinkSeriesId), array(this._spec.brushLinkSeriesIndex)));
|
|
276
|
-
}
|
|
277
|
-
_initRegionAxisMap() {
|
|
278
|
-
isValid(this._spec.axisId) ? array(this._spec.axisId).forEach((axisId => {
|
|
279
|
-
this._releatedAxes.push(this._option.getComponentByUserId(axisId));
|
|
280
|
-
})) : isValid(this._spec.axisIndex) ? array(this._spec.axisIndex).forEach((axisIndex => {
|
|
281
|
-
this._releatedAxes.push(this._option.getComponentByIndex("axes", axisIndex));
|
|
282
|
-
})) : this._releatedAxes = this._option.getComponentsByKey("axes"), this._releatedAxes.forEach((axis => {
|
|
283
|
-
null == axis || axis.getRegions().forEach((region => {
|
|
284
|
-
this._regionAxisMap["region_" + region.id] ? this._regionAxisMap["region_" + region.id].push(axis) : this._regionAxisMap["region_" + region.id] = [ axis ];
|
|
285
|
-
}));
|
|
286
|
-
}));
|
|
287
|
-
}
|
|
288
|
-
_initAxisDataZoomMap() {
|
|
289
|
-
this._option.getComponentsByKey("dataZoom").forEach((dz => {
|
|
290
|
-
dz.relatedAxisComponent && (this._axisDataZoomMap[dz.relatedAxisComponent.id] = dz);
|
|
291
|
-
}));
|
|
292
|
-
}
|
|
293
|
-
_initNeedOperatedItem() {
|
|
294
|
-
const seriesUserId = this._spec.seriesId, seriesIndex = this._spec.seriesIndex;
|
|
295
|
-
this._relativeRegions.forEach((r => {
|
|
296
|
-
const allMarks = [];
|
|
297
|
-
r.getSeries().forEach((s => {
|
|
298
|
-
(seriesUserId && array(seriesUserId).includes(s.userId.toString()) || seriesIndex && array(seriesIndex).includes(s.getSpecIndex()) || !seriesIndex && !seriesUserId) && allMarks.push(...s.getMarksWithoutRoot()),
|
|
299
|
-
this._itemMap[r.id] = allMarks;
|
|
300
|
-
}));
|
|
301
|
-
})), this._linkedSeries.forEach((s => {
|
|
302
|
-
this._linkedItemMap[s.id] = s.getMarksWithoutRoot();
|
|
303
|
-
}));
|
|
304
|
-
}
|
|
305
|
-
_initMarkBrushState(componentIndex, stateName) {
|
|
306
|
-
this._brushComponents.forEach(((brush, index) => {
|
|
307
|
-
index !== componentIndex && brush.children[0].removeAllChild();
|
|
308
|
-
})), this._inBrushElementsMap = {}, this._outOfBrushElementsMap = {}, this._linkedInBrushElementsMap = {},
|
|
309
|
-
this._linkedOutOfBrushElementsMap = {}, this._option.getAllSeries().forEach((s => {
|
|
310
|
-
s.getMarksWithoutRoot().forEach((mark => {
|
|
311
|
-
const grammarMark = mark.getProduct();
|
|
312
|
-
if (!grammarMark || !grammarMark.elements || !grammarMark.elements.length) return;
|
|
313
|
-
grammarMark.elements.forEach((el => {
|
|
314
|
-
const elementKey = mark.id + "_" + el.key;
|
|
315
|
-
el.removeState("inBrush"), el.removeState("outOfBrush"), el.addState(stateName),
|
|
316
|
-
this._outOfBrushElementsMap[elementKey] = el, this._linkedOutOfBrushElementsMap[elementKey] = el;
|
|
317
|
-
}));
|
|
318
|
-
}));
|
|
319
|
-
}));
|
|
320
|
-
}
|
|
321
|
-
initEvent() {}
|
|
322
|
-
onRender(ctx) {}
|
|
323
|
-
changeRegions(regions) {}
|
|
324
341
|
_getNeedClearVRenderComponents() {
|
|
325
342
|
return this._brushComponents;
|
|
326
343
|
}
|
|
327
|
-
_compareSpec(spec, prevSpec) {
|
|
328
|
-
this._brushComponents && this._relativeRegions.forEach(((region, index) => {
|
|
329
|
-
this._updateBrushComponent(region, index);
|
|
330
|
-
}));
|
|
331
|
-
const result = super._compareSpec(spec, prevSpec);
|
|
332
|
-
return isEqual(prevSpec, spec) || (result.reRender = !0, result.reMake = !0), result;
|
|
333
|
-
}
|
|
334
|
-
onLayoutEnd(ctx) {
|
|
335
|
-
var _a;
|
|
336
|
-
if (super.onLayoutEnd(ctx), this._option.disableTriggerEvent) return;
|
|
337
|
-
(null === (_a = this._spec.visible) || void 0 === _a || _a) && (this._brushComponents ? this._relativeRegions.forEach(((region, index) => {
|
|
338
|
-
this._updateBrushComponent(region, index);
|
|
339
|
-
})) : (this._brushComponents = [], this._relativeRegions.forEach(((region, index) => {
|
|
340
|
-
this._createBrushComponent(region, index);
|
|
341
|
-
}))));
|
|
342
|
-
}
|
|
343
344
|
clearGraphic() {
|
|
344
345
|
this._brushComponents && this._brushComponents.forEach((brush => {
|
|
345
346
|
brush._container.incrementalClearChild();
|
|
@@ -348,8 +349,9 @@ export class Brush extends BaseComponent {
|
|
|
348
349
|
clear() {
|
|
349
350
|
if (this._brushComponents) {
|
|
350
351
|
const container = this.getContainer();
|
|
351
|
-
this._brushComponents.forEach((brush => {
|
|
352
|
-
|
|
352
|
+
this._brushComponents.forEach(((brush, index) => {
|
|
353
|
+
this._initMarkBrushState(index, ""), this._needDisablePickable = !1, brush.removeAllChild(),
|
|
354
|
+
brush.releaseBrushEvents(), container && container.removeChild(brush);
|
|
353
355
|
})), this._brushComponents = null;
|
|
354
356
|
}
|
|
355
357
|
}
|