@visactor/vchart 1.13.9-alpha.1 → 1.13.9-alpha.10
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 +2 -2
- package/build/index.es.js +351 -343
- package/build/index.js +351 -343
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/component/marker/mark-area/base-mark-area.js +17 -27
- package/cjs/component/marker/mark-area/base-mark-area.js.map +1 -1
- package/cjs/component/marker/mark-area/interface/theme.d.ts +3 -4
- package/cjs/component/marker/mark-area/interface/theme.js.map +1 -1
- package/cjs/component/marker/mark-line/base-mark-line.js +20 -31
- package/cjs/component/marker/mark-line/base-mark-line.js.map +1 -1
- package/cjs/component/marker/mark-line/cartesian-mark-line.js +16 -20
- package/cjs/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
- package/cjs/component/marker/mark-line/interface/theme.d.ts +3 -4
- package/cjs/component/marker/mark-line/interface/theme.js.map +1 -1
- package/cjs/constant/funnel.js +1 -2
- package/cjs/constant/sunburst.js +2 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/interface.js +1 -2
- package/cjs/core/vchart.js +2 -1
- package/esm/component/marker/mark-area/base-mark-area.js +16 -27
- package/esm/component/marker/mark-area/base-mark-area.js.map +1 -1
- package/esm/component/marker/mark-area/interface/theme.d.ts +3 -4
- package/esm/component/marker/mark-area/interface/theme.js.map +1 -1
- package/esm/component/marker/mark-line/base-mark-line.js +19 -30
- package/esm/component/marker/mark-line/base-mark-line.js.map +1 -1
- package/esm/component/marker/mark-line/cartesian-mark-line.js +16 -20
- package/esm/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
- package/esm/component/marker/mark-line/interface/theme.d.ts +3 -4
- package/esm/component/marker/mark-line/interface/theme.js.map +1 -1
- package/esm/constant/funnel.js +1 -2
- package/esm/constant/sunburst.js +2 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/core/interface.js +1 -2
- package/esm/core/vchart.js +2 -1
- package/package.json +15 -15
package/build/index.js
CHANGED
|
@@ -31431,6 +31431,10 @@
|
|
|
31431
31431
|
const SCROLLBAR_EVENT$1 = "scrollDrag";
|
|
31432
31432
|
const SCROLLBAR_END_EVENT$1 = "scrollUp";
|
|
31433
31433
|
|
|
31434
|
+
function getEndTriggersOfDrag() {
|
|
31435
|
+
return "browser" === vglobal.env ? ["pointerup", "pointerleave", "pointercancel"] : ["pointerup", "pointerleave", "pointerupoutside"];
|
|
31436
|
+
}
|
|
31437
|
+
|
|
31434
31438
|
const delayMap$3 = {
|
|
31435
31439
|
debounce: debounce,
|
|
31436
31440
|
throttle: throttle
|
|
@@ -31463,6 +31467,7 @@
|
|
|
31463
31467
|
}
|
|
31464
31468
|
this.setScrollRange([currentScrollValue - (range[1] - range[0]) / 2, currentScrollValue + (range[1] - range[0]) / 2], !1), this.stage && !this.stage.autoRender && this.stage.renderNextFrame();
|
|
31465
31469
|
}, this._onSliderPointerDown = e => {
|
|
31470
|
+
this._clearDragEvents();
|
|
31466
31471
|
const {
|
|
31467
31472
|
stopSliderDownPropagation = !0
|
|
31468
31473
|
} = this.attribute;
|
|
@@ -31477,11 +31482,15 @@
|
|
|
31477
31482
|
this._prePos = "horizontal" === direction ? x : y, this._dispatchEvent(SCROLLBAR_START_EVENT, {
|
|
31478
31483
|
pos: this._prePos,
|
|
31479
31484
|
event: e
|
|
31480
|
-
})
|
|
31481
|
-
|
|
31482
|
-
|
|
31483
|
-
|
|
31484
|
-
|
|
31485
|
+
});
|
|
31486
|
+
const triggers = getEndTriggersOfDrag(),
|
|
31487
|
+
obj = "browser" === vglobal.env ? vglobal : this.stage;
|
|
31488
|
+
obj.addEventListener("pointermove", this._onSliderPointerMoveWithDelay, {
|
|
31489
|
+
capture: !0,
|
|
31490
|
+
passive: !0
|
|
31491
|
+
}), triggers.forEach(trigger => {
|
|
31492
|
+
obj.addEventListener(trigger, this._onSliderPointerUp);
|
|
31493
|
+
});
|
|
31485
31494
|
}, this._computeScrollValue = e => {
|
|
31486
31495
|
const {
|
|
31487
31496
|
direction: direction
|
|
@@ -31499,6 +31508,7 @@
|
|
|
31499
31508
|
} = this.getSliderRenderBounds();
|
|
31500
31509
|
return "vertical" === direction ? (currentPos = y, delta = currentPos - this._prePos, currentScrollValue = delta / height) : (currentPos = x, delta = currentPos - this._prePos, currentScrollValue = delta / width), [currentPos, currentScrollValue];
|
|
31501
31510
|
}, this._onSliderPointerMove = e => {
|
|
31511
|
+
e.preventDefault();
|
|
31502
31512
|
const {
|
|
31503
31513
|
stopSliderMovePropagation = !0
|
|
31504
31514
|
} = this.attribute;
|
|
@@ -31507,7 +31517,6 @@
|
|
|
31507
31517
|
[currentPos, currentScrollValue] = this._computeScrollValue(e);
|
|
31508
31518
|
this.setScrollRange([preScrollRange[0] + currentScrollValue, preScrollRange[1] + currentScrollValue], !0), this._prePos = currentPos;
|
|
31509
31519
|
}, this._onSliderPointerMoveWithDelay = 0 === this.attribute.delayTime ? this._onSliderPointerMove : delayMap$3[this.attribute.delayType](this._onSliderPointerMove, this.attribute.delayTime), this._onSliderPointerUp = e => {
|
|
31510
|
-
e.preventDefault();
|
|
31511
31520
|
const {
|
|
31512
31521
|
range: preRange,
|
|
31513
31522
|
limitRange = [0, 1]
|
|
@@ -31518,11 +31527,7 @@
|
|
|
31518
31527
|
this._dispatchEvent(SCROLLBAR_END_EVENT$1, {
|
|
31519
31528
|
pre: preRange,
|
|
31520
31529
|
value: clampRange$1(range, limitRange[0], limitRange[1])
|
|
31521
|
-
}),
|
|
31522
|
-
capture: !0
|
|
31523
|
-
}), vglobal.removeEventListener("pointerup", this._onSliderPointerUp)) : (this.stage.removeEventListener("pointermove", this._onSliderPointerMoveWithDelay, {
|
|
31524
|
-
capture: !0
|
|
31525
|
-
}), this.stage.removeEventListener("pointerup", this._onSliderPointerUp), this.stage.removeEventListener("pointerupoutside", this._onSliderPointerUp));
|
|
31530
|
+
}), this._clearDragEvents();
|
|
31526
31531
|
};
|
|
31527
31532
|
}
|
|
31528
31533
|
setScrollRange(range) {
|
|
@@ -31671,6 +31676,16 @@
|
|
|
31671
31676
|
sliderSize = this._sliderSize;
|
|
31672
31677
|
return "horizontal" === direction ? clampRange$1([x1 + min * width, x1 + max * width], x1, width - sliderSize) : clampRange$1([y1 + min * height, y1 + max * height], y1, height - sliderSize);
|
|
31673
31678
|
}
|
|
31679
|
+
_clearDragEvents() {
|
|
31680
|
+
const triggers = getEndTriggersOfDrag(),
|
|
31681
|
+
obj = "browser" === vglobal.env ? vglobal : this.stage;
|
|
31682
|
+
obj.removeEventListener("pointermove", this._onSliderPointerMoveWithDelay, {
|
|
31683
|
+
capture: !0,
|
|
31684
|
+
passive: !1
|
|
31685
|
+
}), triggers.forEach(trigger => {
|
|
31686
|
+
obj.removeEventListener(trigger, this._onSliderPointerUp);
|
|
31687
|
+
});
|
|
31688
|
+
}
|
|
31674
31689
|
_reset() {
|
|
31675
31690
|
this._sliderRenderBounds = null, this._sliderLimitRange = null;
|
|
31676
31691
|
}
|
|
@@ -39019,14 +39034,20 @@
|
|
|
39019
39034
|
}, this.state = {
|
|
39020
39035
|
start: 0,
|
|
39021
39036
|
end: 1
|
|
39022
|
-
}, this._statePointToData = state => state, this.
|
|
39023
|
-
|
|
39024
|
-
|
|
39025
|
-
|
|
39026
|
-
|
|
39037
|
+
}, this._statePointToData = state => state, this._handleTouchMove = e => {
|
|
39038
|
+
this._activeState && e.preventDefault();
|
|
39039
|
+
}, this._onHandlerPointerDown = (e, tag) => {
|
|
39040
|
+
this._clearDragEvents(), "start" === tag ? (this._activeTag = DataZoomActiveTag.startHandler, this._activeItem = this._startHandlerMask) : "end" === tag ? (this._activeTag = DataZoomActiveTag.endHandler, this._activeItem = this._endHandlerMask) : "middleRect" === tag ? (this._activeTag = DataZoomActiveTag.middleHandler, this._activeItem = this._middleHandlerRect) : "middleSymbol" === tag ? (this._activeTag = DataZoomActiveTag.middleHandler, this._activeItem = this._middleHandlerSymbol) : "background" === tag && (this._activeTag = DataZoomActiveTag.background, this._activeItem = this._background), this._activeState = !0, this._activeCache.startPos = this.eventPosToStagePos(e), this._activeCache.lastPos = this.eventPosToStagePos(e);
|
|
39041
|
+
const evtTarget = "browser" === vglobal.env ? vglobal : this.stage,
|
|
39042
|
+
triggers = getEndTriggersOfDrag();
|
|
39043
|
+
evtTarget.addEventListener("pointermove", this._onHandlerPointerMove, {
|
|
39044
|
+
capture: !0,
|
|
39045
|
+
passive: !1
|
|
39046
|
+
}), triggers.forEach(trigger => {
|
|
39047
|
+
evtTarget.addEventListener(trigger, this._onHandlerPointerUp);
|
|
39027
39048
|
});
|
|
39028
39049
|
}, this._pointerMove = e => {
|
|
39029
|
-
e.
|
|
39050
|
+
e.preventDefault();
|
|
39030
39051
|
const {
|
|
39031
39052
|
start: startAttr,
|
|
39032
39053
|
end: endAttr,
|
|
@@ -39043,13 +39064,12 @@
|
|
|
39043
39064
|
start: start,
|
|
39044
39065
|
end: end
|
|
39045
39066
|
} = this.state;
|
|
39046
|
-
this._activeState && (this._activeTag === DataZoomActiveTag.middleHandler ? this.moveZoomWithMiddle((this.state.start + this.state.end) / 2 + dis) : this._activeTag === DataZoomActiveTag.startHandler ? start + dis > end ? (start = end, end = start + dis, this._activeTag = DataZoomActiveTag.endHandler) : start += dis : this._activeTag === DataZoomActiveTag.endHandler && (end + dis < start ? (end = start, start = end + dis, this._activeTag = DataZoomActiveTag.startHandler) : end += dis),
|
|
39067
|
+
this._activeState && (this._activeTag === DataZoomActiveTag.middleHandler ? this.moveZoomWithMiddle((this.state.start + this.state.end) / 2 + dis) : this._activeTag === DataZoomActiveTag.startHandler ? start + dis > end ? (start = end, end = start + dis, this._activeTag = DataZoomActiveTag.endHandler) : start += dis : this._activeTag === DataZoomActiveTag.endHandler && (end + dis < start ? (end = start, start = end + dis, this._activeTag = DataZoomActiveTag.startHandler) : end += dis), brushSelect && this.renderDragMask()), start = Math.min(Math.max(start, 0), 1), end = Math.min(Math.max(end, 0), 1), startAttr === start && endAttr === end || (this._activeCache.lastPos = pos, this.setStateAttr(start, end, !0), realTime && this._dispatchEvent("change", {
|
|
39047
39068
|
start: start,
|
|
39048
39069
|
end: end,
|
|
39049
39070
|
tag: this._activeTag
|
|
39050
39071
|
}));
|
|
39051
39072
|
}, this._onHandlerPointerMove = 0 === this.attribute.delayTime ? this._pointerMove : delayMap$2[this.attribute.delayType](this._pointerMove, this.attribute.delayTime), this._onHandlerPointerUp = e => {
|
|
39052
|
-
e.preventDefault();
|
|
39053
39073
|
const {
|
|
39054
39074
|
start: start,
|
|
39055
39075
|
end: end,
|
|
@@ -39064,11 +39084,7 @@
|
|
|
39064
39084
|
start: this.state.start,
|
|
39065
39085
|
end: this.state.end,
|
|
39066
39086
|
tag: this._activeTag
|
|
39067
|
-
}),
|
|
39068
|
-
capture: !0
|
|
39069
|
-
}), vglobal.removeEventListener("pointerup", this._onHandlerPointerUp)), this.removeEventListener("pointermove", this._onHandlerPointerMove, {
|
|
39070
|
-
capture: !0
|
|
39071
|
-
}), this.removeEventListener("pointerup", this._onHandlerPointerUp);
|
|
39087
|
+
}), this._clearDragEvents();
|
|
39072
39088
|
};
|
|
39073
39089
|
const {
|
|
39074
39090
|
position: position,
|
|
@@ -39087,7 +39103,9 @@
|
|
|
39087
39103
|
} = this.attribute;
|
|
39088
39104
|
this._startHandlerMask && this._startHandlerMask.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, "start")), this._endHandlerMask && this._endHandlerMask.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, "end")), this._middleHandlerSymbol && this._middleHandlerSymbol.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, "middleSymbol")), this._middleHandlerRect && this._middleHandlerRect.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, "middleRect"));
|
|
39089
39105
|
const selectedTag = brushSelect ? "background" : "middleRect";
|
|
39090
|
-
this._selectedBackground && this._selectedBackground.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, selectedTag)), brushSelect && this._background && this._background.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, "background")), brushSelect && this._previewGroup && this._previewGroup.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, "background")), this._selectedPreviewGroup && this._selectedPreviewGroup.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, selectedTag)), this.addEventListener("
|
|
39106
|
+
this._selectedBackground && this._selectedBackground.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, selectedTag)), brushSelect && this._background && this._background.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, "background")), brushSelect && this._previewGroup && this._previewGroup.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, "background")), this._selectedPreviewGroup && this._selectedPreviewGroup.addEventListener("pointerdown", e => this._onHandlerPointerDown(e, selectedTag)), "auto" === showDetail && (this.addEventListener("pointerenter", this._onHandlerPointerEnter), this.addEventListener("pointerleave", this._onHandlerPointerLeave)), ("browser" === vglobal.env ? vglobal : this.stage).addEventListener("touchmove", this._handleTouchMove, {
|
|
39107
|
+
passive: !1
|
|
39108
|
+
});
|
|
39091
39109
|
}
|
|
39092
39110
|
dragMaskSize() {
|
|
39093
39111
|
const {
|
|
@@ -39118,11 +39136,21 @@
|
|
|
39118
39136
|
y: 0
|
|
39119
39137
|
};
|
|
39120
39138
|
}
|
|
39139
|
+
_clearDragEvents() {
|
|
39140
|
+
const evtTarget = "browser" === vglobal.env ? vglobal : this.stage,
|
|
39141
|
+
triggers = getEndTriggersOfDrag();
|
|
39142
|
+
evtTarget.removeEventListener("pointermove", this._onHandlerPointerMove, {
|
|
39143
|
+
capture: !0,
|
|
39144
|
+
passive: !1
|
|
39145
|
+
}), triggers.forEach(trigger => {
|
|
39146
|
+
evtTarget.removeEventListener(trigger, this._onHandlerPointerUp);
|
|
39147
|
+
});
|
|
39148
|
+
}
|
|
39121
39149
|
_onHandlerPointerEnter(e) {
|
|
39122
|
-
|
|
39150
|
+
this._showText = !0, this.renderText();
|
|
39123
39151
|
}
|
|
39124
39152
|
_onHandlerPointerLeave(e) {
|
|
39125
|
-
|
|
39153
|
+
this._showText = !1, this.renderText();
|
|
39126
39154
|
}
|
|
39127
39155
|
backgroundDragZoom(startPos, endPos) {
|
|
39128
39156
|
const {
|
|
@@ -39661,6 +39689,11 @@
|
|
|
39661
39689
|
setStatePointToData(callback) {
|
|
39662
39690
|
isFunction$1(callback) && (this._statePointToData = callback);
|
|
39663
39691
|
}
|
|
39692
|
+
release(all) {
|
|
39693
|
+
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).addEventListener("touchmove", this._handleTouchMove, {
|
|
39694
|
+
passive: !1
|
|
39695
|
+
}), this._clearDragEvents();
|
|
39696
|
+
}
|
|
39664
39697
|
};
|
|
39665
39698
|
DataZoom$1.defaultAttributes = DEFAULT_DATA_ZOOM_ATTRIBUTES;
|
|
39666
39699
|
|
|
@@ -39830,26 +39863,17 @@
|
|
|
39830
39863
|
l.animate().wait(delay + startSymbolDuration + index * stepDuration).to({
|
|
39831
39864
|
clipRange: 1
|
|
39832
39865
|
}, stepDuration, easing);
|
|
39833
|
-
}), graphicFadeIn(line.endSymbol, delay + startSymbolDuration + lineDuration, endSymbolDuration, easing),
|
|
39834
|
-
const delayTime = delay + startSymbolDuration + lineDuration + endSymbolDuration;
|
|
39835
|
-
graphicFadeIn(labelNode.getTextShape(), delayTime, labelDuration, easing), graphicFadeIn(labelNode.getBgRect(), delayTime, labelDuration, easing);
|
|
39836
|
-
});
|
|
39866
|
+
}), graphicFadeIn(line.endSymbol, delay + startSymbolDuration + lineDuration, endSymbolDuration, easing), graphicFadeIn(label.getTextShape(), delay + startSymbolDuration + lineDuration + endSymbolDuration, labelDuration, easing), graphicFadeIn(label.getBgRect(), delay + startSymbolDuration + lineDuration + endSymbolDuration, labelDuration, easing);
|
|
39837
39867
|
}
|
|
39838
39868
|
|
|
39839
39869
|
function commonLineFadeIn(line, label, duration, delay, easing) {
|
|
39840
|
-
segmentFadeIn(line, delay, duration, easing),
|
|
39841
|
-
tagFadeIn(labelNode, delay, duration, easing);
|
|
39842
|
-
});
|
|
39870
|
+
segmentFadeIn(line, delay, duration, easing), tagFadeIn(label, delay, duration, easing);
|
|
39843
39871
|
}
|
|
39844
39872
|
function areaFadeIn(area, label, duration, delay, easing) {
|
|
39845
|
-
graphicFadeIn(area, delay, duration, easing),
|
|
39846
|
-
tagFadeIn(labelNode, delay, duration, easing);
|
|
39847
|
-
});
|
|
39873
|
+
graphicFadeIn(area, delay, duration, easing), tagFadeIn(label, delay, duration, easing);
|
|
39848
39874
|
}
|
|
39849
39875
|
function arcAreaFadeIn(area, label, duration, delay, easing) {
|
|
39850
|
-
graphicFadeIn(area, delay, duration, easing),
|
|
39851
|
-
tagFadeIn(labelNode, delay, duration, easing);
|
|
39852
|
-
});
|
|
39876
|
+
graphicFadeIn(area, delay, duration, easing), tagFadeIn(label, delay, duration, easing);
|
|
39853
39877
|
}
|
|
39854
39878
|
function pointFadeIn(itemLine, decorativeLine, item, duration, delay, easing) {
|
|
39855
39879
|
var _a;
|
|
@@ -39857,19 +39881,13 @@
|
|
|
39857
39881
|
}
|
|
39858
39882
|
|
|
39859
39883
|
function commonLineFadeOut(line, label, duration, delay, easing) {
|
|
39860
|
-
segmentFadeOut(line, delay, duration, easing),
|
|
39861
|
-
tagFadeOut(labelNode, delay, duration, easing);
|
|
39862
|
-
});
|
|
39884
|
+
segmentFadeOut(line, delay, duration, easing), tagFadeOut(label, delay, duration, easing);
|
|
39863
39885
|
}
|
|
39864
39886
|
function areaFadeOut(area, label, duration, delay, easing) {
|
|
39865
|
-
graphicFadeOut(area, delay, duration, easing),
|
|
39866
|
-
tagFadeOut(labelNode, delay, duration, easing);
|
|
39867
|
-
});
|
|
39887
|
+
graphicFadeOut(area, delay, duration, easing), tagFadeOut(label, delay, duration, easing);
|
|
39868
39888
|
}
|
|
39869
39889
|
function arcAreaFadeOut(area, label, duration, delay, easing) {
|
|
39870
|
-
graphicFadeOut(area, delay, duration, easing),
|
|
39871
|
-
tagFadeOut(labelNode, delay, duration, easing);
|
|
39872
|
-
});
|
|
39890
|
+
graphicFadeOut(area, delay, duration, easing), tagFadeOut(label, delay, duration, easing);
|
|
39873
39891
|
}
|
|
39874
39892
|
function pointFadeOut(itemLine, decorativeLine, item, duration, delay, easing) {
|
|
39875
39893
|
var _a;
|
|
@@ -40041,57 +40059,6 @@
|
|
|
40041
40059
|
delay: 0
|
|
40042
40060
|
};
|
|
40043
40061
|
|
|
40044
|
-
class MarkLabelMixin {
|
|
40045
|
-
getLabel() {
|
|
40046
|
-
return this._label;
|
|
40047
|
-
}
|
|
40048
|
-
_addMarkLabels(container, labelName, defaultLabelAttrs) {
|
|
40049
|
-
const {
|
|
40050
|
-
label: label,
|
|
40051
|
-
state: state
|
|
40052
|
-
} = this.attribute,
|
|
40053
|
-
labelStates = array(null == state ? void 0 : state.label),
|
|
40054
|
-
labelBackgroundStates = array(null == state ? void 0 : state.labelBackground),
|
|
40055
|
-
labelShapes = array(label).map((labelAttrs, index) => {
|
|
40056
|
-
var _a, _b;
|
|
40057
|
-
const finalLabelAttrs = merge$1({}, defaultLabelAttrs, labelAttrs),
|
|
40058
|
-
markLabel = new Tag(Object.assign(Object.assign({}, finalLabelAttrs), {
|
|
40059
|
-
state: {
|
|
40060
|
-
panel: merge$1({}, DEFAULT_STATES$2, null !== (_a = labelBackgroundStates[index]) && void 0 !== _a ? _a : last(labelBackgroundStates)),
|
|
40061
|
-
text: merge$1({}, DEFAULT_STATES$2, null !== (_b = labelStates[index]) && void 0 !== _b ? _b : last(labelStates))
|
|
40062
|
-
}
|
|
40063
|
-
}));
|
|
40064
|
-
return markLabel.name = labelName, container.add(markLabel), this.setLabelPos(markLabel, finalLabelAttrs), markLabel;
|
|
40065
|
-
});
|
|
40066
|
-
this._label = 1 === array(labelShapes).length ? labelShapes[0] : labelShapes;
|
|
40067
|
-
}
|
|
40068
|
-
_updateMarkLabels(defaultLabelAttrs) {
|
|
40069
|
-
const {
|
|
40070
|
-
label: label,
|
|
40071
|
-
state: state
|
|
40072
|
-
} = this.attribute,
|
|
40073
|
-
labelShapes = array(this._label),
|
|
40074
|
-
labelStates = array(null == state ? void 0 : state.label),
|
|
40075
|
-
labelBackgroundStates = array(null == state ? void 0 : state.labelBackground);
|
|
40076
|
-
if (labelShapes.length) {
|
|
40077
|
-
const labels = array(label);
|
|
40078
|
-
labelShapes.forEach((labelItem, index) => {
|
|
40079
|
-
var _a, _b;
|
|
40080
|
-
const finalLabelAttrs = merge$1({}, defaultLabelAttrs, labels[index]);
|
|
40081
|
-
labelItem.setAttributes(Object.assign(Object.assign({
|
|
40082
|
-
dx: 0,
|
|
40083
|
-
dy: 0
|
|
40084
|
-
}, finalLabelAttrs), {
|
|
40085
|
-
state: {
|
|
40086
|
-
panel: merge$1({}, DEFAULT_STATES$2, null !== (_a = labelBackgroundStates[index]) && void 0 !== _a ? _a : last(labelBackgroundStates)),
|
|
40087
|
-
text: merge$1({}, DEFAULT_STATES$2, null !== (_b = labelStates[index]) && void 0 !== _b ? _b : last(labelStates))
|
|
40088
|
-
}
|
|
40089
|
-
})), this.setLabelPos(labelItem, finalLabelAttrs);
|
|
40090
|
-
});
|
|
40091
|
-
}
|
|
40092
|
-
}
|
|
40093
|
-
}
|
|
40094
|
-
|
|
40095
40062
|
class MarkCommonLine extends Marker {
|
|
40096
40063
|
constructor() {
|
|
40097
40064
|
super(...arguments), this.name = "markCommonLine", this.defaultUpdateAnimation = DefaultUpdateMarkLineAnimation, this.defaultExitAnimation = DefaultExitMarkerAnimation;
|
|
@@ -40099,20 +40066,24 @@
|
|
|
40099
40066
|
getLine() {
|
|
40100
40067
|
return this._line;
|
|
40101
40068
|
}
|
|
40102
|
-
|
|
40069
|
+
getLabel() {
|
|
40070
|
+
return this._label;
|
|
40071
|
+
}
|
|
40072
|
+
setLabelPos() {
|
|
40103
40073
|
const {
|
|
40074
|
+
label = {},
|
|
40104
40075
|
limitRect: limitRect
|
|
40105
40076
|
} = this.attribute,
|
|
40106
40077
|
{
|
|
40107
40078
|
position: position,
|
|
40108
40079
|
confine: confine,
|
|
40109
40080
|
autoRotate: autoRotate
|
|
40110
|
-
} =
|
|
40111
|
-
labelPoint = this.getPointAttrByPosition(position
|
|
40081
|
+
} = label,
|
|
40082
|
+
labelPoint = this.getPointAttrByPosition(position),
|
|
40112
40083
|
labelAngle = position.toString().toLocaleLowerCase().includes("start") ? this._line.getStartAngle() || 0 : this._line.getEndAngle() || 0;
|
|
40113
|
-
if (
|
|
40114
|
-
angle: autoRotate ? this.getRotateByAngle(labelPoint.angle
|
|
40115
|
-
textStyle: Object.assign(Object.assign({}, this.getTextStyle(position, labelAngle, autoRotate)),
|
|
40084
|
+
if (this._label.setAttributes(Object.assign(Object.assign({}, labelPoint.position), {
|
|
40085
|
+
angle: autoRotate ? this.getRotateByAngle(labelPoint.angle) : 0,
|
|
40086
|
+
textStyle: Object.assign(Object.assign({}, this.getTextStyle(position, labelAngle, autoRotate)), label.textStyle)
|
|
40116
40087
|
})), limitRect && confine) {
|
|
40117
40088
|
const {
|
|
40118
40089
|
x: x,
|
|
@@ -40120,7 +40091,7 @@
|
|
|
40120
40091
|
width: width,
|
|
40121
40092
|
height: height
|
|
40122
40093
|
} = limitRect;
|
|
40123
|
-
limitShapeInBounds(
|
|
40094
|
+
limitShapeInBounds(this._label, {
|
|
40124
40095
|
x1: x,
|
|
40125
40096
|
y1: y,
|
|
40126
40097
|
x2: x + width,
|
|
@@ -40129,14 +40100,36 @@
|
|
|
40129
40100
|
}
|
|
40130
40101
|
}
|
|
40131
40102
|
initMarker(container) {
|
|
40132
|
-
const
|
|
40133
|
-
|
|
40103
|
+
const {
|
|
40104
|
+
label: label,
|
|
40105
|
+
state: state
|
|
40106
|
+
} = this.attribute,
|
|
40107
|
+
line = this.createSegment();
|
|
40108
|
+
line.name = "mark-common-line-line", this._line = line, container.add(line);
|
|
40109
|
+
const markLabel = new Tag(Object.assign(Object.assign({}, label), {
|
|
40110
|
+
state: {
|
|
40111
|
+
panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
|
|
40112
|
+
text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
|
|
40113
|
+
}
|
|
40114
|
+
}));
|
|
40115
|
+
markLabel.name = "mark-common-line-label", this._label = markLabel, container.add(markLabel), this.setLabelPos();
|
|
40134
40116
|
}
|
|
40135
40117
|
updateMarker() {
|
|
40136
|
-
|
|
40118
|
+
const {
|
|
40119
|
+
label: label,
|
|
40120
|
+
state: state
|
|
40121
|
+
} = this.attribute;
|
|
40122
|
+
this.setLineAttributes(), this._label && (this._label.setAttributes(Object.assign(Object.assign({
|
|
40123
|
+
dx: 0,
|
|
40124
|
+
dy: 0
|
|
40125
|
+
}, label), {
|
|
40126
|
+
state: {
|
|
40127
|
+
panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
|
|
40128
|
+
text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
|
|
40129
|
+
}
|
|
40130
|
+
})), this.setLabelPos());
|
|
40137
40131
|
}
|
|
40138
40132
|
}
|
|
40139
|
-
mixin(MarkCommonLine, MarkLabelMixin);
|
|
40140
40133
|
|
|
40141
40134
|
const FUZZY_EQUAL_DELTA = .001;
|
|
40142
40135
|
const DEFAULT_MARK_LINE_THEME = {
|
|
@@ -40325,7 +40318,6 @@
|
|
|
40325
40318
|
lineWidth: 0
|
|
40326
40319
|
},
|
|
40327
40320
|
label: {
|
|
40328
|
-
autoRotate: !0,
|
|
40329
40321
|
position: IMarkCommonArcLabelPosition.arcOuterMiddle,
|
|
40330
40322
|
refX: 0,
|
|
40331
40323
|
refY: 0,
|
|
@@ -40380,7 +40372,6 @@
|
|
|
40380
40372
|
const DEFAULT_MARK_ARC_AREA_THEME = {
|
|
40381
40373
|
interactive: !0,
|
|
40382
40374
|
label: {
|
|
40383
|
-
autoRotate: !0,
|
|
40384
40375
|
position: IMarkCommonArcLabelPosition.arcOuterMiddle,
|
|
40385
40376
|
textStyle: {
|
|
40386
40377
|
fill: "#fff",
|
|
@@ -40636,12 +40627,15 @@
|
|
|
40636
40627
|
constructor(attributes, options) {
|
|
40637
40628
|
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkLine.defaultAttributes, attributes)), this.name = "markLine";
|
|
40638
40629
|
}
|
|
40639
|
-
getPointAttrByPosition(position
|
|
40630
|
+
getPointAttrByPosition(position) {
|
|
40640
40631
|
var _a;
|
|
40641
40632
|
const {
|
|
40633
|
+
label = {}
|
|
40634
|
+
} = this.attribute,
|
|
40635
|
+
{
|
|
40642
40636
|
refX = 0,
|
|
40643
40637
|
refY = 0
|
|
40644
|
-
} =
|
|
40638
|
+
} = label,
|
|
40645
40639
|
points = this._line.getMainSegmentPoints(),
|
|
40646
40640
|
lineEndAngle = null !== (_a = this._line.getEndAngle()) && void 0 !== _a ? _a : 0,
|
|
40647
40641
|
labelAngle = (lineEndAngle),
|
|
@@ -40667,9 +40661,9 @@
|
|
|
40667
40661
|
angle: labelAngle
|
|
40668
40662
|
};
|
|
40669
40663
|
}
|
|
40670
|
-
getRotateByAngle(angle
|
|
40664
|
+
getRotateByAngle(angle) {
|
|
40671
40665
|
var _a;
|
|
40672
|
-
return (isPostiveXAxis(angle) ? angle : angle - Math.PI) + (null !== (_a =
|
|
40666
|
+
return (isPostiveXAxis(angle) ? angle : angle - Math.PI) + (null !== (_a = this.attribute.label.refAngle) && void 0 !== _a ? _a : 0);
|
|
40673
40667
|
}
|
|
40674
40668
|
getTextStyle(position, labelAngle, autoRotate) {
|
|
40675
40669
|
return fuzzyEqualNumber(Math.abs(labelAngle), Math.PI / 2, FUZZY_EQUAL_DELTA) || fuzzyEqualNumber(Math.abs(labelAngle), 3 * Math.PI / 2, FUZZY_EQUAL_DELTA) ? getTextAlignAttrOfVerticalDir(autoRotate, labelAngle, position) : isPostiveXAxis(labelAngle) ? DEFAULT_CARTESIAN_MARK_LINE_TEXT_STYLE_MAP.postiveXAxis[position] : DEFAULT_CARTESIAN_MARK_LINE_TEXT_STYLE_MAP.negativeXAxis[position];
|
|
@@ -40735,12 +40729,6 @@
|
|
|
40735
40729
|
});else if (!isValidNumber$1(point.x) || !isValidNumber$1(point.y)) return void (validFlag = !1);
|
|
40736
40730
|
}), validFlag;
|
|
40737
40731
|
}
|
|
40738
|
-
addMarkLineLabels(container) {
|
|
40739
|
-
this._addMarkLabels(container, "mark-common-line-label", MarkLine.defaultAttributes.label);
|
|
40740
|
-
}
|
|
40741
|
-
updateMarkLineLabels() {
|
|
40742
|
-
this._updateMarkLabels(MarkLine.defaultAttributes.label);
|
|
40743
|
-
}
|
|
40744
40732
|
}
|
|
40745
40733
|
MarkLine.defaultAttributes = DEFAULT_MARK_LINE_THEME;
|
|
40746
40734
|
|
|
@@ -40755,6 +40743,9 @@
|
|
|
40755
40743
|
getArea() {
|
|
40756
40744
|
return this._area;
|
|
40757
40745
|
}
|
|
40746
|
+
getLabel() {
|
|
40747
|
+
return this._label;
|
|
40748
|
+
}
|
|
40758
40749
|
constructor(attributes, options) {
|
|
40759
40750
|
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArea.defaultAttributes, attributes)), this.name = "markArea", this.defaultUpdateAnimation = DefaultUpdateMarkAreaAnimation, this.defaultExitAnimation = DefaultExitMarkerAnimation;
|
|
40760
40751
|
}
|
|
@@ -40771,21 +40762,24 @@
|
|
|
40771
40762
|
};
|
|
40772
40763
|
return (position.includes("left") || position.includes("Left")) && (result.x = x1), (position.includes("right") || position.includes("Right")) && (result.x = x2), (position.includes("top") || position.includes("Top")) && (result.y = y1), (position.includes("bottom") || position.includes("Bottom")) && (result.y = y2), result;
|
|
40773
40764
|
}
|
|
40774
|
-
setLabelPos(
|
|
40765
|
+
setLabelPos() {
|
|
40775
40766
|
var _a;
|
|
40776
|
-
if (this._area) {
|
|
40777
|
-
const
|
|
40767
|
+
if (this._label && this._area) {
|
|
40768
|
+
const {
|
|
40769
|
+
label = {}
|
|
40770
|
+
} = this.attribute,
|
|
40771
|
+
labelPosition = null !== (_a = label.position) && void 0 !== _a ? _a : "middle",
|
|
40778
40772
|
labelPoint = this.getPointAttrByPosition(labelPosition);
|
|
40779
|
-
if (
|
|
40780
|
-
textStyle: Object.assign(Object.assign({}, DEFAULT_CARTESIAN_MARK_AREA_TEXT_STYLE_MAP[labelPosition]),
|
|
40781
|
-
})), this.attribute.limitRect &&
|
|
40773
|
+
if (this._label.setAttributes(Object.assign(Object.assign({}, labelPoint), {
|
|
40774
|
+
textStyle: Object.assign(Object.assign({}, DEFAULT_CARTESIAN_MARK_AREA_TEXT_STYLE_MAP[labelPosition]), label.textStyle)
|
|
40775
|
+
})), this.attribute.limitRect && label.confine) {
|
|
40782
40776
|
const {
|
|
40783
40777
|
x: x,
|
|
40784
40778
|
y: y,
|
|
40785
40779
|
width: width,
|
|
40786
40780
|
height: height
|
|
40787
40781
|
} = this.attribute.limitRect;
|
|
40788
|
-
limitShapeInBounds(
|
|
40782
|
+
limitShapeInBounds(this._label, {
|
|
40789
40783
|
x1: x,
|
|
40790
40784
|
y1: y,
|
|
40791
40785
|
x2: x + width,
|
|
@@ -40797,23 +40791,40 @@
|
|
|
40797
40791
|
initMarker(container) {
|
|
40798
40792
|
const {
|
|
40799
40793
|
points: points,
|
|
40794
|
+
label: label,
|
|
40800
40795
|
areaStyle: areaStyle,
|
|
40801
40796
|
state: state
|
|
40802
40797
|
} = this.attribute,
|
|
40803
40798
|
area = graphicCreator.polygon(Object.assign({
|
|
40804
40799
|
points: points
|
|
40805
40800
|
}, areaStyle));
|
|
40806
|
-
area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area), area.name = "mark-area-polygon", this._area = area, container.add(area)
|
|
40801
|
+
area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area), area.name = "mark-area-polygon", this._area = area, container.add(area);
|
|
40802
|
+
const markLabel = new Tag(Object.assign(Object.assign({}, label), {
|
|
40803
|
+
state: {
|
|
40804
|
+
panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
|
|
40805
|
+
text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
|
|
40806
|
+
}
|
|
40807
|
+
}));
|
|
40808
|
+
markLabel.name = "mark-area-label", this._label = markLabel, container.add(markLabel), this.setLabelPos();
|
|
40807
40809
|
}
|
|
40808
40810
|
updateMarker() {
|
|
40809
40811
|
const {
|
|
40810
40812
|
points: points,
|
|
40813
|
+
label: label,
|
|
40811
40814
|
areaStyle: areaStyle,
|
|
40812
40815
|
state: state
|
|
40813
40816
|
} = this.attribute;
|
|
40814
40817
|
this._area && (this._area.setAttributes(Object.assign({
|
|
40815
40818
|
points: points
|
|
40816
|
-
}, areaStyle)), this._area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area)), this.
|
|
40819
|
+
}, areaStyle)), this._area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area)), this._label && this._label.setAttributes(Object.assign(Object.assign({
|
|
40820
|
+
dx: 0,
|
|
40821
|
+
dy: 0
|
|
40822
|
+
}, label), {
|
|
40823
|
+
state: {
|
|
40824
|
+
panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
|
|
40825
|
+
text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
|
|
40826
|
+
}
|
|
40827
|
+
})), this.setLabelPos();
|
|
40817
40828
|
}
|
|
40818
40829
|
isValidPoints() {
|
|
40819
40830
|
const {
|
|
@@ -40826,7 +40837,7 @@
|
|
|
40826
40837
|
}), validFlag;
|
|
40827
40838
|
}
|
|
40828
40839
|
}
|
|
40829
|
-
MarkArea.defaultAttributes = DEFAULT_MARK_AREA_THEME
|
|
40840
|
+
MarkArea.defaultAttributes = DEFAULT_MARK_AREA_THEME;
|
|
40830
40841
|
|
|
40831
40842
|
loadMarkArcLineComponent();
|
|
40832
40843
|
function registerMarkArcLineAnimate() {
|
|
@@ -40837,19 +40848,24 @@
|
|
|
40837
40848
|
MarkArcLine._animate && this._animationConfig && MarkArcLine._animate(this._line, this._label, this._animationConfig, state);
|
|
40838
40849
|
}
|
|
40839
40850
|
constructor(attributes, options) {
|
|
40840
|
-
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArcLine.defaultAttributes, attributes
|
|
40851
|
+
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArcLine.defaultAttributes, attributes, {
|
|
40852
|
+
label: {
|
|
40853
|
+
autoRotate: !0
|
|
40854
|
+
}
|
|
40855
|
+
})), this.name = "markArcLine";
|
|
40841
40856
|
}
|
|
40842
|
-
getPointAttrByPosition(direction
|
|
40857
|
+
getPointAttrByPosition(direction) {
|
|
40843
40858
|
const {
|
|
40844
40859
|
center: center,
|
|
40845
40860
|
radius: radius,
|
|
40846
40861
|
startAngle: startAngle,
|
|
40847
|
-
endAngle: endAngle
|
|
40862
|
+
endAngle: endAngle,
|
|
40863
|
+
label: label
|
|
40848
40864
|
} = this.attribute,
|
|
40849
40865
|
{
|
|
40850
40866
|
refX = 0,
|
|
40851
40867
|
refY = 0
|
|
40852
|
-
} =
|
|
40868
|
+
} = label;
|
|
40853
40869
|
let angle;
|
|
40854
40870
|
switch (direction) {
|
|
40855
40871
|
case IMarkCommonArcLabelPosition.arcInnerStart:
|
|
@@ -40879,9 +40895,9 @@
|
|
|
40879
40895
|
getTextStyle(position) {
|
|
40880
40896
|
return DEFAULT_POLAR_MARKER_TEXT_STYLE_MAP[position];
|
|
40881
40897
|
}
|
|
40882
|
-
getRotateByAngle(angle
|
|
40898
|
+
getRotateByAngle(angle) {
|
|
40883
40899
|
var _a;
|
|
40884
|
-
return angle - Math.PI / 2 + (null !== (_a =
|
|
40900
|
+
return angle - Math.PI / 2 + (null !== (_a = this.attribute.label.refAngle) && void 0 !== _a ? _a : 0);
|
|
40885
40901
|
}
|
|
40886
40902
|
createSegment() {
|
|
40887
40903
|
const {
|
|
@@ -40938,12 +40954,6 @@
|
|
|
40938
40954
|
isValidPoints() {
|
|
40939
40955
|
return !0;
|
|
40940
40956
|
}
|
|
40941
|
-
addMarkLineLabels(container) {
|
|
40942
|
-
this._addMarkLabels(container, "mark-common-line-label", MarkArcLine.defaultAttributes.label);
|
|
40943
|
-
}
|
|
40944
|
-
updateMarkLineLabels() {
|
|
40945
|
-
this._updateMarkLabels(MarkArcLine.defaultAttributes.label);
|
|
40946
|
-
}
|
|
40947
40957
|
}
|
|
40948
40958
|
MarkArcLine.defaultAttributes = DEFAULT_MARK_ARC_LINE_THEME;
|
|
40949
40959
|
|
|
@@ -40958,21 +40968,29 @@
|
|
|
40958
40968
|
getArea() {
|
|
40959
40969
|
return this._area;
|
|
40960
40970
|
}
|
|
40971
|
+
getLabel() {
|
|
40972
|
+
return this._label;
|
|
40973
|
+
}
|
|
40961
40974
|
constructor(attributes, options) {
|
|
40962
|
-
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArcArea.defaultAttributes, attributes
|
|
40975
|
+
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, MarkArcArea.defaultAttributes, attributes, {
|
|
40976
|
+
label: {
|
|
40977
|
+
autoRotate: !0
|
|
40978
|
+
}
|
|
40979
|
+
})), this.name = "markArcArea", this.defaultUpdateAnimation = DefaultUpdateMarkAreaAnimation, this.defaultExitAnimation = DefaultExitMarkerAnimation;
|
|
40963
40980
|
}
|
|
40964
|
-
getPointAttrByPosition(position
|
|
40981
|
+
getPointAttrByPosition(position) {
|
|
40965
40982
|
const {
|
|
40966
40983
|
center: center,
|
|
40967
40984
|
innerRadius: innerRadius,
|
|
40968
40985
|
outerRadius: outerRadius,
|
|
40969
40986
|
startAngle: startAngle,
|
|
40970
|
-
endAngle: endAngle
|
|
40987
|
+
endAngle: endAngle,
|
|
40988
|
+
label: label
|
|
40971
40989
|
} = this.attribute,
|
|
40972
40990
|
{
|
|
40973
40991
|
refX = 0,
|
|
40974
40992
|
refY = 0
|
|
40975
|
-
} =
|
|
40993
|
+
} = label;
|
|
40976
40994
|
let radius, angle;
|
|
40977
40995
|
switch (position) {
|
|
40978
40996
|
case IMarkCommonArcLabelPosition.center:
|
|
@@ -41007,25 +41025,28 @@
|
|
|
41007
41025
|
angle: angle
|
|
41008
41026
|
};
|
|
41009
41027
|
}
|
|
41010
|
-
setLabelPos(
|
|
41028
|
+
setLabelPos() {
|
|
41011
41029
|
var _a;
|
|
41012
|
-
if (this._area) {
|
|
41030
|
+
if (this._label && this._area) {
|
|
41013
41031
|
const {
|
|
41032
|
+
label = {}
|
|
41033
|
+
} = this.attribute,
|
|
41034
|
+
{
|
|
41014
41035
|
position: labelPosition = "arcInnerMiddle",
|
|
41015
41036
|
autoRotate: autoRotate
|
|
41016
|
-
} =
|
|
41017
|
-
labelAttr = this.getPointAttrByPosition(labelPosition
|
|
41018
|
-
if (
|
|
41019
|
-
angle: autoRotate ? labelAttr.angle - Math.PI / 2 + (null !== (_a =
|
|
41020
|
-
textStyle: Object.assign(Object.assign({}, DEFAULT_POLAR_MARKER_TEXT_STYLE_MAP[labelPosition]),
|
|
41021
|
-
})), this.attribute.limitRect &&
|
|
41037
|
+
} = label,
|
|
41038
|
+
labelAttr = this.getPointAttrByPosition(labelPosition);
|
|
41039
|
+
if (this._label.setAttributes(Object.assign(Object.assign({}, labelAttr.position), {
|
|
41040
|
+
angle: autoRotate ? labelAttr.angle - Math.PI / 2 + (null !== (_a = label.refAngle) && void 0 !== _a ? _a : 0) : 0,
|
|
41041
|
+
textStyle: Object.assign(Object.assign({}, DEFAULT_POLAR_MARKER_TEXT_STYLE_MAP[labelPosition]), label.textStyle)
|
|
41042
|
+
})), this.attribute.limitRect && label.confine) {
|
|
41022
41043
|
const {
|
|
41023
41044
|
x: x,
|
|
41024
41045
|
y: y,
|
|
41025
41046
|
width: width,
|
|
41026
41047
|
height: height
|
|
41027
41048
|
} = this.attribute.limitRect;
|
|
41028
|
-
limitShapeInBounds(
|
|
41049
|
+
limitShapeInBounds(this._label, {
|
|
41029
41050
|
x1: x,
|
|
41030
41051
|
y1: y,
|
|
41031
41052
|
x2: x + width,
|
|
@@ -41042,6 +41063,7 @@
|
|
|
41042
41063
|
startAngle: startAngle,
|
|
41043
41064
|
endAngle: endAngle,
|
|
41044
41065
|
areaStyle: areaStyle,
|
|
41066
|
+
label: label,
|
|
41045
41067
|
state: state
|
|
41046
41068
|
} = this.attribute,
|
|
41047
41069
|
area = graphicCreator.arc(Object.assign({
|
|
@@ -41052,7 +41074,14 @@
|
|
|
41052
41074
|
startAngle: startAngle,
|
|
41053
41075
|
endAngle: endAngle
|
|
41054
41076
|
}, areaStyle));
|
|
41055
|
-
area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area), area.name = "polar-mark-area-area", this._area = area, container.add(area)
|
|
41077
|
+
area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area), area.name = "polar-mark-area-area", this._area = area, container.add(area);
|
|
41078
|
+
const markLabel = new Tag(Object.assign(Object.assign({}, label), {
|
|
41079
|
+
state: {
|
|
41080
|
+
panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
|
|
41081
|
+
text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
|
|
41082
|
+
}
|
|
41083
|
+
}));
|
|
41084
|
+
markLabel.name = "mark-area-label", this._label = markLabel, container.add(markLabel), this.setLabelPos();
|
|
41056
41085
|
}
|
|
41057
41086
|
updateMarker() {
|
|
41058
41087
|
const {
|
|
@@ -41072,13 +41101,21 @@
|
|
|
41072
41101
|
outerRadius: outerRadius,
|
|
41073
41102
|
startAngle: startAngle,
|
|
41074
41103
|
endAngle: endAngle
|
|
41075
|
-
}, areaStyle)), this._area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area)), this.
|
|
41104
|
+
}, areaStyle)), this._area.states = merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.area)), this._label && (this._label.setAttributes(Object.assign(Object.assign({
|
|
41105
|
+
dx: 0,
|
|
41106
|
+
dy: 0
|
|
41107
|
+
}, label), {
|
|
41108
|
+
state: {
|
|
41109
|
+
panel: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.labelBackground),
|
|
41110
|
+
text: merge$1({}, DEFAULT_STATES$2, null == state ? void 0 : state.label)
|
|
41111
|
+
}
|
|
41112
|
+
})), this.setLabelPos());
|
|
41076
41113
|
}
|
|
41077
41114
|
isValidPoints() {
|
|
41078
41115
|
return !0;
|
|
41079
41116
|
}
|
|
41080
41117
|
}
|
|
41081
|
-
MarkArcArea.defaultAttributes = DEFAULT_MARK_ARC_AREA_THEME
|
|
41118
|
+
MarkArcArea.defaultAttributes = DEFAULT_MARK_ARC_AREA_THEME;
|
|
41082
41119
|
|
|
41083
41120
|
loadMarkPointComponent();
|
|
41084
41121
|
function registerMarkPointAnimate() {
|
|
@@ -42598,19 +42635,23 @@
|
|
|
42598
42635
|
} = this.attribute;
|
|
42599
42636
|
tooltip && tooltip.alwaysShow || (this._tooltipState = null, this._tooltipShape && this._tooltipShape.setAttribute("visible", !1), this._tooltipText && this._tooltipText.setAttribute("visible", !1), this._dispatchTooltipEvent("sliderTooltipHide"));
|
|
42600
42637
|
}, this._onHandlerPointerdown = e => {
|
|
42601
|
-
|
|
42638
|
+
this._clearAllDragEvents(), this._isChanging = !0;
|
|
42602
42639
|
const {
|
|
42603
42640
|
x: x,
|
|
42604
42641
|
y: y
|
|
42605
42642
|
} = this.stage.eventPointTransform(e);
|
|
42606
|
-
this._currentHandler = e.target, this._prePos = this._isHorizontal ? x : y
|
|
42607
|
-
|
|
42608
|
-
|
|
42609
|
-
|
|
42610
|
-
|
|
42643
|
+
this._currentHandler = e.target, this._prePos = this._isHorizontal ? x : y;
|
|
42644
|
+
const triggers = getEndTriggersOfDrag(),
|
|
42645
|
+
obj = "browser" === vglobal.env ? vglobal : this.stage;
|
|
42646
|
+
obj.addEventListener("pointermove", this._onHandlerPointerMove, {
|
|
42647
|
+
capture: !0,
|
|
42648
|
+
passive: !1
|
|
42649
|
+
}), triggers.forEach(trigger => {
|
|
42650
|
+
obj.addEventListener(trigger, this._onHandlerPointerUp);
|
|
42651
|
+
});
|
|
42611
42652
|
}, this._onHandlerPointerMove = e => {
|
|
42612
42653
|
var _a, _b;
|
|
42613
|
-
e.
|
|
42654
|
+
e.preventDefault(), this._isChanging = !0;
|
|
42614
42655
|
const {
|
|
42615
42656
|
railWidth: railWidth,
|
|
42616
42657
|
railHeight: railHeight,
|
|
@@ -42631,24 +42672,26 @@
|
|
|
42631
42672
|
currentValue = this.calculateValueByPos(newPos);
|
|
42632
42673
|
"text" === this._currentHandler.type ? this._updateHandlerText(this._currentHandler, newPos, currentValue) : this._updateHandler(this._currentHandler, newPos, currentValue), this._updateTrack(), this._prePos = currentPos, this._dispatchChangeEvent();
|
|
42633
42674
|
}, this._onHandlerPointerUp = e => {
|
|
42634
|
-
|
|
42635
|
-
|
|
42636
|
-
|
|
42637
|
-
capture: !0
|
|
42638
|
-
}), this.stage.removeEventListener("pointerup", this._onHandlerPointerUp), this.stage.removeEventListener("pointerupoutside", this._onHandlerPointerUp));
|
|
42675
|
+
this._isChanging = !1, this._currentHandler = null, this._clearAllDragEvents();
|
|
42676
|
+
}, this._handleTouchMove = e => {
|
|
42677
|
+
this._isChanging && e.preventDefault();
|
|
42639
42678
|
}, this._onTrackPointerdown = e => {
|
|
42640
|
-
|
|
42679
|
+
this._clearAllDragEvents(), this._isChanging = !0;
|
|
42641
42680
|
const {
|
|
42642
42681
|
x: x,
|
|
42643
42682
|
y: y
|
|
42644
42683
|
} = this.stage.eventPointTransform(e);
|
|
42645
|
-
this._prePos = this._isHorizontal ? x : y
|
|
42646
|
-
|
|
42647
|
-
|
|
42648
|
-
|
|
42649
|
-
|
|
42684
|
+
this._prePos = this._isHorizontal ? x : y;
|
|
42685
|
+
const triggers = getEndTriggersOfDrag(),
|
|
42686
|
+
obj = "browser" === vglobal.env ? vglobal : this.stage;
|
|
42687
|
+
obj.addEventListener("pointermove", this._onTrackPointerMove, {
|
|
42688
|
+
capture: !0,
|
|
42689
|
+
passive: !1
|
|
42690
|
+
}), triggers.forEach(trigger => {
|
|
42691
|
+
obj.addEventListener(trigger, this._onTrackPointerUp);
|
|
42692
|
+
});
|
|
42650
42693
|
}, this._onTrackPointerMove = e => {
|
|
42651
|
-
e.
|
|
42694
|
+
e.preventDefault(), this._isChanging = !0;
|
|
42652
42695
|
const {
|
|
42653
42696
|
railWidth: railWidth,
|
|
42654
42697
|
railHeight: railHeight,
|
|
@@ -42689,13 +42732,9 @@
|
|
|
42689
42732
|
}
|
|
42690
42733
|
this._prePos = currentPos, this._dispatchChangeEvent();
|
|
42691
42734
|
}, this._onTrackPointerUp = e => {
|
|
42692
|
-
|
|
42693
|
-
capture: !0
|
|
42694
|
-
}), vglobal.removeEventListener("pointerup", this._onTrackPointerUp)) : (this.stage.removeEventListener("pointermove", this._onTrackPointerMove, {
|
|
42695
|
-
capture: !0
|
|
42696
|
-
}), this.stage.removeEventListener("pointerup", this._onTrackPointerUp), this.stage.removeEventListener("pointerupoutside", this._onTrackPointerUp));
|
|
42735
|
+
this._isChanging = !1, this._clearAllDragEvents();
|
|
42697
42736
|
}, this._onRailPointerDown = e => {
|
|
42698
|
-
|
|
42737
|
+
this._clearAllDragEvents(), this._isChanging = !0;
|
|
42699
42738
|
const {
|
|
42700
42739
|
railWidth: railWidth,
|
|
42701
42740
|
railHeight: railHeight,
|
|
@@ -43016,11 +43055,28 @@
|
|
|
43016
43055
|
slidable: slidable,
|
|
43017
43056
|
range: range
|
|
43018
43057
|
} = this.attribute;
|
|
43019
|
-
slidable && (this._startHandler && this._startHandler.addEventListener("pointerdown", this._onHandlerPointerdown), this._startHandlerText && this._startHandlerText.addEventListener("pointerdown", this._onHandlerPointerdown), this._endHandler && this._endHandler.addEventListener("pointerdown", this._onHandlerPointerdown), this._endHandlerText && this._endHandlerText.addEventListener("pointerdown", this._onHandlerPointerdown), isObject$2(range) && range.draggableTrack && this._track.addEventListener("pointerdown", this._onTrackPointerdown), this._railContainer.addEventListener("pointerdown", this._onRailPointerDown))
|
|
43058
|
+
slidable && (this._startHandler && this._startHandler.addEventListener("pointerdown", this._onHandlerPointerdown), this._startHandlerText && this._startHandlerText.addEventListener("pointerdown", this._onHandlerPointerdown), this._endHandler && this._endHandler.addEventListener("pointerdown", this._onHandlerPointerdown), this._endHandlerText && this._endHandlerText.addEventListener("pointerdown", this._onHandlerPointerdown), isObject$2(range) && range.draggableTrack && this._track.addEventListener("pointerdown", this._onTrackPointerdown), this._railContainer.addEventListener("pointerdown", this._onRailPointerDown), ("browser" === vglobal.env ? vglobal : this.stage).addEventListener("touchmove", this._handleTouchMove, {
|
|
43059
|
+
passive: !1
|
|
43060
|
+
}));
|
|
43020
43061
|
}
|
|
43021
43062
|
_bindTooltipEvents() {
|
|
43022
43063
|
this.attribute.disableTriggerEvent || (this._mainContainer.addEventListener("pointerenter", this._onTooltipShow), this._mainContainer.addEventListener("pointermove", this._onTooltipUpdate), this._mainContainer.addEventListener("pointerleave", this._onTooltipHide));
|
|
43023
43064
|
}
|
|
43065
|
+
_clearAllDragEvents() {
|
|
43066
|
+
const triggers = getEndTriggersOfDrag(),
|
|
43067
|
+
obj = "browser" === vglobal.env ? vglobal : this.stage;
|
|
43068
|
+
obj.removeEventListener("pointermove", this._onHandlerPointerMove, {
|
|
43069
|
+
capture: !0,
|
|
43070
|
+
passive: !1
|
|
43071
|
+
}), triggers.forEach(trigger => {
|
|
43072
|
+
obj.removeEventListener(trigger, this._onHandlerPointerUp);
|
|
43073
|
+
}), obj.removeEventListener("pointermove", this._onTrackPointerMove, {
|
|
43074
|
+
capture: !0,
|
|
43075
|
+
passive: !1
|
|
43076
|
+
}), triggers.forEach(trigger => {
|
|
43077
|
+
obj.removeEventListener(trigger, this._onTrackPointerUp);
|
|
43078
|
+
});
|
|
43079
|
+
}
|
|
43024
43080
|
_updateTrack() {
|
|
43025
43081
|
const {
|
|
43026
43082
|
inverse: inverse,
|
|
@@ -43119,6 +43175,11 @@
|
|
|
43119
43175
|
endHandler: endHandler
|
|
43120
43176
|
};
|
|
43121
43177
|
}
|
|
43178
|
+
release(all) {
|
|
43179
|
+
super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).addEventListener("touchmove", this._handleTouchMove, {
|
|
43180
|
+
passive: !1
|
|
43181
|
+
}), this._clearAllDragEvents();
|
|
43182
|
+
}
|
|
43122
43183
|
}
|
|
43123
43184
|
Slider.defaultAttributes = {
|
|
43124
43185
|
slidable: !0,
|
|
@@ -44400,7 +44461,7 @@
|
|
|
44400
44461
|
const DEFAULT_BRUSH_ATTRIBUTES = {
|
|
44401
44462
|
trigger: "pointerdown",
|
|
44402
44463
|
updateTrigger: "pointermove",
|
|
44403
|
-
endTrigger: "pointerup",
|
|
44464
|
+
endTrigger: ["pointerup", "pointerleave"],
|
|
44404
44465
|
resetTrigger: "pointerupoutside",
|
|
44405
44466
|
hasMask: !0,
|
|
44406
44467
|
brushMode: "single",
|
|
@@ -44438,41 +44499,22 @@
|
|
|
44438
44499
|
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, Brush.defaultAttributes, attributes)), this.name = "brush", this._activeDrawState = !1, this._cacheDrawPoints = [], this._isDrawedBeforeEnd = !1, this._isDownBeforeUpOutside = !1, this._activeMoveState = !1, this._operatingMaskMoveDx = 0, this._operatingMaskMoveDy = 0, this._operatingMaskMoveRangeX = [-1 / 0, 1 / 0], this._operatingMaskMoveRangeY = [-1 / 0, 1 / 0], this._brushMaskAABBBoundsDict = {}, this._onBrushStart = e => {
|
|
44439
44500
|
var _a;
|
|
44440
44501
|
if (this._outOfInteractiveRange(e)) return void (this._isDownBeforeUpOutside = !0);
|
|
44441
|
-
e.stopPropagation();
|
|
44502
|
+
this._isDownBeforeUpOutside = !1, e.stopPropagation();
|
|
44442
44503
|
const brushMoved = null === (_a = this.attribute.brushMoved) || void 0 === _a || _a;
|
|
44443
44504
|
this._activeMoveState = brushMoved && this._isPosInBrushMask(e), this._activeDrawState = !this._activeMoveState, this._activeDrawState && this._initDraw(e), this._activeMoveState && this._initMove(e);
|
|
44444
44505
|
}, this._onBrushing = e => {
|
|
44445
44506
|
this._outOfInteractiveRange(e) || ((this._activeDrawState || this._activeMoveState) && e.stopPropagation(), this._activeDrawState && this._drawing(e), this._activeMoveState && this._moving(e));
|
|
44446
44507
|
}, this._onBrushingWithDelay = 0 === this.attribute.delayTime ? this._onBrushing : delayMap$1[this.attribute.delayType](this._onBrushing, this.attribute.delayTime), this._onBrushEnd = e => {
|
|
44447
44508
|
var _a;
|
|
44509
|
+
if (this._isDownBeforeUpOutside) return this._isEmptyMask() || (this._clearMask(), this._dispatchBrushEvent(IOperateType.brushClear, e)), void (this._isDownBeforeUpOutside = !1);
|
|
44448
44510
|
if (!this._activeDrawState && !this._activeMoveState) return;
|
|
44449
44511
|
e.preventDefault();
|
|
44450
44512
|
const {
|
|
44451
44513
|
removeOnClick = !0
|
|
44452
44514
|
} = this.attribute;
|
|
44453
|
-
this._activeDrawState && !this._isDrawedBeforeEnd && removeOnClick ? (
|
|
44454
|
-
operateMask: this._operatingMask,
|
|
44455
|
-
operatedMaskAABBBounds: this._brushMaskAABBBoundsDict,
|
|
44456
|
-
event: e
|
|
44457
|
-
}), this._container.incrementalClearChild(), this._brushMaskAABBBoundsDict = {}) : (this._activeDrawState && this._dispatchEvent(IOperateType.drawEnd, {
|
|
44458
|
-
operateMask: this._operatingMask,
|
|
44459
|
-
operatedMaskAABBBounds: this._brushMaskAABBBoundsDict,
|
|
44460
|
-
event: e
|
|
44461
|
-
}), this._activeMoveState && this._dispatchEvent(IOperateType.moveEnd, {
|
|
44462
|
-
operateMask: this._operatingMask,
|
|
44463
|
-
operatedMaskAABBBounds: this._brushMaskAABBBoundsDict,
|
|
44464
|
-
event: e
|
|
44465
|
-
})), this._activeDrawState = !1, this._activeMoveState = !1, this._isDrawedBeforeEnd = !1, this._operatingMask && this._operatingMask.setAttribute("pickable", !1);
|
|
44515
|
+
this._activeDrawState && !this._isDrawedBeforeEnd && removeOnClick ? (null === (_a = this._operatingMask) || void 0 === _a ? void 0 : _a._AABBBounds.empty()) ? this._isEmptyMask() || (this._clearMask(), this._dispatchBrushEvent(IOperateType.brushClear, e)) : (delete this._brushMaskAABBBoundsDict[this._operatingMask.name], this._container.setAttributes({}), this._container.removeChild(this._operatingMask), this._isEmptyMask() ? this._dispatchBrushEvent(IOperateType.drawEnd, e) : this._dispatchBrushEvent(IOperateType.brushClear, e)) : (this._activeDrawState && this._dispatchBrushEvent(IOperateType.drawEnd, e), this._activeMoveState && this._dispatchBrushEvent(IOperateType.moveEnd, e)), this._activeDrawState = !1, this._activeMoveState = !1, this._isDrawedBeforeEnd = !1, this._operatingMask && this._operatingMask.setAttribute("pickable", !1);
|
|
44466
44516
|
}, this._onBrushClear = e => {
|
|
44467
|
-
e.preventDefault();
|
|
44468
|
-
const {
|
|
44469
|
-
removeOnClick = !0
|
|
44470
|
-
} = this.attribute;
|
|
44471
|
-
this._isDownBeforeUpOutside && removeOnClick && (this._dispatchEvent(IOperateType.brushClear, {
|
|
44472
|
-
operateMask: this._operatingMask,
|
|
44473
|
-
operatedMaskAABBBounds: this._brushMaskAABBBoundsDict,
|
|
44474
|
-
event: e
|
|
44475
|
-
}), this._container.incrementalClearChild(), this._brushMaskAABBBoundsDict = {}), this._activeDrawState = !1, this._activeMoveState = !1, this._isDrawedBeforeEnd = !1, this._isDownBeforeUpOutside = !1, this._operatingMask && this._operatingMask.setAttribute("pickable", !1);
|
|
44517
|
+
e.preventDefault(), this._isEmptyMask() || (this._clearMask(), this._dispatchBrushEvent(IOperateType.brushClear, e)), this._activeDrawState = !1, this._activeMoveState = !1, this._isDrawedBeforeEnd = !1, this._isDownBeforeUpOutside = !1;
|
|
44476
44518
|
};
|
|
44477
44519
|
}
|
|
44478
44520
|
_bindBrushEvents() {
|
|
@@ -44483,35 +44525,14 @@
|
|
|
44483
44525
|
endTrigger = DEFAULT_BRUSH_ATTRIBUTES.endTrigger,
|
|
44484
44526
|
resetTrigger = DEFAULT_BRUSH_ATTRIBUTES.resetTrigger
|
|
44485
44527
|
} = this.attribute;
|
|
44486
|
-
array(trigger).forEach(t =>
|
|
44487
|
-
}
|
|
44488
|
-
_isPosInBrushMask(e) {
|
|
44489
|
-
const pos = this.eventPosToStagePos(e),
|
|
44490
|
-
brushMasks = this._container.getChildren();
|
|
44491
|
-
for (let i = 0; i < brushMasks.length; i++) {
|
|
44492
|
-
const {
|
|
44493
|
-
points = [],
|
|
44494
|
-
dx = 0,
|
|
44495
|
-
dy = 0
|
|
44496
|
-
} = brushMasks[i].attribute,
|
|
44497
|
-
pointsConsiderOffset = points.map(point => ({
|
|
44498
|
-
x: point.x + dx,
|
|
44499
|
-
y: point.y + dy
|
|
44500
|
-
}));
|
|
44501
|
-
if (polygonContainPoint(pointsConsiderOffset, pos.x, pos.y)) return this._operatingMask = brushMasks[i], !0;
|
|
44502
|
-
}
|
|
44503
|
-
return !1;
|
|
44528
|
+
array(trigger).forEach(t => this.stage.addEventListener(t, this._onBrushStart)), array(updateTrigger).forEach(t => this.stage.addEventListener(t, this._onBrushingWithDelay)), array(endTrigger).forEach(t => this.stage.addEventListener(t, this._onBrushEnd)), array(resetTrigger).forEach(t => this.stage.addEventListener(t, this._onBrushClear));
|
|
44504
44529
|
}
|
|
44505
44530
|
_initDraw(e) {
|
|
44506
44531
|
const {
|
|
44507
44532
|
brushMode: brushMode
|
|
44508
44533
|
} = this.attribute,
|
|
44509
44534
|
pos = this.eventPosToStagePos(e);
|
|
44510
|
-
this._cacheDrawPoints = [pos], this._isDrawedBeforeEnd = !1, "single" === brushMode &&
|
|
44511
|
-
operateMask: this._operatingMask,
|
|
44512
|
-
operatedMaskAABBBounds: this._brushMaskAABBBoundsDict,
|
|
44513
|
-
event: e
|
|
44514
|
-
});
|
|
44535
|
+
this._cacheDrawPoints = [pos], this._isDrawedBeforeEnd = !1, "single" === brushMode && this._clearMask(), this._addBrushMask(), this._dispatchBrushEvent(IOperateType.drawStart, e);
|
|
44515
44536
|
}
|
|
44516
44537
|
_initMove(e) {
|
|
44517
44538
|
var _a, _b;
|
|
@@ -44535,11 +44556,7 @@
|
|
|
44535
44556
|
maxMoveStepX = maxX - x2,
|
|
44536
44557
|
minMoveStepY = minY - y1,
|
|
44537
44558
|
maxMoveStepY = maxY - y2;
|
|
44538
|
-
this._operatingMaskMoveRangeX = [minMoveStepX, maxMoveStepX], this._operatingMaskMoveRangeY = [minMoveStepY, maxMoveStepY], this._operatingMask.setAttribute("pickable", !0), this.
|
|
44539
|
-
operateMask: this._operatingMask,
|
|
44540
|
-
operatedMaskAABBBounds: this._brushMaskAABBBoundsDict,
|
|
44541
|
-
event: e
|
|
44542
|
-
});
|
|
44559
|
+
this._operatingMaskMoveRangeX = [minMoveStepX, maxMoveStepX], this._operatingMaskMoveRangeY = [minMoveStepY, maxMoveStepY], this._operatingMask.setAttribute("pickable", !0), this._dispatchBrushEvent(IOperateType.moveStart, e);
|
|
44543
44560
|
}
|
|
44544
44561
|
_drawing(e) {
|
|
44545
44562
|
var _a, _b;
|
|
@@ -44562,11 +44579,7 @@
|
|
|
44562
44579
|
y1 = 0,
|
|
44563
44580
|
y2 = 0
|
|
44564
44581
|
} = null === (_b = this._operatingMask) || void 0 === _b ? void 0 : _b._AABBBounds;
|
|
44565
|
-
this._isDrawedBeforeEnd = !this._operatingMask._AABBBounds.empty() && !!(Math.abs(x2 - x1) > sizeThreshold || Math.abs(y1 - y2) > sizeThreshold), this._isDrawedBeforeEnd && (this._brushMaskAABBBoundsDict[this._operatingMask.name] = this._operatingMask.AABBBounds, this.
|
|
44566
|
-
operateMask: this._operatingMask,
|
|
44567
|
-
operatedMaskAABBBounds: this._brushMaskAABBBoundsDict,
|
|
44568
|
-
event: e
|
|
44569
|
-
}));
|
|
44582
|
+
this._isDrawedBeforeEnd = !this._operatingMask._AABBBounds.empty() && !!(Math.abs(x2 - x1) > sizeThreshold || Math.abs(y1 - y2) > sizeThreshold), this._isDrawedBeforeEnd && (this._brushMaskAABBBoundsDict[this._operatingMask.name] = this._operatingMask.AABBBounds), this._dispatchBrushEvent(IOperateType.drawing, e);
|
|
44570
44583
|
}
|
|
44571
44584
|
_moving(e) {
|
|
44572
44585
|
const startPos = this._cacheMovePoint,
|
|
@@ -44579,11 +44592,21 @@
|
|
|
44579
44592
|
this._operatingMask.setAttributes({
|
|
44580
44593
|
dx: moveX,
|
|
44581
44594
|
dy: moveY
|
|
44582
|
-
}), this._brushMaskAABBBoundsDict[this._operatingMask.name] = this._operatingMask.AABBBounds, this.
|
|
44583
|
-
|
|
44584
|
-
|
|
44585
|
-
|
|
44586
|
-
});
|
|
44595
|
+
}), this._brushMaskAABBBoundsDict[this._operatingMask.name] = this._operatingMask.AABBBounds, this._dispatchBrushEvent(IOperateType.moving, e);
|
|
44596
|
+
}
|
|
44597
|
+
render() {
|
|
44598
|
+
this.releaseBrushEvents(), this._bindBrushEvents();
|
|
44599
|
+
const group = this.createOrUpdateChild("brush-container", {}, "group");
|
|
44600
|
+
this._container = group;
|
|
44601
|
+
}
|
|
44602
|
+
releaseBrushEvents() {
|
|
44603
|
+
const {
|
|
44604
|
+
trigger = DEFAULT_BRUSH_ATTRIBUTES.trigger,
|
|
44605
|
+
updateTrigger = DEFAULT_BRUSH_ATTRIBUTES.updateTrigger,
|
|
44606
|
+
endTrigger = DEFAULT_BRUSH_ATTRIBUTES.endTrigger,
|
|
44607
|
+
resetTrigger = DEFAULT_BRUSH_ATTRIBUTES.resetTrigger
|
|
44608
|
+
} = this.attribute;
|
|
44609
|
+
array(trigger).forEach(t => this.stage.removeEventListener(t, this._onBrushStart)), array(updateTrigger).forEach(t => this.stage.removeEventListener(t, this._onBrushingWithDelay)), array(endTrigger).forEach(t => this.stage.removeEventListener(t, this._onBrushEnd)), array(resetTrigger).forEach(t => this.stage.removeEventListener(t, this._onBrushClear));
|
|
44587
44610
|
}
|
|
44588
44611
|
_computeMaskPoints() {
|
|
44589
44612
|
const {
|
|
@@ -44641,6 +44664,23 @@
|
|
|
44641
44664
|
}));
|
|
44642
44665
|
brushMask.name = `brush-${Date.now()}`, this._operatingMask = brushMask, this._container.add(brushMask), this._brushMaskAABBBoundsDict[brushMask.name] = brushMask.AABBBounds;
|
|
44643
44666
|
}
|
|
44667
|
+
_isPosInBrushMask(e) {
|
|
44668
|
+
const pos = this.eventPosToStagePos(e),
|
|
44669
|
+
brushMasks = this._container.getChildren();
|
|
44670
|
+
for (let i = 0; i < brushMasks.length; i++) {
|
|
44671
|
+
const {
|
|
44672
|
+
points = [],
|
|
44673
|
+
dx = 0,
|
|
44674
|
+
dy = 0
|
|
44675
|
+
} = brushMasks[i].attribute,
|
|
44676
|
+
pointsConsiderOffset = points.map(point => ({
|
|
44677
|
+
x: point.x + dx,
|
|
44678
|
+
y: point.y + dy
|
|
44679
|
+
}));
|
|
44680
|
+
if (polygonContainPoint(pointsConsiderOffset, pos.x, pos.y)) return this._operatingMask = brushMasks[i], !0;
|
|
44681
|
+
}
|
|
44682
|
+
return !1;
|
|
44683
|
+
}
|
|
44644
44684
|
_outOfInteractiveRange(e) {
|
|
44645
44685
|
const {
|
|
44646
44686
|
interactiveRange: interactiveRange
|
|
@@ -44657,21 +44697,18 @@
|
|
|
44657
44697
|
eventPosToStagePos(e) {
|
|
44658
44698
|
return this.stage.eventPointTransform(e);
|
|
44659
44699
|
}
|
|
44660
|
-
|
|
44661
|
-
this.
|
|
44662
|
-
|
|
44663
|
-
|
|
44700
|
+
_dispatchBrushEvent(operateType, e) {
|
|
44701
|
+
this._dispatchEvent(operateType, {
|
|
44702
|
+
operateMask: this._operatingMask,
|
|
44703
|
+
operatedMaskAABBBounds: this._brushMaskAABBBoundsDict,
|
|
44704
|
+
event: e
|
|
44705
|
+
});
|
|
44664
44706
|
}
|
|
44665
|
-
|
|
44666
|
-
|
|
44667
|
-
|
|
44668
|
-
|
|
44669
|
-
|
|
44670
|
-
updateTrigger = DEFAULT_BRUSH_ATTRIBUTES.updateTrigger,
|
|
44671
|
-
endTrigger = DEFAULT_BRUSH_ATTRIBUTES.endTrigger,
|
|
44672
|
-
resetTrigger = DEFAULT_BRUSH_ATTRIBUTES.resetTrigger
|
|
44673
|
-
} = this.attribute;
|
|
44674
|
-
array(trigger).forEach(t => vglobal.removeEventListener(t, this._onBrushStart)), array(updateTrigger).forEach(t => this.stage.removeEventListener(t, this._onBrushingWithDelay)), array(endTrigger).forEach(t => this.stage.removeEventListener(t, this._onBrushEnd)), array(resetTrigger).forEach(t => this.stage.removeEventListener(t, this._onBrushClear));
|
|
44707
|
+
_clearMask() {
|
|
44708
|
+
this._brushMaskAABBBoundsDict = {}, this._container.incrementalClearChild(), this._operatingMask = null;
|
|
44709
|
+
}
|
|
44710
|
+
_isEmptyMask() {
|
|
44711
|
+
return isEmpty(this._brushMaskAABBBoundsDict) || Object.keys(this._brushMaskAABBBoundsDict).every(key => this._brushMaskAABBBoundsDict[key].empty());
|
|
44675
44712
|
}
|
|
44676
44713
|
};
|
|
44677
44714
|
Brush$1.defaultAttributes = DEFAULT_BRUSH_ATTRIBUTES;
|
|
@@ -63658,7 +63695,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
63658
63695
|
};
|
|
63659
63696
|
registerVChartCore();
|
|
63660
63697
|
|
|
63661
|
-
const version = "1.13.9-alpha.
|
|
63698
|
+
const version = "1.13.9-alpha.10";
|
|
63662
63699
|
|
|
63663
63700
|
const addVChartProperty = (data, op) => {
|
|
63664
63701
|
const context = op.beforeCall();
|
|
@@ -98029,14 +98066,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98029
98066
|
return 'cartesian';
|
|
98030
98067
|
}
|
|
98031
98068
|
_createMarkerComponent() {
|
|
98032
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
98033
|
-
const { startSymbol = {}, endSymbol = {} } = this._spec;
|
|
98034
|
-
const label = array((_a = this._spec.label) !== null && _a !== void 0 ? _a : {});
|
|
98069
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
98070
|
+
const { label = {}, startSymbol = {}, endSymbol = {} } = this._spec;
|
|
98035
98071
|
const markLineAttrs = {
|
|
98036
98072
|
zIndex: this.layoutZIndex,
|
|
98037
|
-
interactive: (
|
|
98038
|
-
hover: (
|
|
98039
|
-
select: (
|
|
98073
|
+
interactive: (_a = this._spec.interactive) !== null && _a !== void 0 ? _a : true,
|
|
98074
|
+
hover: (_b = this._spec.interactive) !== null && _b !== void 0 ? _b : true,
|
|
98075
|
+
select: (_c = this._spec.interactive) !== null && _c !== void 0 ? _c : true,
|
|
98040
98076
|
points: [
|
|
98041
98077
|
{ x: 0, y: 0 },
|
|
98042
98078
|
{ x: 0, y: 0 }
|
|
@@ -98048,25 +98084,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98048
98084
|
radius: 0,
|
|
98049
98085
|
startAngle: 0,
|
|
98050
98086
|
endAngle: 0,
|
|
98051
|
-
lineStyle: transformStyle(transformToGraphic((
|
|
98052
|
-
clipInRange: (
|
|
98053
|
-
label: label.
|
|
98054
|
-
return transformLabelAttributes(labelItem, this._markerData, this._markAttributeContext);
|
|
98055
|
-
}),
|
|
98087
|
+
lineStyle: transformStyle(transformToGraphic((_d = this._spec.line) === null || _d === void 0 ? void 0 : _d.style), this._markerData, this._markAttributeContext),
|
|
98088
|
+
clipInRange: (_e = this._spec.clip) !== null && _e !== void 0 ? _e : false,
|
|
98089
|
+
label: transformLabelAttributes(label, this._markerData, this._markAttributeContext),
|
|
98056
98090
|
state: {
|
|
98057
|
-
line: transformState((
|
|
98058
|
-
lineStartSymbol: transformState((
|
|
98059
|
-
lineEndSymbol: transformState((
|
|
98060
|
-
label: label.
|
|
98061
|
-
|
|
98062
|
-
return transformState((_a = labelItem.state) !== null && _a !== void 0 ? _a : {}, this._markerData, this._markAttributeContext);
|
|
98063
|
-
}),
|
|
98064
|
-
labelBackground: label.map(labelItem => {
|
|
98065
|
-
var _a, _b;
|
|
98066
|
-
return transformState((_b = (_a = labelItem.labelBackground) === null || _a === void 0 ? void 0 : _a.state) !== null && _b !== void 0 ? _b : {}, this._markerData, this._markAttributeContext);
|
|
98067
|
-
})
|
|
98091
|
+
line: transformState((_g = (_f = this._spec.line) === null || _f === void 0 ? void 0 : _f.state) !== null && _g !== void 0 ? _g : {}, this._markerData, this._markAttributeContext),
|
|
98092
|
+
lineStartSymbol: transformState((_j = (_h = this._spec.startSymbol) === null || _h === void 0 ? void 0 : _h.state) !== null && _j !== void 0 ? _j : {}, this._markerData, this._markAttributeContext),
|
|
98093
|
+
lineEndSymbol: transformState((_l = (_k = this._spec.endSymbol) === null || _k === void 0 ? void 0 : _k.state) !== null && _l !== void 0 ? _l : {}, this._markerData, this._markAttributeContext),
|
|
98094
|
+
label: transformState((_p = (_o = (_m = this._spec) === null || _m === void 0 ? void 0 : _m.label) === null || _o === void 0 ? void 0 : _o.state) !== null && _p !== void 0 ? _p : {}, this._markerData, this._markAttributeContext),
|
|
98095
|
+
labelBackground: transformState((_t = (_s = (_r = (_q = this._spec) === null || _q === void 0 ? void 0 : _q.label) === null || _r === void 0 ? void 0 : _r.labelBackground) === null || _s === void 0 ? void 0 : _s.state) !== null && _t !== void 0 ? _t : {}, this._markerData, this._markAttributeContext)
|
|
98068
98096
|
},
|
|
98069
|
-
animation: (
|
|
98097
|
+
animation: (_u = this._spec.animation) !== null && _u !== void 0 ? _u : false,
|
|
98070
98098
|
animationEnter: this._spec.animationEnter,
|
|
98071
98099
|
animationExit: this._spec.animationExit,
|
|
98072
98100
|
animationUpdate: this._spec.animationUpdate
|
|
@@ -98091,7 +98119,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98091
98119
|
return markLine;
|
|
98092
98120
|
}
|
|
98093
98121
|
_getUpdateMarkerAttrs() {
|
|
98094
|
-
var _a, _b;
|
|
98122
|
+
var _a, _b, _c, _d;
|
|
98095
98123
|
const spec = this._spec;
|
|
98096
98124
|
const data = this._markerData;
|
|
98097
98125
|
const startRelativeSeries = this._startRelativeSeries;
|
|
@@ -98101,7 +98129,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98101
98129
|
const seriesData = relativeSeries.getViewData().latestData;
|
|
98102
98130
|
const dataPoints = data.latestData[0] && data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
|
|
98103
98131
|
let limitRect;
|
|
98104
|
-
if (spec.clip ||
|
|
98132
|
+
if (spec.clip || ((_a = spec.label) === null || _a === void 0 ? void 0 : _a.confine)) {
|
|
98105
98133
|
const { minX, maxX, minY, maxY } = computeClipRange([
|
|
98106
98134
|
startRelativeSeries.getRegion(),
|
|
98107
98135
|
endRelativeSeries.getRegion(),
|
|
@@ -98114,13 +98142,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98114
98142
|
height: maxY - minY
|
|
98115
98143
|
};
|
|
98116
98144
|
}
|
|
98117
|
-
const markerComponentAttr = (
|
|
98118
|
-
const
|
|
98119
|
-
|
|
98120
|
-
|
|
98121
|
-
const specLabel = specLabels[index] || {};
|
|
98122
|
-
return Object.assign(Object.assign({}, prevLabel), { text: specLabel.formatMethod ? specLabel.formatMethod(dataPoints, seriesData) : prevLabel === null || prevLabel === void 0 ? void 0 : prevLabel.text });
|
|
98123
|
-
});
|
|
98145
|
+
const markerComponentAttr = (_c = (_b = this._markerComponent) === null || _b === void 0 ? void 0 : _b.attribute) !== null && _c !== void 0 ? _c : {};
|
|
98146
|
+
const labelAttrs = Object.assign(Object.assign({}, markerComponentAttr.label), { text: this._spec.label.formatMethod
|
|
98147
|
+
? this._spec.label.formatMethod(dataPoints, seriesData)
|
|
98148
|
+
: (_d = markerComponentAttr.label) === null || _d === void 0 ? void 0 : _d.text });
|
|
98124
98149
|
return Object.assign(Object.assign({}, pointsAttr), { label: labelAttrs, limitRect, dx: this._layoutOffsetX, dy: this._layoutOffsetY });
|
|
98125
98150
|
}
|
|
98126
98151
|
_markerLayout() {
|
|
@@ -98222,7 +98247,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98222
98247
|
return { points };
|
|
98223
98248
|
}
|
|
98224
98249
|
_markerLayout() {
|
|
98225
|
-
var _a, _b, _c, _d, _e;
|
|
98250
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
98226
98251
|
const updateAttrs = this._getUpdateMarkerAttrs();
|
|
98227
98252
|
if (this._spec.type === 'type-step') {
|
|
98228
98253
|
const startRelativeSeries = this._startRelativeSeries;
|
|
@@ -98249,7 +98274,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98249
98274
|
else {
|
|
98250
98275
|
expandDistanceValue = expandDistance;
|
|
98251
98276
|
}
|
|
98252
|
-
const { points, limitRect } = updateAttrs;
|
|
98277
|
+
const { points, label, limitRect } = updateAttrs;
|
|
98253
98278
|
const joinPoints = getInsertPoints(points[0], points[1], connectDirection, expandDistanceValue);
|
|
98254
98279
|
let labelPositionAttrs;
|
|
98255
98280
|
if (multiSegment && isValid$1(mainSegmentIndex)) {
|
|
@@ -98263,10 +98288,20 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98263
98288
|
else {
|
|
98264
98289
|
labelPositionAttrs = Object.assign(Object.assign({ position: 'start', autoRotate: false }, getTextOffset(points[0], points[1], connectDirection, expandDistanceValue)), { refX: 0, refY: 0 });
|
|
98265
98290
|
}
|
|
98266
|
-
|
|
98267
|
-
|
|
98268
|
-
|
|
98269
|
-
(
|
|
98291
|
+
if (isValidNumber$1((_a = this._spec.label) === null || _a === void 0 ? void 0 : _a.refX)) {
|
|
98292
|
+
labelPositionAttrs.refX += this._spec.label.refX;
|
|
98293
|
+
}
|
|
98294
|
+
if (isValidNumber$1((_b = this._spec.label) === null || _b === void 0 ? void 0 : _b.refY)) {
|
|
98295
|
+
labelPositionAttrs.refY += this._spec.label.refY;
|
|
98296
|
+
}
|
|
98297
|
+
if (isValidNumber$1((_c = this._spec.label) === null || _c === void 0 ? void 0 : _c.dx)) {
|
|
98298
|
+
labelPositionAttrs.dx = (labelPositionAttrs.dx || 0) + this._spec.label.dx;
|
|
98299
|
+
}
|
|
98300
|
+
if (isValidNumber$1((_d = this._spec.label) === null || _d === void 0 ? void 0 : _d.dy)) {
|
|
98301
|
+
labelPositionAttrs.dy = (labelPositionAttrs.dy || 0) + this._spec.label.dy;
|
|
98302
|
+
}
|
|
98303
|
+
const markerComponentAttr = (_f = (_e = this._markerComponent) === null || _e === void 0 ? void 0 : _e.attribute) !== null && _f !== void 0 ? _f : {};
|
|
98304
|
+
(_g = this._markerComponent) === null || _g === void 0 ? void 0 : _g.setAttributes({
|
|
98270
98305
|
points: multiSegment
|
|
98271
98306
|
? [
|
|
98272
98307
|
[joinPoints[0], joinPoints[1]],
|
|
@@ -98274,22 +98309,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98274
98309
|
[joinPoints[2], joinPoints[3]]
|
|
98275
98310
|
]
|
|
98276
98311
|
: joinPoints,
|
|
98277
|
-
label: label.
|
|
98278
|
-
var _a;
|
|
98279
|
-
if (isValidNumber$1(labelItem === null || labelItem === void 0 ? void 0 : labelItem.refX)) {
|
|
98280
|
-
labelPositionAttrs.refX += labelItem.refX;
|
|
98281
|
-
}
|
|
98282
|
-
if (isValidNumber$1(labelItem === null || labelItem === void 0 ? void 0 : labelItem.refY)) {
|
|
98283
|
-
labelPositionAttrs.refY += labelItem.refY;
|
|
98284
|
-
}
|
|
98285
|
-
if (isValidNumber$1(labelItem === null || labelItem === void 0 ? void 0 : labelItem.dx)) {
|
|
98286
|
-
labelPositionAttrs.dx = (labelPositionAttrs.dx || 0) + labelItem.dx;
|
|
98287
|
-
}
|
|
98288
|
-
if (isValidNumber$1(labelItem === null || labelItem === void 0 ? void 0 : labelItem.dy)) {
|
|
98289
|
-
labelPositionAttrs.dy = (labelPositionAttrs.dy || 0) + labelItem.dy;
|
|
98290
|
-
}
|
|
98291
|
-
return Object.assign(Object.assign(Object.assign({}, labelItem), labelPositionAttrs), { textStyle: Object.assign(Object.assign({}, (_a = prevLabelAttrs[index]) === null || _a === void 0 ? void 0 : _a.textStyle), { textAlign: 'center', textBaseline: 'middle' }) });
|
|
98292
|
-
}),
|
|
98312
|
+
label: Object.assign(Object.assign(Object.assign({}, label), labelPositionAttrs), { textStyle: Object.assign(Object.assign({}, markerComponentAttr.label.textStyle), { textAlign: 'center', textBaseline: 'middle' }) }),
|
|
98293
98313
|
limitRect,
|
|
98294
98314
|
multiSegment,
|
|
98295
98315
|
mainSegmentIndex,
|
|
@@ -98298,7 +98318,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98298
98318
|
});
|
|
98299
98319
|
}
|
|
98300
98320
|
else {
|
|
98301
|
-
(
|
|
98321
|
+
(_h = this._markerComponent) === null || _h === void 0 ? void 0 : _h.setAttributes(updateAttrs);
|
|
98302
98322
|
}
|
|
98303
98323
|
}
|
|
98304
98324
|
_computeOptions() {
|
|
@@ -98652,8 +98672,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98652
98672
|
return 'cartesian';
|
|
98653
98673
|
}
|
|
98654
98674
|
_createMarkerComponent() {
|
|
98655
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
98656
|
-
const label =
|
|
98675
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
98676
|
+
const label = (_a = this._spec.label) !== null && _a !== void 0 ? _a : {};
|
|
98657
98677
|
const markAreaAttrs = {
|
|
98658
98678
|
zIndex: this.layoutZIndex,
|
|
98659
98679
|
interactive: (_b = this._spec.interactive) !== null && _b !== void 0 ? _b : true,
|
|
@@ -98675,20 +98695,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98675
98695
|
endAngle: 0,
|
|
98676
98696
|
areaStyle: transformStyle(transformToGraphic((_e = this._spec.area) === null || _e === void 0 ? void 0 : _e.style), this._markerData, this._markAttributeContext),
|
|
98677
98697
|
clipInRange: (_f = this._spec.clip) !== null && _f !== void 0 ? _f : false,
|
|
98678
|
-
label: label.
|
|
98679
|
-
return transformLabelAttributes(labelItem, this._markerData, this._markAttributeContext);
|
|
98680
|
-
}),
|
|
98698
|
+
label: transformLabelAttributes(label, this._markerData, this._markAttributeContext),
|
|
98681
98699
|
state: {
|
|
98682
98700
|
area: transformState((_g = this._spec.area) === null || _g === void 0 ? void 0 : _g.state, this._markerData, this._markAttributeContext),
|
|
98683
|
-
label:
|
|
98684
|
-
|
|
98685
|
-
}),
|
|
98686
|
-
labelBackground: label.map((labelItem) => {
|
|
98687
|
-
var _a;
|
|
98688
|
-
return transformState((_a = labelItem.labelBackground) === null || _a === void 0 ? void 0 : _a.state, this._markerData, this._markAttributeContext);
|
|
98689
|
-
})
|
|
98701
|
+
label: transformState((_h = this._spec.label) === null || _h === void 0 ? void 0 : _h.state, this._markerData, this._markAttributeContext),
|
|
98702
|
+
labelBackground: transformState((_l = (_k = (_j = this._spec) === null || _j === void 0 ? void 0 : _j.label) === null || _k === void 0 ? void 0 : _k.labelBackground) === null || _l === void 0 ? void 0 : _l.state, this._markerData, this._markAttributeContext)
|
|
98690
98703
|
},
|
|
98691
|
-
animation: (
|
|
98704
|
+
animation: (_m = this._spec.animation) !== null && _m !== void 0 ? _m : false,
|
|
98692
98705
|
animationEnter: this._spec.animationEnter,
|
|
98693
98706
|
animationExit: this._spec.animationExit,
|
|
98694
98707
|
animationUpdate: this._spec.animationUpdate
|
|
@@ -98697,7 +98710,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98697
98710
|
return markArea;
|
|
98698
98711
|
}
|
|
98699
98712
|
_markerLayout() {
|
|
98700
|
-
var _a;
|
|
98713
|
+
var _a, _b, _c, _d;
|
|
98701
98714
|
const spec = this._spec;
|
|
98702
98715
|
const data = this._markerData;
|
|
98703
98716
|
const startRelativeSeries = this._startRelativeSeries;
|
|
@@ -98711,7 +98724,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98711
98724
|
: data.latestData
|
|
98712
98725
|
: seriesData;
|
|
98713
98726
|
let limitRect;
|
|
98714
|
-
if (spec.clip ||
|
|
98727
|
+
if (spec.clip || ((_a = spec.label) === null || _a === void 0 ? void 0 : _a.confine)) {
|
|
98715
98728
|
const { minX, maxX, minY, maxY } = computeClipRange([
|
|
98716
98729
|
startRelativeSeries.getRegion(),
|
|
98717
98730
|
endRelativeSeries.getRegion(),
|
|
@@ -98725,15 +98738,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98725
98738
|
};
|
|
98726
98739
|
}
|
|
98727
98740
|
if (this._markerComponent) {
|
|
98728
|
-
|
|
98729
|
-
|
|
98730
|
-
|
|
98731
|
-
|
|
98732
|
-
return Object.assign(Object.assign({}, prevLabel), { text: specLabel.formatMethod
|
|
98733
|
-
?
|
|
98734
|
-
specLabel.formatMethod(dataPoints, seriesData)
|
|
98735
|
-
: prevLabel === null || prevLabel === void 0 ? void 0 : prevLabel.text });
|
|
98736
|
-
}), limitRect, dx: this._layoutOffsetX, dy: this._layoutOffsetY }));
|
|
98741
|
+
this._markerComponent.setAttributes(Object.assign(Object.assign({}, pointsAttr), { label: Object.assign(Object.assign({}, (_b = this._markerComponent.attribute) === null || _b === void 0 ? void 0 : _b.label), { text: this._spec.label.formatMethod
|
|
98742
|
+
?
|
|
98743
|
+
this._spec.label.formatMethod(dataPoints, seriesData)
|
|
98744
|
+
: (_d = (_c = this._markerComponent.attribute) === null || _c === void 0 ? void 0 : _c.label) === null || _d === void 0 ? void 0 : _d.text }), limitRect, dx: this._layoutOffsetX, dy: this._layoutOffsetY }));
|
|
98737
98745
|
}
|
|
98738
98746
|
}
|
|
98739
98747
|
_initDataView() {
|