@visactor/vchart 1.10.5-alpha.1 → 1.10.5
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.js +251 -302
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/base/base-chart.js +4 -2
- package/cjs/chart/base/base-chart.js.map +1 -1
- package/cjs/chart/polar/polar-transformer.js.map +1 -1
- package/cjs/chart/sequence/sequence-transformer.js.map +1 -1
- package/cjs/component/axis/cartesian/axis.d.ts +1 -1
- package/cjs/component/axis/cartesian/axis.js +14 -17
- package/cjs/component/axis/cartesian/axis.js.map +1 -1
- package/cjs/component/data-zoom/data-filter-base-component.d.ts +2 -2
- package/cjs/component/data-zoom/data-filter-base-component.js +6 -4
- package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/cjs/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
- package/cjs/component/data-zoom/interface.d.ts +1 -4
- package/cjs/component/data-zoom/interface.js +1 -5
- package/cjs/component/data-zoom/interface.js.map +1 -1
- package/cjs/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
- package/cjs/component/legend/continuous/legend.js +4 -1
- package/cjs/component/legend/continuous/legend.js.map +1 -1
- package/cjs/component/legend/discrete/interface.d.ts +1 -0
- package/cjs/component/legend/discrete/interface.js.map +1 -1
- package/cjs/component/legend/discrete/legend.js +5 -5
- package/cjs/component/legend/discrete/legend.js.map +1 -1
- package/cjs/component/player/player.d.ts +2 -1
- package/cjs/component/player/player.js +16 -9
- package/cjs/component/player/player.js.map +1 -1
- package/cjs/component/player/utils/transform.js +3 -2
- package/cjs/component/player/utils/transform.js.map +1 -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/data/transforms/legend-data/continuous/continuous.js +3 -2
- package/cjs/data/transforms/legend-data/continuous/continuous.js.map +1 -1
- package/cjs/data/transforms/pie.js +3 -2
- package/cjs/data/transforms/pie.js.map +1 -1
- package/cjs/region/region.js.map +1 -1
- package/cjs/util/math.d.ts +1 -1
- package/cjs/util/math.js +2 -3
- package/cjs/util/math.js.map +1 -1
- package/esm/chart/base/base-chart.js +4 -2
- package/esm/chart/base/base-chart.js.map +1 -1
- package/esm/chart/polar/polar-transformer.js.map +1 -1
- package/esm/chart/sequence/sequence-transformer.js.map +1 -1
- package/esm/component/axis/cartesian/axis.d.ts +1 -1
- package/esm/component/axis/cartesian/axis.js +13 -16
- package/esm/component/axis/cartesian/axis.js.map +1 -1
- package/esm/component/data-zoom/data-filter-base-component.d.ts +2 -2
- package/esm/component/data-zoom/data-filter-base-component.js +6 -4
- package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/esm/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
- package/esm/component/data-zoom/interface.d.ts +1 -4
- package/esm/component/data-zoom/interface.js +1 -5
- package/esm/component/data-zoom/interface.js.map +1 -1
- package/esm/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
- package/esm/component/legend/continuous/legend.js +5 -2
- package/esm/component/legend/continuous/legend.js.map +1 -1
- package/esm/component/legend/discrete/interface.d.ts +1 -0
- package/esm/component/legend/discrete/interface.js.map +1 -1
- package/esm/component/legend/discrete/legend.js +5 -5
- package/esm/component/legend/discrete/legend.js.map +1 -1
- package/esm/component/player/player.d.ts +2 -1
- package/esm/component/player/player.js +16 -9
- package/esm/component/player/player.js.map +1 -1
- package/esm/component/player/utils/transform.js +3 -2
- package/esm/component/player/utils/transform.js.map +1 -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/data/transforms/legend-data/continuous/continuous.js +2 -2
- package/esm/data/transforms/legend-data/continuous/continuous.js.map +1 -1
- package/esm/data/transforms/pie.js +2 -1
- package/esm/data/transforms/pie.js.map +1 -1
- package/esm/region/region.js.map +1 -1
- package/esm/util/math.d.ts +1 -1
- package/esm/util/math.js +2 -3
- package/esm/util/math.js.map +1 -1
- package/package.json +13 -13
package/build/index.js
CHANGED
|
@@ -937,6 +937,12 @@
|
|
|
937
937
|
});
|
|
938
938
|
}
|
|
939
939
|
|
|
940
|
+
function toValidNumber$1(v) {
|
|
941
|
+
if (isValidNumber$1(v)) return v;
|
|
942
|
+
const value = +v;
|
|
943
|
+
return isValidNumber$1(value) ? value : 0;
|
|
944
|
+
}
|
|
945
|
+
|
|
940
946
|
const epsilon$1 = 1e-12;
|
|
941
947
|
const pi$1 = Math.PI;
|
|
942
948
|
const halfPi$2 = pi$1 / 2;
|
|
@@ -8794,6 +8800,7 @@
|
|
|
8794
8800
|
textBaseline: "top",
|
|
8795
8801
|
layoutDirection: "horizontal",
|
|
8796
8802
|
textConfig: [],
|
|
8803
|
+
forceBreakLine: !1,
|
|
8797
8804
|
maxHeight: void 0,
|
|
8798
8805
|
maxWidth: void 0,
|
|
8799
8806
|
singleLine: !1
|
|
@@ -9185,13 +9192,14 @@
|
|
|
9185
9192
|
});
|
|
9186
9193
|
}
|
|
9187
9194
|
clipTextWithSuffix(text, options, width, suffix, wordBreak, position) {
|
|
9195
|
+
let forceSuffix = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !1;
|
|
9188
9196
|
if ("" === suffix) return this.clipText(text, options, width, wordBreak);
|
|
9189
9197
|
if (0 === text.length) return {
|
|
9190
9198
|
str: "",
|
|
9191
9199
|
width: 0
|
|
9192
9200
|
};
|
|
9193
9201
|
const length = this.measureTextWidth(text, options);
|
|
9194
|
-
if (length <= width) return {
|
|
9202
|
+
if (!forceSuffix && length <= width) return {
|
|
9195
9203
|
str: text,
|
|
9196
9204
|
width: length
|
|
9197
9205
|
};
|
|
@@ -9200,12 +9208,16 @@
|
|
|
9200
9208
|
str: "",
|
|
9201
9209
|
width: 0
|
|
9202
9210
|
};
|
|
9211
|
+
if (forceSuffix && length + suffixWidth <= width) return {
|
|
9212
|
+
str: text + suffix,
|
|
9213
|
+
width: length + suffixWidth
|
|
9214
|
+
};
|
|
9203
9215
|
width -= suffixWidth;
|
|
9204
9216
|
const data = this._clipText(text, options, width, 0, text.length - 1, position, suffix);
|
|
9205
9217
|
if (wordBreak && data.str !== text) {
|
|
9206
9218
|
const index = testLetter(text, data.str.length);
|
|
9207
|
-
index !== data.str.length && (data.
|
|
9208
|
-
}
|
|
9219
|
+
index !== data.str.length && (data.result = text.substring(0, index), data.width = this.measureTextWidth(data.str, options));
|
|
9220
|
+
} else forceSuffix && data.str === text && (data.result = text + suffix);
|
|
9209
9221
|
return data.str = data.result, data.width += suffixWidth, data;
|
|
9210
9222
|
}
|
|
9211
9223
|
};
|
|
@@ -10606,7 +10618,12 @@
|
|
|
10606
10618
|
for (; overTargetAncestor && overTargetAncestor !== this.rootTarget.parent && overTargetAncestor !== e.target;) overTargetAncestor = overTargetAncestor.parent;
|
|
10607
10619
|
if (!overTargetAncestor || overTargetAncestor === this.rootTarget.parent) {
|
|
10608
10620
|
const enterEvent = this.clonePointerEvent(e, "pointerenter");
|
|
10609
|
-
|
|
10621
|
+
enterEvent.eventPhase = enterEvent.AT_TARGET;
|
|
10622
|
+
let currentTarget = enterEvent.target;
|
|
10623
|
+
const outTargetAncestors = new Set();
|
|
10624
|
+
let ancestor = outTarget;
|
|
10625
|
+
for (; ancestor && ancestor !== this.rootTarget;) outTargetAncestors.add(ancestor), ancestor = ancestor.parent;
|
|
10626
|
+
for (; currentTarget && currentTarget !== outTarget && currentTarget !== this.rootTarget.parent;) outTargetAncestors.has(currentTarget) || (enterEvent.currentTarget = currentTarget, this.notifyTarget(enterEvent), isMouse && this.notifyTarget(enterEvent, "mouseenter")), currentTarget = currentTarget.parent;
|
|
10610
10627
|
this.freeEvent(enterEvent);
|
|
10611
10628
|
}
|
|
10612
10629
|
this.freeEvent(overEvent);
|
|
@@ -10808,8 +10825,6 @@
|
|
|
10808
10825
|
}
|
|
10809
10826
|
|
|
10810
10827
|
const EventTarget = {
|
|
10811
|
-
pickable: !0,
|
|
10812
|
-
visible: !0,
|
|
10813
10828
|
dispatchEvent(e) {
|
|
10814
10829
|
var _a;
|
|
10815
10830
|
if (!(e instanceof FederatedEvent)) throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");
|
|
@@ -13549,19 +13564,17 @@
|
|
|
13549
13564
|
var _a, _b, _c, _d;
|
|
13550
13565
|
if (hasAnimation) {
|
|
13551
13566
|
const keys = Object.keys(attrs),
|
|
13552
|
-
|
|
13567
|
+
noWorkAttrs = this.getNoWorkAnimateAttr(),
|
|
13553
13568
|
animateAttrs = {};
|
|
13554
13569
|
let noAnimateAttrs;
|
|
13555
|
-
|
|
13556
|
-
|
|
13557
|
-
}) : keys.forEach(key => {
|
|
13558
|
-
noWorkAAttr[key] ? (noAnimateAttrs || (noAnimateAttrs = {}), noAnimateAttrs[key] = attrs[key]) : animateAttrs[key] = attrs[key];
|
|
13570
|
+
keys.forEach(key => {
|
|
13571
|
+
noWorkAttrs[key] ? (noAnimateAttrs || (noAnimateAttrs = {}), noAnimateAttrs[key] = attrs[key]) : animateAttrs[key] = isClear && void 0 === attrs[key] ? this.getDefaultAttribute(key) : attrs[key];
|
|
13559
13572
|
});
|
|
13560
13573
|
const animate = this.animate();
|
|
13561
13574
|
animate.stateNames = stateNames, animate.to(animateAttrs, null !== (_b = null === (_a = this.stateAnimateConfig) || void 0 === _a ? void 0 : _a.duration) && void 0 !== _b ? _b : DefaultStateAnimateConfig.duration, null !== (_d = null === (_c = this.stateAnimateConfig) || void 0 === _c ? void 0 : _c.easing) && void 0 !== _d ? _d : DefaultStateAnimateConfig.easing), noAnimateAttrs && this.setAttributes(noAnimateAttrs, !1, {
|
|
13562
13575
|
type: AttributeUpdateType.STATE
|
|
13563
13576
|
});
|
|
13564
|
-
} else this.setAttributes(attrs, !1, {
|
|
13577
|
+
} else this.stopStateAnimates(), this.setAttributes(attrs, !1, {
|
|
13565
13578
|
type: AttributeUpdateType.STATE
|
|
13566
13579
|
});
|
|
13567
13580
|
}
|
|
@@ -13575,6 +13588,12 @@
|
|
|
13575
13588
|
newNormalAttrs[key] = this.getNormalAttribute(key);
|
|
13576
13589
|
}), this.normalAttrs = newNormalAttrs;
|
|
13577
13590
|
}
|
|
13591
|
+
stopStateAnimates() {
|
|
13592
|
+
let type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "end";
|
|
13593
|
+
this.animates && this.animates.forEach(animate => {
|
|
13594
|
+
animate.stateNames && animate.stop(type);
|
|
13595
|
+
});
|
|
13596
|
+
}
|
|
13578
13597
|
getNormalAttribute(key) {
|
|
13579
13598
|
let value = this.attribute[key];
|
|
13580
13599
|
return this.animates && this.animates.forEach(animate => {
|
|
@@ -15128,7 +15147,7 @@
|
|
|
15128
15147
|
const str = lines[i];
|
|
15129
15148
|
let needCut = !0;
|
|
15130
15149
|
if (i === lineCountLimit - 1) {
|
|
15131
|
-
const clip = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
|
|
15150
|
+
const clip = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition, i !== lines.length - 1);
|
|
15132
15151
|
linesLayout.push({
|
|
15133
15152
|
str: clip.str,
|
|
15134
15153
|
width: clip.width
|
|
@@ -15498,138 +15517,6 @@
|
|
|
15498
15517
|
return new Text$1(attributes);
|
|
15499
15518
|
}
|
|
15500
15519
|
|
|
15501
|
-
const WRAP_TEXT_UPDATE_TAG_KEY = ["heightLimit", "lineClamp"];
|
|
15502
|
-
class WrapText extends Text$1 {
|
|
15503
|
-
constructor(params) {
|
|
15504
|
-
super(Object.assign(Object.assign({}, params), {
|
|
15505
|
-
wrap: !0
|
|
15506
|
-
}));
|
|
15507
|
-
}
|
|
15508
|
-
_isValid() {
|
|
15509
|
-
const {
|
|
15510
|
-
text: text
|
|
15511
|
-
} = this.attribute;
|
|
15512
|
-
return isArray$3(text) ? !text.every(t => null == t || "" === t) : null != text && "" !== text;
|
|
15513
|
-
}
|
|
15514
|
-
updateMultilineAABBBounds(text) {
|
|
15515
|
-
var _a, _b, _c, _d;
|
|
15516
|
-
const textTheme = getTheme$1(this).text,
|
|
15517
|
-
{
|
|
15518
|
-
fontFamily = textTheme.fontFamily,
|
|
15519
|
-
textAlign = textTheme.textAlign,
|
|
15520
|
-
textBaseline = textTheme.textBaseline,
|
|
15521
|
-
fontSize = textTheme.fontSize,
|
|
15522
|
-
ellipsis = textTheme.ellipsis,
|
|
15523
|
-
maxLineWidth: maxLineWidth,
|
|
15524
|
-
stroke = textTheme.stroke,
|
|
15525
|
-
lineWidth = textTheme.lineWidth,
|
|
15526
|
-
wordBreak = textTheme.wordBreak,
|
|
15527
|
-
fontWeight = textTheme.fontWeight,
|
|
15528
|
-
ignoreBuf = textTheme.ignoreBuf,
|
|
15529
|
-
heightLimit = 0,
|
|
15530
|
-
suffixPosition = textTheme.suffixPosition,
|
|
15531
|
-
lineClamp: lineClamp
|
|
15532
|
-
} = this.attribute,
|
|
15533
|
-
lineHeight = null !== (_a = calculateLineHeight(this.attribute.lineHeight, this.attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : this.attribute.fontSize || textTheme.fontSize,
|
|
15534
|
-
buf = ignoreBuf ? 0 : 2;
|
|
15535
|
-
if (!this.shouldUpdateShape() && (null === (_b = this.cache) || void 0 === _b ? void 0 : _b.layoutData)) {
|
|
15536
|
-
const bbox = this.cache.layoutData.bbox;
|
|
15537
|
-
return this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
|
|
15538
|
-
}
|
|
15539
|
-
const textMeasure = application.graphicUtil.textMeasure,
|
|
15540
|
-
layoutObj = new CanvasTextLayout(fontFamily, {
|
|
15541
|
-
fontSize: fontSize,
|
|
15542
|
-
fontWeight: fontWeight,
|
|
15543
|
-
fontFamily: fontFamily
|
|
15544
|
-
}, textMeasure),
|
|
15545
|
-
lines = text.map(l => l.toString()),
|
|
15546
|
-
linesLayout = [],
|
|
15547
|
-
bboxWH = [0, 0];
|
|
15548
|
-
let lineCountLimit = 1 / 0;
|
|
15549
|
-
if (heightLimit > 0 && (lineCountLimit = Math.max(Math.floor(heightLimit / lineHeight), 1)), lineClamp && (lineCountLimit = Math.min(lineCountLimit, lineClamp)), "number" == typeof maxLineWidth && maxLineWidth !== 1 / 0) {
|
|
15550
|
-
if (maxLineWidth > 0) for (let i = 0; i < lines.length; i++) {
|
|
15551
|
-
const str = lines[i];
|
|
15552
|
-
let needCut = !0;
|
|
15553
|
-
if (i === lineCountLimit - 1) {
|
|
15554
|
-
const clip = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
|
|
15555
|
-
linesLayout.push({
|
|
15556
|
-
str: clip.str,
|
|
15557
|
-
width: clip.width
|
|
15558
|
-
});
|
|
15559
|
-
break;
|
|
15560
|
-
}
|
|
15561
|
-
const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, "break-word" === wordBreak);
|
|
15562
|
-
if ("" !== str && "" === clip.str) {
|
|
15563
|
-
if (ellipsis) {
|
|
15564
|
-
const clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
|
|
15565
|
-
clip.str = null !== (_c = clipEllipsis.str) && void 0 !== _c ? _c : "", clip.width = null !== (_d = clipEllipsis.width) && void 0 !== _d ? _d : 0;
|
|
15566
|
-
} else clip.str = "", clip.width = 0;
|
|
15567
|
-
needCut = !1;
|
|
15568
|
-
}
|
|
15569
|
-
if (linesLayout.push({
|
|
15570
|
-
str: clip.str,
|
|
15571
|
-
width: clip.width
|
|
15572
|
-
}), clip.str.length === str.length) ;else if (needCut) {
|
|
15573
|
-
const newStr = str.substring(clip.str.length);
|
|
15574
|
-
lines.splice(i + 1, 0, newStr);
|
|
15575
|
-
}
|
|
15576
|
-
}
|
|
15577
|
-
let maxWidth = 0;
|
|
15578
|
-
linesLayout.forEach(layout => {
|
|
15579
|
-
maxWidth = Math.max(maxWidth, layout.width);
|
|
15580
|
-
}), bboxWH[0] = maxWidth;
|
|
15581
|
-
} else {
|
|
15582
|
-
let width,
|
|
15583
|
-
text,
|
|
15584
|
-
lineWidth = 0;
|
|
15585
|
-
for (let i = 0, len = lines.length; i < len; i++) {
|
|
15586
|
-
if (i === lineCountLimit - 1) {
|
|
15587
|
-
const clip = layoutObj.textMeasure.clipTextWithSuffix(lines[i], layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
|
|
15588
|
-
linesLayout.push({
|
|
15589
|
-
str: clip.str,
|
|
15590
|
-
width: clip.width
|
|
15591
|
-
}), lineWidth = Math.max(lineWidth, clip.width);
|
|
15592
|
-
break;
|
|
15593
|
-
}
|
|
15594
|
-
text = lines[i], width = layoutObj.textMeasure.measureTextWidth(text, layoutObj.textOptions, "break-word" === wordBreak), lineWidth = Math.max(lineWidth, width), linesLayout.push({
|
|
15595
|
-
str: text,
|
|
15596
|
-
width: width
|
|
15597
|
-
});
|
|
15598
|
-
}
|
|
15599
|
-
bboxWH[0] = lineWidth;
|
|
15600
|
-
}
|
|
15601
|
-
bboxWH[1] = linesLayout.length * (lineHeight + buf);
|
|
15602
|
-
const bbox = {
|
|
15603
|
-
xOffset: 0,
|
|
15604
|
-
yOffset: 0,
|
|
15605
|
-
width: bboxWH[0],
|
|
15606
|
-
height: bboxWH[1]
|
|
15607
|
-
};
|
|
15608
|
-
layoutObj.LayoutBBox(bbox, textAlign, textBaseline);
|
|
15609
|
-
const layoutData = layoutObj.layoutWithBBox(bbox, linesLayout, textAlign, textBaseline, lineHeight);
|
|
15610
|
-
return this.cache.layoutData = layoutData, this.clearUpdateShapeTag(), this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
|
|
15611
|
-
}
|
|
15612
|
-
needUpdateTags(keys) {
|
|
15613
|
-
for (let i = 0; i < WRAP_TEXT_UPDATE_TAG_KEY.length; i++) {
|
|
15614
|
-
const attrKey = WRAP_TEXT_UPDATE_TAG_KEY[i];
|
|
15615
|
-
if (-1 !== keys.indexOf(attrKey)) return !0;
|
|
15616
|
-
}
|
|
15617
|
-
return super.needUpdateTags(keys);
|
|
15618
|
-
}
|
|
15619
|
-
needUpdateTag(key) {
|
|
15620
|
-
for (let i = 0; i < WRAP_TEXT_UPDATE_TAG_KEY.length; i++) {
|
|
15621
|
-
if (key === WRAP_TEXT_UPDATE_TAG_KEY[i]) return !0;
|
|
15622
|
-
}
|
|
15623
|
-
return super.needUpdateTag(key);
|
|
15624
|
-
}
|
|
15625
|
-
getNoWorkAnimateAttr() {
|
|
15626
|
-
return WrapText.NOWORK_ANIMATE_ATTR;
|
|
15627
|
-
}
|
|
15628
|
-
}
|
|
15629
|
-
function createWrapText(attributes) {
|
|
15630
|
-
return new WrapText(attributes);
|
|
15631
|
-
}
|
|
15632
|
-
|
|
15633
15520
|
class BaseSymbol {
|
|
15634
15521
|
bounds(size, bounds) {
|
|
15635
15522
|
if (isNumber$3(size)) {
|
|
@@ -16556,11 +16443,11 @@
|
|
|
16556
16443
|
} = this.lines[i];
|
|
16557
16444
|
if (top + height < this[this.directionKey.top] || top + height > this[this.directionKey.top] + frameHeight) return lastLineTag;
|
|
16558
16445
|
let lastLine = !1;
|
|
16559
|
-
this.ellipsis && this.lines[i + 1] && this.lines[i + 1].top + this.lines[i + 1].height > this[this.directionKey.top] + frameHeight && (lastLine = !0, lastLineTag = !0), this.lines[i].draw(ctx, lastLine, this.lines[i][this.directionKey.left] + deltaX, this.lines[i][this.directionKey.top] + deltaY, drawIcon);
|
|
16446
|
+
this.ellipsis && this.lines[i + 1] && this.lines[i + 1].top + this.lines[i + 1].height > this[this.directionKey.top] + frameHeight && (lastLine = !0, lastLineTag = !0), this.lines[i].draw(ctx, lastLine, this.lines[i][this.directionKey.left] + deltaX, this.lines[i][this.directionKey.top] + deltaY, this.ellipsis, drawIcon);
|
|
16560
16447
|
} else {
|
|
16561
16448
|
const detalHeight = Math.floor((frameHeight - this.actualHeight) / 2);
|
|
16562
16449
|
"vertical" === this.layoutDirection ? deltaX += detalHeight : deltaY += detalHeight;
|
|
16563
|
-
for (let i = 0; i < this.lines.length; i++) this.lines[i].draw(ctx, !1, this.lines[i][this.directionKey.left] + deltaX, this.lines[i][this.directionKey.top] + deltaY, drawIcon);
|
|
16450
|
+
for (let i = 0; i < this.lines.length; i++) this.lines[i].draw(ctx, !1, this.lines[i][this.directionKey.left] + deltaX, this.lines[i][this.directionKey.top] + deltaY, this.ellipsis, drawIcon);
|
|
16564
16451
|
}
|
|
16565
16452
|
} else if ("bottom" === this.verticalDirection && "vertical" !== this.layoutDirection) for (let i = 0; i < this.lines.length; i++) {
|
|
16566
16453
|
const {
|
|
@@ -16568,11 +16455,11 @@
|
|
|
16568
16455
|
height: height
|
|
16569
16456
|
} = this.lines[i],
|
|
16570
16457
|
y = frameHeight - this.lines[i].top - this.lines[i].height;
|
|
16571
|
-
if (0 === frameHeight) this.lines[i].draw(ctx, !1, deltaX, y + deltaY, drawIcon);else {
|
|
16458
|
+
if (0 === frameHeight) this.lines[i].draw(ctx, !1, deltaX, y + deltaY, this.ellipsis, drawIcon);else {
|
|
16572
16459
|
if (y + height > this[this.directionKey.top] + frameHeight || y < this[this.directionKey.top]) return lastLineTag;
|
|
16573
16460
|
{
|
|
16574
16461
|
let lastLine = !1;
|
|
16575
|
-
this.ellipsis && this.lines[i + 1] && y - this.lines[i + 1].height < this[this.directionKey.top] && (lastLine = !0, lastLineTag = !0), this.lines[i].draw(ctx, lastLine, deltaX, y + deltaY, drawIcon);
|
|
16462
|
+
this.ellipsis && this.lines[i + 1] && y - this.lines[i + 1].height < this[this.directionKey.top] && (lastLine = !0, lastLineTag = !0), this.lines[i].draw(ctx, lastLine, deltaX, y + deltaY, this.ellipsis, drawIcon);
|
|
16576
16463
|
}
|
|
16577
16464
|
}
|
|
16578
16465
|
} else {
|
|
@@ -16583,11 +16470,11 @@
|
|
|
16583
16470
|
top: top,
|
|
16584
16471
|
height: height
|
|
16585
16472
|
} = this.lines[i];
|
|
16586
|
-
if (0 === frameHeight) this.lines[i].draw(ctx, !1, this.lines[i][this.directionKey.left] + deltaX, this.lines[i][this.directionKey.top] + deltaY, drawIcon);else {
|
|
16473
|
+
if (0 === frameHeight) this.lines[i].draw(ctx, !1, this.lines[i][this.directionKey.left] + deltaX, this.lines[i][this.directionKey.top] + deltaY, this.ellipsis, drawIcon);else {
|
|
16587
16474
|
if (top + height < this[this.directionKey.top] || top + height > this[this.directionKey.top] + frameHeight) return lastLineTag;
|
|
16588
16475
|
{
|
|
16589
16476
|
let lastLine = !1;
|
|
16590
|
-
this.ellipsis && this.lines[i + 1] && this.lines[i + 1].top + this.lines[i + 1].height > this[this.directionKey.top] + frameHeight && (lastLine = !0, lastLineTag = !0), this.lines[i].draw(ctx, lastLine, this.lines[i][this.directionKey.left] + deltaX, this.lines[i][this.directionKey.top] + deltaY, drawIcon);
|
|
16477
|
+
this.ellipsis && this.lines[i + 1] && this.lines[i + 1].top + this.lines[i + 1].height > this[this.directionKey.top] + frameHeight && (lastLine = !0, lastLineTag = !0), this.lines[i].draw(ctx, lastLine, this.lines[i][this.directionKey.left] + deltaX, this.lines[i][this.directionKey.top] + deltaY, this.ellipsis, drawIcon);
|
|
16591
16478
|
}
|
|
16592
16479
|
}
|
|
16593
16480
|
}
|
|
@@ -16890,11 +16777,12 @@
|
|
|
16890
16777
|
paragraph instanceof RichTextIcon ? (paragraph["_" + directionKey.x] = x, x += paragraph[directionKey.width] + spacing, paragraph["_" + directionKey.y] = "top" === paragraph.attribute.textBaseline ? 0 : "bottom" === paragraph.attribute.textBaseline ? maxHeight - paragraph.height : (maxHeight - paragraph.height) / 2) : (paragraph[directionKey.left] = x, x += paragraph[directionKey.width] + spacing);
|
|
16891
16778
|
});
|
|
16892
16779
|
}
|
|
16893
|
-
draw(ctx, lastLine, x, y, drawIcon) {
|
|
16894
|
-
if (lastLine) {
|
|
16780
|
+
draw(ctx, lastLine, x, y, drawEllipsis, drawIcon) {
|
|
16781
|
+
if (drawEllipsis && (lastLine || this.paragraphs.some(p => p.overflow))) {
|
|
16895
16782
|
let otherParagraphWidth = 0;
|
|
16896
16783
|
for (let i = this.paragraphs.length - 1; i >= 0; i--) {
|
|
16897
16784
|
const paragraph = this.paragraphs[i];
|
|
16785
|
+
if (paragraph.overflow) continue;
|
|
16898
16786
|
if (paragraph instanceof RichTextIcon) break;
|
|
16899
16787
|
if ("vertical" === this.direction && "vertical" !== paragraph.direction) {
|
|
16900
16788
|
paragraph.verticalEllipsis = !0;
|
|
@@ -17115,7 +17003,8 @@
|
|
|
17115
17003
|
textAlign: textAlign,
|
|
17116
17004
|
textBaseline: textBaseline,
|
|
17117
17005
|
layoutDirection: layoutDirection,
|
|
17118
|
-
singleLine: singleLine
|
|
17006
|
+
singleLine: singleLine,
|
|
17007
|
+
forceBreakLine: forceBreakLine
|
|
17119
17008
|
} = this.attribute,
|
|
17120
17009
|
paragraphs = [];
|
|
17121
17010
|
for (let i = 0; i < textConfig.length; i++) if ("image" in textConfig[i]) {
|
|
@@ -17141,7 +17030,14 @@
|
|
|
17141
17030
|
richTextHeightEnable = "number" == typeof height && Number.isFinite(height) && height > 0 && (!maxHeightFinite || height <= maxHeight),
|
|
17142
17031
|
frame = new Frame(0, 0, (richTextWidthEnable ? width : maxWidthFinite ? maxWidth : 0) || 0, (richTextHeightEnable ? height : maxHeightFinite ? maxHeight : 0) || 0, ellipsis, wordBreak, verticalDirection, textAlign, textBaseline, layoutDirection || "horizontal", !richTextWidthEnable && maxWidthFinite, !richTextHeightEnable && maxHeightFinite, singleLine || !1, null === (_a = this._frameCache) || void 0 === _a ? void 0 : _a.icons),
|
|
17143
17032
|
wrapper = new Wrapper(frame);
|
|
17144
|
-
|
|
17033
|
+
if (forceBreakLine) {
|
|
17034
|
+
let lineCount = 0,
|
|
17035
|
+
skip = !1;
|
|
17036
|
+
for (let i = 0; i < paragraphs.length; i++) {
|
|
17037
|
+
const p = paragraphs[i];
|
|
17038
|
+
skip ? (p.overflow = !0, p.left = 1 / 0, p.top = 1 / 0, !p.newLine && frame.lines[frame.lines.length - 1].paragraphs.push(p)) : wrapper.deal(p), frame.lines.length !== lineCount && (lineCount = frame.lines.length, wrapper.lineBuffer.length = 0, p.overflow = !0, p.left = 1e3, p.top = 1e3, frame.lines[frame.lines.length - 1].paragraphs.push(p), skip = !0), p.newLine && (skip = !1);
|
|
17039
|
+
}
|
|
17040
|
+
} else for (let i = 0; i < paragraphs.length; i++) wrapper.deal(paragraphs[i]);
|
|
17145
17041
|
wrapper.send();
|
|
17146
17042
|
if (!("horizontal" === frame.layoutDirection ? richTextWidthEnable : richTextHeightEnable)) {
|
|
17147
17043
|
const frameSize = frame.getActualSizeWidthEllipsis();
|
|
@@ -18054,6 +17950,8 @@
|
|
|
18054
17950
|
}), this.transformAABBBounds(attribute, aabbBounds, rectTheme, !1, graphic), aabbBounds;
|
|
18055
17951
|
}
|
|
18056
17952
|
updateGroupAABBBounds(attribute, groupTheme, aabbBounds, graphic) {
|
|
17953
|
+
const originalAABBBounds = aabbBounds;
|
|
17954
|
+
aabbBounds = aabbBounds.clone();
|
|
18057
17955
|
const {
|
|
18058
17956
|
width: width,
|
|
18059
17957
|
height: height,
|
|
@@ -18062,12 +17960,12 @@
|
|
|
18062
17960
|
} = attribute;
|
|
18063
17961
|
path && path.length ? path.forEach(g => {
|
|
18064
17962
|
aabbBounds.union(g.AABBBounds);
|
|
18065
|
-
}) : null != width && null != height && aabbBounds.set(0, 0, width, height), clip || graphic.forEachChildren(node => {
|
|
17963
|
+
}) : null != width && null != height && aabbBounds.set(0, 0, Math.max(0, width), Math.max(0, height)), clip || graphic.forEachChildren(node => {
|
|
18066
17964
|
aabbBounds.union(node.AABBBounds);
|
|
18067
17965
|
});
|
|
18068
17966
|
const tb1 = this.tempAABBBounds1,
|
|
18069
17967
|
tb2 = this.tempAABBBounds2;
|
|
18070
|
-
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this.transformAABBBounds(attribute, aabbBounds, groupTheme, !1, graphic), aabbBounds;
|
|
17968
|
+
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this.transformAABBBounds(attribute, aabbBounds, groupTheme, !1, graphic), originalAABBBounds.copy(aabbBounds), originalAABBBounds;
|
|
18071
17969
|
}
|
|
18072
17970
|
updateGlyphAABBBounds(attribute, theme, aabbBounds, graphic) {
|
|
18073
17971
|
return this._validCheck(attribute, theme, aabbBounds, graphic) ? (graphic.getSubGraphic().forEach(node => {
|
|
@@ -20664,11 +20562,16 @@
|
|
|
20664
20562
|
backgroundMode = graphicAttribute.backgroundMode,
|
|
20665
20563
|
backgroundFit = graphicAttribute.backgroundFit
|
|
20666
20564
|
} = graphic.attribute;
|
|
20667
|
-
let
|
|
20565
|
+
let matrix,
|
|
20668
20566
|
{
|
|
20669
20567
|
background: background
|
|
20670
20568
|
} = graphic.attribute;
|
|
20671
20569
|
if (!background) return;
|
|
20570
|
+
const restore = () => {
|
|
20571
|
+
"richtext" === graphic.type && (context.restore(), context.save(), matrix && context.setTransformFromMatrix(matrix, !0, 1));
|
|
20572
|
+
};
|
|
20573
|
+
let b;
|
|
20574
|
+
"richtext" === graphic.type && (matrix = context.currentMatrix.clone(), context.restore(), context.save(), context.setTransformForCurrent());
|
|
20672
20575
|
const shouldReCalBounds = isObject$2(background) && background.background,
|
|
20673
20576
|
onlyTranslate = graphic.transMatrix.onlyTranslate();
|
|
20674
20577
|
if (shouldReCalBounds) {
|
|
@@ -20693,7 +20596,7 @@
|
|
|
20693
20596
|
})).clone());
|
|
20694
20597
|
if (graphic.backgroundImg && graphic.resources) {
|
|
20695
20598
|
const res = graphic.resources.get(background);
|
|
20696
|
-
if ("success" !== res.state || !res.data) return;
|
|
20599
|
+
if ("success" !== res.state || !res.data) return void restore();
|
|
20697
20600
|
context.highPerformanceSave(), onlyTranslate && context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), this.doDrawImage(context, res.data, b, backgroundMode, backgroundFit), context.highPerformanceRestore(), context.setTransformForCurrent();
|
|
20698
20601
|
} else {
|
|
20699
20602
|
const {
|
|
@@ -20701,7 +20604,7 @@
|
|
|
20701
20604
|
} = graphic.attribute;
|
|
20702
20605
|
context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.fillStyle = background, backgroundCornerRadius ? (createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius), context.fill()) : context.fillRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore();
|
|
20703
20606
|
}
|
|
20704
|
-
shouldReCalBounds && boundsAllocate.free(b);
|
|
20607
|
+
shouldReCalBounds && boundsAllocate.free(b), restore();
|
|
20705
20608
|
}
|
|
20706
20609
|
}
|
|
20707
20610
|
const defaultTextBackgroundRenderContribution = new DefaultTextBackgroundRenderContribution();
|
|
@@ -21339,7 +21242,7 @@
|
|
|
21339
21242
|
render(groups, params) {
|
|
21340
21243
|
this.renderTreeRoots = groups, this.drawParams = params;
|
|
21341
21244
|
const updateBounds = params.updateBounds;
|
|
21342
|
-
this.prepare(updateBounds), this.prepareRenderList(), this.beforeDraw(params), this.draw(params), this.afterDraw(params);
|
|
21245
|
+
this.prepare(updateBounds), this.prepareRenderList(), this.beforeDraw(params), this.draw(params), this.afterDraw(params), this.drawParams = null;
|
|
21343
21246
|
}
|
|
21344
21247
|
};
|
|
21345
21248
|
DefaultRenderService = __decorate$1c([injectable(), __param$z(0, inject(DrawContribution)), __metadata$U("design:paramtypes", [Object])], DefaultRenderService);
|
|
@@ -21899,7 +21802,7 @@
|
|
|
21899
21802
|
return (null !== (_a = a.attribute.zIndex) && void 0 !== _a ? _a : DefaultAttribute.zIndex) - (null !== (_b = b.attribute.zIndex) && void 0 !== _b ? _b : DefaultAttribute.zIndex);
|
|
21900
21803
|
}).forEach(group => {
|
|
21901
21804
|
group.isContainer ? this.renderGroup(group, drawContext, matrixAllocate.allocate(1, 0, 0, 1, 0, 0)) : this.renderItem(group, drawContext);
|
|
21902
|
-
}), context.restore(), context.
|
|
21805
|
+
}), context.restore(), context.setClearMatrix(1, 0, 0, 1, 0, 0), context.inuse = !1, context.draw();
|
|
21903
21806
|
}
|
|
21904
21807
|
doRegister() {
|
|
21905
21808
|
throw new Error("暂不支持");
|
|
@@ -22661,7 +22564,7 @@
|
|
|
22661
22564
|
}), !isFinite(boundsLegal)) return;
|
|
22662
22565
|
width = childrenWidth, height = childrenHeight;
|
|
22663
22566
|
}
|
|
22664
|
-
p.attribute.width = width, p.attribute.height = height, this.tempBounds.copy(p._AABBBounds);
|
|
22567
|
+
null == p.attribute.width ? p.attribute.width = width : width = p.attribute.width, null == p.attribute.height ? p.attribute.height = height : height = p.attribute.height, this.tempBounds.copy(p._AABBBounds);
|
|
22665
22568
|
const result = {
|
|
22666
22569
|
main: {
|
|
22667
22570
|
len: width,
|
|
@@ -22704,7 +22607,7 @@
|
|
|
22704
22607
|
}), tempMainL = 0, tempCrossL = 0) : (mainList.push({
|
|
22705
22608
|
idx: i - 1,
|
|
22706
22609
|
mainLen: tempMainL,
|
|
22707
|
-
crossLen:
|
|
22610
|
+
crossLen: tempCrossL
|
|
22708
22611
|
}), tempMainL = mainLen, tempCrossL = crossLen) : (tempMainL += mainLen, tempCrossL = Math.max(tempCrossL, crossLen));
|
|
22709
22612
|
}), mainList.push({
|
|
22710
22613
|
idx: mianLenArray.length - 1,
|
|
@@ -23500,7 +23403,7 @@
|
|
|
23500
23403
|
release() {
|
|
23501
23404
|
super.release(), this.hooks.beforeRender.unTap("constructor", this.beforeRender), this.hooks.afterRender.unTap("constructor", this.afterRender), this.eventSystem && this.eventSystem.release(), this.layerService.releaseStage(this), this.pluginService.release(), this.forEach(layer => {
|
|
23502
23405
|
layer.release();
|
|
23503
|
-
}), this.interactiveLayer && this.interactiveLayer.release(), this.window.release();
|
|
23406
|
+
}), this.interactiveLayer && this.interactiveLayer.release(), this.window.release(), this.ticker.remTimeline(this.timeline), this.renderService.renderTreeRoots = [];
|
|
23504
23407
|
}
|
|
23505
23408
|
setStage(stage) {}
|
|
23506
23409
|
dirty(b, matrix) {
|
|
@@ -24769,10 +24672,6 @@
|
|
|
24769
24672
|
graphicCreator.RegisterGraphicCreator("shadowRoot", createShadowRoot);
|
|
24770
24673
|
}
|
|
24771
24674
|
|
|
24772
|
-
function registerWrapTextGraphic() {
|
|
24773
|
-
graphicCreator.RegisterGraphicCreator("wrapText", createWrapText);
|
|
24774
|
-
}
|
|
24775
|
-
|
|
24776
24675
|
const warn = (msg, detail) => {
|
|
24777
24676
|
if (isFunction$1(config.warnHandler)) {
|
|
24778
24677
|
config.warnHandler.call(null, msg, detail);
|
|
@@ -26061,9 +25960,9 @@
|
|
|
26061
25960
|
dragstartTriggered = !1;
|
|
26062
25961
|
function handlePointerMove(moveEvent) {
|
|
26063
25962
|
if (dragstartTriggered || (moveEvent.type = "dragstart", null == target || target.dispatchEvent(moveEvent), dragstartTriggered = !0), moveEvent.type = "drag", null == target || target.dispatchEvent(moveEvent), !isRoot) {
|
|
26064
|
-
target.pickable = !1;
|
|
25963
|
+
target.attribute.pickable = !1;
|
|
26065
25964
|
const elemBelow = (null == rootNode ? void 0 : rootNode.pick(moveEvent.global.x, moveEvent.global.y)).graphic;
|
|
26066
|
-
target.pickable = !0, currentDroppable !== elemBelow && (currentDroppable && (moveEvent.type = "dragleave", moveEvent.target = currentDroppable, currentDroppable.dispatchEvent(moveEvent)), elemBelow && (moveEvent.type = "dragenter", moveEvent.target = elemBelow, elemBelow.dispatchEvent(moveEvent)), currentDroppable = elemBelow, currentDroppable && (moveEvent.type = "dragover", moveEvent.target = currentDroppable, currentDroppable.dispatchEvent(moveEvent)));
|
|
25965
|
+
target.attribute.pickable = !0, currentDroppable !== elemBelow && (currentDroppable && (moveEvent.type = "dragleave", moveEvent.target = currentDroppable, currentDroppable.dispatchEvent(moveEvent)), elemBelow && (moveEvent.type = "dragenter", moveEvent.target = elemBelow, elemBelow.dispatchEvent(moveEvent)), currentDroppable = elemBelow, currentDroppable && (moveEvent.type = "dragover", moveEvent.target = currentDroppable, currentDroppable.dispatchEvent(moveEvent)));
|
|
26067
25966
|
}
|
|
26068
25967
|
}
|
|
26069
25968
|
null == rootNode || rootNode.addEventListener("pointermove", handlePointerMove);
|
|
@@ -30600,12 +30499,6 @@
|
|
|
30600
30499
|
_registerText.__loaded = !1;
|
|
30601
30500
|
const registerText = _registerText;
|
|
30602
30501
|
|
|
30603
|
-
function _registerWrapText() {
|
|
30604
|
-
_registerWrapText.__loaded || (_registerWrapText.__loaded = !0, registerWrapTextGraphic());
|
|
30605
|
-
}
|
|
30606
|
-
_registerWrapText.__loaded = !1;
|
|
30607
|
-
const registerWrapText = _registerWrapText;
|
|
30608
|
-
|
|
30609
30502
|
function loadScrollbarComponent() {
|
|
30610
30503
|
registerGroup(), registerRect();
|
|
30611
30504
|
}
|
|
@@ -31199,7 +31092,7 @@
|
|
|
31199
31092
|
};
|
|
31200
31093
|
|
|
31201
31094
|
function loadPoptipComponent() {
|
|
31202
|
-
registerGroup(),
|
|
31095
|
+
registerGroup(), registerText(), registerSymbol(), registerRect();
|
|
31203
31096
|
}
|
|
31204
31097
|
function setPoptipTheme(defaultPoptipTheme) {
|
|
31205
31098
|
merge$2(theme.poptip, DEFAULT_THEME, defaultPoptipTheme);
|
|
@@ -31252,7 +31145,8 @@
|
|
|
31252
31145
|
titleVisible = isValid$3(title) && !1 !== visible,
|
|
31253
31146
|
titleAttrs = Object.assign(Object.assign({
|
|
31254
31147
|
text: isArray$3(title) ? title : [title],
|
|
31255
|
-
visible: titleVisible
|
|
31148
|
+
visible: titleVisible,
|
|
31149
|
+
wrap: !0
|
|
31256
31150
|
}, titleStyle), {
|
|
31257
31151
|
x: parsedPadding[3],
|
|
31258
31152
|
y: parsedPadding[0],
|
|
@@ -31260,7 +31154,7 @@
|
|
|
31260
31154
|
textAlign: "left",
|
|
31261
31155
|
textBaseline: "top"
|
|
31262
31156
|
}),
|
|
31263
|
-
titleShape = group.createOrUpdateChild("poptip-title", titleAttrs, "
|
|
31157
|
+
titleShape = group.createOrUpdateChild("poptip-title", titleAttrs, "text");
|
|
31264
31158
|
isEmpty(null == state ? void 0 : state.title) || (titleShape.states = state.title);
|
|
31265
31159
|
const titleBounds = titleShape.AABBBounds,
|
|
31266
31160
|
titleHeight = titleBounds.height(),
|
|
@@ -31270,7 +31164,8 @@
|
|
|
31270
31164
|
const contentVisible = isValid$3(content) && !1 !== visible,
|
|
31271
31165
|
contentAttrs = Object.assign(Object.assign({
|
|
31272
31166
|
text: isArray$3(content) ? content : [content],
|
|
31273
|
-
visible: contentVisible
|
|
31167
|
+
visible: contentVisible,
|
|
31168
|
+
wrap: !0
|
|
31274
31169
|
}, contentStyle), {
|
|
31275
31170
|
x: parsedPadding[3],
|
|
31276
31171
|
y: parsedPadding[0] + height,
|
|
@@ -31278,7 +31173,7 @@
|
|
|
31278
31173
|
textAlign: "left",
|
|
31279
31174
|
textBaseline: "top"
|
|
31280
31175
|
}),
|
|
31281
|
-
contentShape = group.createOrUpdateChild("poptip-content", contentAttrs, "
|
|
31176
|
+
contentShape = group.createOrUpdateChild("poptip-content", contentAttrs, "text");
|
|
31282
31177
|
isEmpty(null == state ? void 0 : state.content) || (contentShape.states = state.content);
|
|
31283
31178
|
const contentBounds = contentShape.AABBBounds,
|
|
31284
31179
|
contentHeight = contentBounds.height(),
|
|
@@ -35763,7 +35658,7 @@
|
|
|
35763
35658
|
super.setAttributes(params, forceUpdateTag), this.setPropsFromAttrs();
|
|
35764
35659
|
}
|
|
35765
35660
|
bindEvents() {
|
|
35766
|
-
if (this.attribute.disableTriggerEvent) return;
|
|
35661
|
+
if (this.attribute.disableTriggerEvent) return void this.setAttribute("childrenPickable", !1);
|
|
35767
35662
|
const {
|
|
35768
35663
|
showDetail: showDetail,
|
|
35769
35664
|
brushSelect: brushSelect
|
|
@@ -35795,14 +35690,21 @@
|
|
|
35795
35690
|
}));
|
|
35796
35691
|
}
|
|
35797
35692
|
eventPosToStagePos(e) {
|
|
35798
|
-
var _a, _b, _c, _d
|
|
35693
|
+
var _a, _b, _c, _d;
|
|
35799
35694
|
const {
|
|
35695
|
+
x: x,
|
|
35696
|
+
y: y
|
|
35697
|
+
} = vglobal.mapToCanvasPoint(e, null === (_d = null === (_c = null === (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.window) || void 0 === _b ? void 0 : _b.getContext()) || void 0 === _c ? void 0 : _c.canvas) || void 0 === _d ? void 0 : _d.nativeCanvas),
|
|
35698
|
+
layerPosition = {
|
|
35699
|
+
x: x,
|
|
35700
|
+
y: y
|
|
35701
|
+
};
|
|
35702
|
+
return this.parent.globalTransMatrix.transformPoint({
|
|
35800
35703
|
x: x,
|
|
35801
35704
|
y: y
|
|
35802
|
-
}
|
|
35803
|
-
|
|
35804
|
-
|
|
35805
|
-
y: y - ((null === (_f = this.stage) || void 0 === _f ? void 0 : _f.y) || 0)
|
|
35705
|
+
}, layerPosition), {
|
|
35706
|
+
x: layerPosition.x,
|
|
35707
|
+
y: layerPosition.y
|
|
35806
35708
|
};
|
|
35807
35709
|
}
|
|
35808
35710
|
_onHandlerPointerEnter(e) {
|
|
@@ -39525,10 +39427,15 @@
|
|
|
39525
39427
|
});
|
|
39526
39428
|
}
|
|
39527
39429
|
_getHandlers() {
|
|
39528
|
-
|
|
39529
|
-
|
|
39430
|
+
const {
|
|
39431
|
+
inverse: inverse
|
|
39432
|
+
} = this.attribute;
|
|
39433
|
+
let startHandler = this._startHandler,
|
|
39530
39434
|
endHandler = this._endHandler;
|
|
39531
|
-
return this._isHorizontal ?
|
|
39435
|
+
return endHandler ? (this._isHorizontal ? (!inverse && endHandler.attribute.x < (null == startHandler ? void 0 : startHandler.attribute.x) || inverse && endHandler.attribute.x > (null == startHandler ? void 0 : startHandler.attribute.x)) && ([startHandler, endHandler] = [endHandler, startHandler]) : (!inverse && endHandler.attribute.y < (null == startHandler ? void 0 : startHandler.attribute.y) || inverse && endHandler.attribute.y > (null == startHandler ? void 0 : startHandler.attribute.y)) && ([startHandler, endHandler] = [endHandler, startHandler]), {
|
|
39436
|
+
startHandler: startHandler,
|
|
39437
|
+
endHandler: endHandler
|
|
39438
|
+
}) : {
|
|
39532
39439
|
startHandler: startHandler,
|
|
39533
39440
|
endHandler: endHandler
|
|
39534
39441
|
};
|
|
@@ -39902,7 +39809,7 @@
|
|
|
39902
39809
|
};
|
|
39903
39810
|
|
|
39904
39811
|
function loadTitleComponent() {
|
|
39905
|
-
registerGroup(),
|
|
39812
|
+
registerGroup(), registerText(), registerRichtext();
|
|
39906
39813
|
}
|
|
39907
39814
|
|
|
39908
39815
|
loadTitleComponent();
|
|
@@ -39965,7 +39872,8 @@
|
|
|
39965
39872
|
}, textStyle);
|
|
39966
39873
|
this._mainTitle = group.createOrUpdateChild("mainTitle", attr, "richtext");
|
|
39967
39874
|
} else isValid$3(text) && (this._mainTitle = group.createOrUpdateChild("mainTitle", Object.assign(Object.assign({
|
|
39968
|
-
text: isArray$3(text) ? text : [text]
|
|
39875
|
+
text: isArray$3(text) ? text : [text],
|
|
39876
|
+
wrap: !0
|
|
39969
39877
|
}, textStyle), {
|
|
39970
39878
|
maxLineWidth: null !== (_t = textStyle.maxLineWidth) && void 0 !== _t ? _t : width,
|
|
39971
39879
|
heightLimit: textStyle.heightLimit,
|
|
@@ -39973,7 +39881,7 @@
|
|
|
39973
39881
|
ellipsis: null === (_u = textStyle.ellipsis) || void 0 === _u || _u,
|
|
39974
39882
|
x: 0,
|
|
39975
39883
|
y: 0
|
|
39976
|
-
}), "
|
|
39884
|
+
}), "text"));
|
|
39977
39885
|
const maintextHeight = this._mainTitle ? this._mainTitle.AABBBounds.height() : 0,
|
|
39978
39886
|
maintextWidth = this._mainTitle ? this._mainTitle.AABBBounds.width() : 0;
|
|
39979
39887
|
if (!1 !== this.attribute.visible && !1 !== subtextStyle.visible) if ("rich" === subtextType || isValid$3(subtextStyle.character)) {
|
|
@@ -40006,7 +39914,8 @@
|
|
|
40006
39914
|
}, subtextStyle);
|
|
40007
39915
|
this._subTitle = group.createOrUpdateChild("subTitle", attr, "richtext");
|
|
40008
39916
|
} else isValid$3(subtext) && (this._subTitle = group.createOrUpdateChild("subTitle", Object.assign(Object.assign({
|
|
40009
|
-
text: isArray$3(subtext) ? subtext : [subtext]
|
|
39917
|
+
text: isArray$3(subtext) ? subtext : [subtext],
|
|
39918
|
+
wrap: !0
|
|
40010
39919
|
}, subtextStyle), {
|
|
40011
39920
|
maxLineWidth: null !== (_12 = subtextStyle.maxLineWidth) && void 0 !== _12 ? _12 : width,
|
|
40012
39921
|
heightLimit: subtextStyle.heightLimit,
|
|
@@ -40014,7 +39923,7 @@
|
|
|
40014
39923
|
ellipsis: null === (_13 = subtextStyle.ellipsis) || void 0 === _13 || _13,
|
|
40015
39924
|
x: 0,
|
|
40016
39925
|
y: maintextHeight
|
|
40017
|
-
}), "
|
|
39926
|
+
}), "text"));
|
|
40018
39927
|
const subtextHeight = this._subTitle ? this._subTitle.AABBBounds.height() : 0,
|
|
40019
39928
|
subtextWidth = this._subTitle ? this._subTitle.AABBBounds.width() : 0;
|
|
40020
39929
|
let titleWidth = Math.max(maintextWidth, subtextWidth),
|
|
@@ -40850,15 +40759,16 @@
|
|
|
40850
40759
|
}, this._onBrushing = e => {
|
|
40851
40760
|
this._outOfInteractiveRange(e) || ((this._activeDrawState || this._activeMoveState) && e.stopPropagation(), this._activeDrawState && this._drawing(e), this._activeMoveState && this._moving(e));
|
|
40852
40761
|
}, this._onBrushingWithDelay = 0 === this.attribute.delayTime ? this._onBrushing : delayMap$1[this.attribute.delayType](this._onBrushing, this.attribute.delayTime), this._onBrushEnd = e => {
|
|
40762
|
+
var _a;
|
|
40853
40763
|
e.preventDefault();
|
|
40854
40764
|
const {
|
|
40855
40765
|
removeOnClick = !0
|
|
40856
40766
|
} = this.attribute;
|
|
40857
|
-
this._activeDrawState && !this._isDrawedBeforeEnd && removeOnClick ? (this.
|
|
40767
|
+
this._activeDrawState && !this._isDrawedBeforeEnd && removeOnClick ? ((null === (_a = this._operatingMask) || void 0 === _a ? void 0 : _a._AABBBounds.empty()) && this._dispatchEvent(IOperateType.brushClear, {
|
|
40858
40768
|
operateMask: this._operatingMask,
|
|
40859
40769
|
operatedMaskAABBBounds: this._brushMaskAABBBoundsDict,
|
|
40860
40770
|
event: e
|
|
40861
|
-
})) : (this._activeDrawState && this._dispatchEvent(IOperateType.drawEnd, {
|
|
40771
|
+
}), this._container.incrementalClearChild(), this._brushMaskAABBBoundsDict = {}) : (this._activeDrawState && this._dispatchEvent(IOperateType.drawEnd, {
|
|
40862
40772
|
operateMask: this._operatingMask,
|
|
40863
40773
|
operatedMaskAABBBounds: this._brushMaskAABBBoundsDict,
|
|
40864
40774
|
event: e
|
|
@@ -40938,28 +40848,29 @@
|
|
|
40938
40848
|
_drawing(e) {
|
|
40939
40849
|
var _a, _b;
|
|
40940
40850
|
const pos = this.eventPosToStagePos(e),
|
|
40941
|
-
{
|
|
40942
|
-
x1 = 0,
|
|
40943
|
-
x2 = 0,
|
|
40944
|
-
y1 = 0,
|
|
40945
|
-
y2 = 0
|
|
40946
|
-
} = null === (_a = this._operatingMask) || void 0 === _a ? void 0 : _a._AABBBounds,
|
|
40947
40851
|
{
|
|
40948
40852
|
sizeThreshold = DEFAULT_SIZE_THRESHOLD,
|
|
40949
40853
|
brushType: brushType
|
|
40950
40854
|
} = this.attribute,
|
|
40951
40855
|
cacheLength = this._cacheDrawPoints.length;
|
|
40952
|
-
if (
|
|
40953
|
-
const lastPos = null !== (
|
|
40856
|
+
if (cacheLength > 0) {
|
|
40857
|
+
const lastPos = null !== (_a = this._cacheDrawPoints[this._cacheDrawPoints.length - 1]) && void 0 !== _a ? _a : {};
|
|
40954
40858
|
if (pos.x === lastPos.x && pos.y === lastPos.y) return;
|
|
40955
40859
|
}
|
|
40956
40860
|
"polygon" === brushType || cacheLength <= 1 ? this._cacheDrawPoints.push(pos) : this._cacheDrawPoints[cacheLength - 1] = pos;
|
|
40957
40861
|
const maskPoints = this._computeMaskPoints();
|
|
40958
|
-
this._operatingMask.setAttribute("points", maskPoints)
|
|
40862
|
+
this._operatingMask.setAttribute("points", maskPoints);
|
|
40863
|
+
const {
|
|
40864
|
+
x1 = 0,
|
|
40865
|
+
x2 = 0,
|
|
40866
|
+
y1 = 0,
|
|
40867
|
+
y2 = 0
|
|
40868
|
+
} = null === (_b = this._operatingMask) || void 0 === _b ? void 0 : _b._AABBBounds;
|
|
40869
|
+
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._dispatchEvent(IOperateType.drawing, {
|
|
40959
40870
|
operateMask: this._operatingMask,
|
|
40960
40871
|
operatedMaskAABBBounds: this._brushMaskAABBBoundsDict,
|
|
40961
40872
|
event: e
|
|
40962
|
-
});
|
|
40873
|
+
}));
|
|
40963
40874
|
}
|
|
40964
40875
|
_moving(e) {
|
|
40965
40876
|
const startPos = this._cacheMovePoint,
|
|
@@ -41048,14 +40959,20 @@
|
|
|
41048
40959
|
return pos.x > maxX || pos.x < minX || pos.y > maxY || pos.y < minY;
|
|
41049
40960
|
}
|
|
41050
40961
|
eventPosToStagePos(e) {
|
|
41051
|
-
var _a, _b;
|
|
41052
40962
|
const {
|
|
40963
|
+
x: x,
|
|
40964
|
+
y: y
|
|
40965
|
+
} = vglobal.mapToCanvasPoint(e, this.stage.window.getContext().canvas.nativeCanvas),
|
|
40966
|
+
layerPosition = {
|
|
40967
|
+
x: x,
|
|
40968
|
+
y: y
|
|
40969
|
+
};
|
|
40970
|
+
return this.parent.globalTransMatrix.transformPoint({
|
|
41053
40971
|
x: x,
|
|
41054
40972
|
y: y
|
|
41055
|
-
}
|
|
41056
|
-
|
|
41057
|
-
|
|
41058
|
-
y: y - ((null === (_b = this.stage) || void 0 === _b ? void 0 : _b.y) || 0)
|
|
40973
|
+
}, layerPosition), {
|
|
40974
|
+
x: layerPosition.x,
|
|
40975
|
+
y: layerPosition.y
|
|
41059
40976
|
};
|
|
41060
40977
|
}
|
|
41061
40978
|
render() {
|
|
@@ -42073,10 +41990,7 @@
|
|
|
42073
41990
|
function distance(p1, p2 = { x: 0, y: 0 }) {
|
|
42074
41991
|
return PointService.distancePP(p1, p2);
|
|
42075
41992
|
}
|
|
42076
|
-
function getPercentValue(valueList,
|
|
42077
|
-
if (!valueList[idx]) {
|
|
42078
|
-
return 0;
|
|
42079
|
-
}
|
|
41993
|
+
function getPercentValue(valueList, precision = 2) {
|
|
42080
41994
|
const sum = valueList.reduce((a, c) => {
|
|
42081
41995
|
return (a += isNaN(c) ? 0 : c);
|
|
42082
41996
|
}, 0);
|
|
@@ -42110,7 +42024,7 @@
|
|
|
42110
42024
|
remainder[maxId] = 0;
|
|
42111
42025
|
++currentSum;
|
|
42112
42026
|
}
|
|
42113
|
-
return seats
|
|
42027
|
+
return seats.map(entry => entry / digits);
|
|
42114
42028
|
}
|
|
42115
42029
|
|
|
42116
42030
|
function eachSeries(regions, callback, filter) {
|
|
@@ -43295,10 +43209,21 @@
|
|
|
43295
43209
|
});
|
|
43296
43210
|
}), res;
|
|
43297
43211
|
};
|
|
43212
|
+
const parseTriggerOffOfSelect = triggerOff => {
|
|
43213
|
+
const triggerOffArray = array(triggerOff),
|
|
43214
|
+
resetType = [],
|
|
43215
|
+
eventNames = [];
|
|
43216
|
+
return triggerOffArray.forEach(off => {
|
|
43217
|
+
"empty" === off ? resetType.push("view") : isString$1(off) && "none" !== off ? off.includes("view:") ? (eventNames.push(off.replace("view:", "")), resetType.push("view")) : (eventNames.push(off), resetType.push("self")) : isNumber$3(off) && resetType.push("timeout");
|
|
43218
|
+
}), {
|
|
43219
|
+
eventNames: eventNames,
|
|
43220
|
+
resetType: resetType
|
|
43221
|
+
};
|
|
43222
|
+
};
|
|
43298
43223
|
|
|
43299
43224
|
class ElementSelect extends BaseInteraction {
|
|
43300
43225
|
constructor(view, options) {
|
|
43301
|
-
super(view, options), this.type = ElementSelect.type, this.clearPrevElements = () => {
|
|
43226
|
+
super(view, options), this.type = ElementSelect.type, this._resetType = [], this.clearPrevElements = () => {
|
|
43302
43227
|
const {
|
|
43303
43228
|
state: state,
|
|
43304
43229
|
reverseState: reverseState
|
|
@@ -43322,12 +43247,17 @@
|
|
|
43322
43247
|
events = [{
|
|
43323
43248
|
type: trigger,
|
|
43324
43249
|
handler: this.handleStart
|
|
43325
|
-
}]
|
|
43326
|
-
|
|
43327
|
-
|
|
43328
|
-
|
|
43329
|
-
|
|
43330
|
-
|
|
43250
|
+
}],
|
|
43251
|
+
{
|
|
43252
|
+
eventNames: eventNames,
|
|
43253
|
+
resetType: resetType
|
|
43254
|
+
} = parseTriggerOffOfSelect(triggerOff);
|
|
43255
|
+
return eventNames.forEach(evt => {
|
|
43256
|
+
evt && (isArray$3(trigger) ? !trigger.includes(evt) : evt !== trigger) && events.push({
|
|
43257
|
+
type: evt,
|
|
43258
|
+
handler: this.handleReset
|
|
43259
|
+
});
|
|
43260
|
+
}), this._resetType = resetType, events;
|
|
43331
43261
|
}
|
|
43332
43262
|
start(element) {
|
|
43333
43263
|
const {
|
|
@@ -43335,17 +43265,24 @@
|
|
|
43335
43265
|
reverseState: reverseState,
|
|
43336
43266
|
isMultiple: isMultiple
|
|
43337
43267
|
} = this.options;
|
|
43338
|
-
element && this._marks && this._marks.includes(element.mark)
|
|
43339
|
-
|
|
43340
|
-
|
|
43341
|
-
|
|
43342
|
-
|
|
43343
|
-
|
|
43268
|
+
if (element && this._marks && this._marks.includes(element.mark)) {
|
|
43269
|
+
if (element.hasState(state)) {
|
|
43270
|
+
if (this._resetType.includes("self")) {
|
|
43271
|
+
const newStatedElements = this._statedElements && this._statedElements.filter(el => el !== element);
|
|
43272
|
+
newStatedElements && newStatedElements.length ? this._statedElements = this.updateStates(newStatedElements, this._statedElements, state, reverseState) : this.clearPrevElements();
|
|
43273
|
+
}
|
|
43274
|
+
} else this._timer && clearTimeout(this._timer), element.addState(state), this._statedElements = this.updateStates(isMultiple && this._statedElements ? [...this._statedElements, element] : [element], this._statedElements, state, reverseState), this.dispatchEvent("start", {
|
|
43275
|
+
elements: this._statedElements,
|
|
43276
|
+
options: this.options
|
|
43277
|
+
}), this._resetType.includes("timeout") && (this._timer = setTimeout(() => {
|
|
43278
|
+
this.clearPrevElements();
|
|
43279
|
+
}, this.options.triggerOff));
|
|
43280
|
+
} else this._resetType.includes("view") && this._statedElements && this._statedElements.length && this.clearPrevElements();
|
|
43344
43281
|
}
|
|
43345
43282
|
reset(element) {
|
|
43346
43283
|
if (!this._statedElements || !this._statedElements.length) return;
|
|
43347
43284
|
const hasActiveElement = element && this._marks && this._marks.includes(element.mark);
|
|
43348
|
-
"view"
|
|
43285
|
+
(this._resetType.includes("view") && !hasActiveElement || this._resetType.includes("self") && hasActiveElement) && this.clearPrevElements();
|
|
43349
43286
|
}
|
|
43350
43287
|
}
|
|
43351
43288
|
ElementSelect.type = "element-select", ElementSelect.defaultOptions = {
|
|
@@ -48068,7 +48005,7 @@
|
|
|
48068
48005
|
}
|
|
48069
48006
|
release() {
|
|
48070
48007
|
var _a, _b, _c;
|
|
48071
|
-
this.removeAllInteractions(), this.releaseStageEvent(), this._unBindResizeEvent(), this.clearProgressive(), Factory$1.unregisterRuntimeTransforms(), this.animate.stop(), this.grammars.release(), this._cachedGrammars.release(), this._dataflow.release(), this._dataflow = null, null === (_b = null === (_a = this.renderer) || void 0 === _a ? void 0 : _a.release) || void 0 === _b || _b.call(_a), this.renderer = null, this._boundInteractions = null, this.removeAllListeners(), null === (_c = this._eventListeners) || void 0 === _c || _c.forEach(listener => {
|
|
48008
|
+
this.removeAllInteractions(), this.releaseStageEvent(), this._unBindResizeEvent(), this.clearProgressive(), Factory$1.unregisterRuntimeTransforms(), Logger.setInstance(null), this.animate.stop(), this.grammars.release(), this._cachedGrammars.release(), this._dataflow.release(), this._dataflow = null, null === (_b = null === (_a = this.renderer) || void 0 === _a ? void 0 : _a.release) || void 0 === _b || _b.call(_a), this.renderer = null, this._boundInteractions = null, this.removeAllListeners(), null === (_c = this._eventListeners) || void 0 === _c || _c.forEach(listener => {
|
|
48072
48009
|
listener.source.removeEventListener(listener.type, listener.handler);
|
|
48073
48010
|
}), this._eventListeners = null;
|
|
48074
48011
|
}
|
|
@@ -50316,12 +50253,16 @@
|
|
|
50316
50253
|
const from = Object.assign({}, element.getPrevGraphicAttributes()),
|
|
50317
50254
|
to = Object.assign({}, element.getNextGraphicAttributes());
|
|
50318
50255
|
let excludeChannels;
|
|
50319
|
-
|
|
50256
|
+
options && array(options.excludeChannels).forEach(key => {
|
|
50320
50257
|
delete from[key], delete to[key];
|
|
50321
50258
|
}), element.mark && element.mark.markType && (excludeChannels = BUILT_IN_EXCLUDE_CHANNELS[element.mark.markType]) && excludeChannels.forEach(key => {
|
|
50322
50259
|
delete from[key], delete to[key];
|
|
50323
50260
|
}), Object.keys(to).forEach(key => {
|
|
50324
50261
|
isEqual(key, from, to) && (delete from[key], delete to[key]);
|
|
50262
|
+
});
|
|
50263
|
+
const final = element.getFinalGraphicAttributes();
|
|
50264
|
+
return Object.keys(from).forEach(key => {
|
|
50265
|
+
isNil$3(to[key]) && (isNil$3(final[key]) || isEqual$1(from[key], final[key]) ? delete from[key] : to[key] = final[key]);
|
|
50325
50266
|
}), {
|
|
50326
50267
|
from: from,
|
|
50327
50268
|
to: to
|
|
@@ -56872,13 +56813,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56872
56813
|
const chartSpec = this._option.getChart().getSpec();
|
|
56873
56814
|
const hasDataZoom = (_b = (_a = chartSpec.dataZoom) === null || _a === void 0 ? void 0 : _a.some) === null || _b === void 0 ? void 0 : _b.call(_a, (entry) => {
|
|
56874
56815
|
var _a;
|
|
56875
|
-
const filterMode = (_a = entry.filterMode) !== null && _a !== void 0 ? _a :
|
|
56876
|
-
return filterMode ===
|
|
56816
|
+
const filterMode = (_a = entry.filterMode) !== null && _a !== void 0 ? _a : 'filter';
|
|
56817
|
+
return filterMode === 'axis';
|
|
56877
56818
|
});
|
|
56878
56819
|
const hasScrollBar = (_d = (_c = chartSpec.scrollBar) === null || _c === void 0 ? void 0 : _c.some) === null || _d === void 0 ? void 0 : _d.call(_c, (entry) => {
|
|
56879
56820
|
var _a;
|
|
56880
|
-
const filterMode = (_a = entry.filterMode) !== null && _a !== void 0 ? _a :
|
|
56881
|
-
return filterMode ===
|
|
56821
|
+
const filterMode = (_a = entry.filterMode) !== null && _a !== void 0 ? _a : 'axis';
|
|
56822
|
+
return filterMode === 'axis';
|
|
56882
56823
|
});
|
|
56883
56824
|
return hasDataZoom || hasScrollBar ? true : this._layout.layoutClip;
|
|
56884
56825
|
}
|
|
@@ -64589,7 +64530,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
64589
64530
|
registerComponentPlugin(CanvasTooltipHandler);
|
|
64590
64531
|
};
|
|
64591
64532
|
|
|
64592
|
-
const version = "1.10.5
|
|
64533
|
+
const version = "1.10.5";
|
|
64593
64534
|
|
|
64594
64535
|
const addVChartProperty = (data, op) => {
|
|
64595
64536
|
const context = op.beforeCall();
|
|
@@ -68158,9 +68099,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68158
68099
|
this.updateChartConfig({ change: true, reMake: false }, this._spec);
|
|
68159
68100
|
this.setLayoutTag(true, null, false);
|
|
68160
68101
|
this.updateGlobalScaleTheme();
|
|
68161
|
-
this._regions.forEach(
|
|
68162
|
-
|
|
68163
|
-
|
|
68102
|
+
[...this._regions, ...this._series, ...this._components].forEach(model => {
|
|
68103
|
+
const specInfo = model.getSpecInfo();
|
|
68104
|
+
if (specInfo && specInfo.spec) {
|
|
68105
|
+
model.reInit(specInfo.spec);
|
|
68106
|
+
}
|
|
68107
|
+
});
|
|
68164
68108
|
}
|
|
68165
68109
|
clear() {
|
|
68166
68110
|
this.getAllModels().forEach(i => { var _a; return (_a = i.clear) === null || _a === void 0 ? void 0 : _a.call(i); });
|
|
@@ -73775,6 +73719,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
73775
73719
|
let lastAngle = startAngle;
|
|
73776
73720
|
let restAngle = angleRange;
|
|
73777
73721
|
let largeThanMinAngleTotal = 0;
|
|
73722
|
+
const percents = getPercentValue(valueList);
|
|
73778
73723
|
data.forEach((d, i) => {
|
|
73779
73724
|
const angleFieldValue = d[ARC_TRANSFORM_VALUE];
|
|
73780
73725
|
const ratio = total ? angleFieldValue / total : 0;
|
|
@@ -73790,7 +73735,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
73790
73735
|
const dEndAngle = lastAngle + radian;
|
|
73791
73736
|
d[asRatio] = ratio;
|
|
73792
73737
|
d[asK] = max ? angleFieldValue / max : 0;
|
|
73793
|
-
d._percent_ =
|
|
73738
|
+
d._percent_ = percents[i];
|
|
73794
73739
|
appendArcInfo(d, dStartAngle, radian);
|
|
73795
73740
|
lastAngle = dEndAngle;
|
|
73796
73741
|
});
|
|
@@ -80023,8 +79968,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
80023
79968
|
if (null === (_b = datum.children) || void 0 === _b ? void 0 : _b.length) {
|
|
80024
79969
|
node.children = [], node.isLeaf = !1;
|
|
80025
79970
|
const res = calculateNodeValue$1(datum.children, node.children, depth + 1, prevFlattenIndex, node, getNodeKey);
|
|
80026
|
-
node.value = isNil$3(datum.value) ? res.sum : Math.max(res.sum,
|
|
80027
|
-
} else node.isLeaf = !0, node.value =
|
|
79971
|
+
node.value = isNil$3(datum.value) ? res.sum : Math.max(res.sum, toValidNumber$1(datum.value)), prevFlattenIndex = res.flattenIndex, maxDepth = Math.max(res.maxDepth, maxDepth);
|
|
79972
|
+
} else node.isLeaf = !0, node.value = toValidNumber$1(datum.value);
|
|
80028
79973
|
sum += Math.abs(node.value), output.push(node);
|
|
80029
79974
|
}), {
|
|
80030
79975
|
sum: sum,
|
|
@@ -84615,8 +84560,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
84615
84560
|
super.transformSpec(spec);
|
|
84616
84561
|
if (isArray$3(spec.dataZoom) && spec.dataZoom.length > 0) {
|
|
84617
84562
|
spec.dataZoom.forEach((zoom) => {
|
|
84618
|
-
if (zoom.filterMode ===
|
|
84619
|
-
zoom.filterMode =
|
|
84563
|
+
if (zoom.filterMode === 'axis') {
|
|
84564
|
+
zoom.filterMode = 'filter';
|
|
84620
84565
|
}
|
|
84621
84566
|
});
|
|
84622
84567
|
}
|
|
@@ -85095,7 +85040,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
85095
85040
|
if (dataLength) {
|
|
85096
85041
|
ratio = ((seriesSpec === null || seriesSpec === void 0 ? void 0 : seriesSpec.height) || defaultSeriesRowHeight) / (dataLength * 30);
|
|
85097
85042
|
}
|
|
85098
|
-
scrollBar.push(Object.assign({ orient: 'right', visible: seriesSpec.type === exports.SeriesTypeEnum.dot && ratio < 1, id: `scrollBarRightRow${rowNum}`, start: 0, end: Math.min(ratio, 1), filterMode:
|
|
85043
|
+
scrollBar.push(Object.assign({ orient: 'right', visible: seriesSpec.type === exports.SeriesTypeEnum.dot && ratio < 1, id: `scrollBarRightRow${rowNum}`, start: 0, end: Math.min(ratio, 1), filterMode: 'axis', regionIndex: region.length - 1, axisId: `axesLeftRow${rowNum}` }, array(spec === null || spec === void 0 ? void 0 : spec.scrollBar)[0]));
|
|
85099
85044
|
}
|
|
85100
85045
|
seriesSpec.regionIndex = region.length - 1;
|
|
85101
85046
|
rowNum++;
|
|
@@ -86632,6 +86577,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86632
86577
|
result.height = Math.ceil(result.height);
|
|
86633
86578
|
return this._layout.setRectInSpec(this._layoutCacheProcessing(result));
|
|
86634
86579
|
};
|
|
86580
|
+
this._updateAxisLayout = () => {
|
|
86581
|
+
const startPoint = this.getLayoutStartPoint();
|
|
86582
|
+
const _a = this._getUpdateAttribute(false), { grid: updateGridAttrs } = _a, updateAxisAttrs = __rest$7(_a, ["grid"]);
|
|
86583
|
+
const axisProduct = this._axisMark.getProduct();
|
|
86584
|
+
const axisAttrs = mergeSpec({ x: startPoint.x, y: startPoint.y }, this._axisStyle, updateAxisAttrs);
|
|
86585
|
+
axisProduct.encode(axisAttrs);
|
|
86586
|
+
if (this._gridMark) {
|
|
86587
|
+
const gridProduct = this._gridMark.getProduct();
|
|
86588
|
+
gridProduct.encode(mergeSpec({ x: startPoint.x, y: startPoint.y }, this._getGridAttributes(), updateGridAttrs));
|
|
86589
|
+
}
|
|
86590
|
+
};
|
|
86635
86591
|
this._fixAxisOnZero = () => {
|
|
86636
86592
|
const { onZero, visible } = this._spec.domainLine;
|
|
86637
86593
|
if (this.visible && onZero && visible !== false) {
|
|
@@ -87009,21 +86965,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
87009
86965
|
}
|
|
87010
86966
|
return result;
|
|
87011
86967
|
}
|
|
87012
|
-
updateLayoutAttribute() {
|
|
87013
|
-
if (!this.visible) {
|
|
87014
|
-
return;
|
|
87015
|
-
}
|
|
87016
|
-
const startPoint = this.getLayoutStartPoint();
|
|
87017
|
-
const _a = this._getUpdateAttribute(false), { grid: updateGridAttrs } = _a, updateAxisAttrs = __rest$7(_a, ["grid"]);
|
|
87018
|
-
const axisProduct = this._axisMark.getProduct();
|
|
87019
|
-
const axisAttrs = mergeSpec({ x: startPoint.x, y: startPoint.y }, this._axisStyle, updateAxisAttrs);
|
|
87020
|
-
axisProduct.encode(axisAttrs);
|
|
87021
|
-
if (this._gridMark) {
|
|
87022
|
-
const gridProduct = this._gridMark.getProduct();
|
|
87023
|
-
gridProduct.encode(mergeSpec({ x: startPoint.x, y: startPoint.y }, this._getGridAttributes(), updateGridAttrs));
|
|
87024
|
-
}
|
|
87025
|
-
super.updateLayoutAttribute();
|
|
87026
|
-
}
|
|
87027
86968
|
_getTitleLimit(isX) {
|
|
87028
86969
|
var _a, _b, _c, _d, _e;
|
|
87029
86970
|
if (this._spec.title.visible && isNil$3((_a = this._spec.title.style) === null || _a === void 0 ? void 0 : _a.maxLineWidth)) {
|
|
@@ -87166,6 +87107,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
87166
87107
|
initEvent() {
|
|
87167
87108
|
super.initEvent();
|
|
87168
87109
|
if (this.visible) {
|
|
87110
|
+
this.event.on(exports.ChartEvent.layoutEnd, this._updateAxisLayout);
|
|
87169
87111
|
this.event.on(exports.ChartEvent.layoutEnd, this._fixAxisOnZero);
|
|
87170
87112
|
this.event.on(exports.ChartEvent.layoutRectUpdate, () => {
|
|
87171
87113
|
this._clearLayoutCache();
|
|
@@ -88884,15 +88826,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
88884
88826
|
return legendData;
|
|
88885
88827
|
}
|
|
88886
88828
|
_getSeriesLegendField(s) {
|
|
88887
|
-
var _a, _b;
|
|
88829
|
+
var _a, _b, _c;
|
|
88888
88830
|
const defaultField = s.getSeriesField();
|
|
88889
|
-
|
|
88831
|
+
const specifyScaleId = (_a = this._spec.scaleName) !== null && _a !== void 0 ? _a : this._spec.scale;
|
|
88832
|
+
if (isNil$3(specifyScaleId)) {
|
|
88890
88833
|
return defaultField;
|
|
88891
88834
|
}
|
|
88892
88835
|
if (!s.getRawData()) {
|
|
88893
88836
|
return defaultField;
|
|
88894
88837
|
}
|
|
88895
|
-
const scaleSpec = this._option.globalScale.getScaleSpec(
|
|
88838
|
+
const scaleSpec = this._option.globalScale.getScaleSpec(specifyScaleId);
|
|
88896
88839
|
if (!scaleSpec) {
|
|
88897
88840
|
return defaultField;
|
|
88898
88841
|
}
|
|
@@ -88906,7 +88849,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
88906
88849
|
if (!seriesData) {
|
|
88907
88850
|
return defaultField;
|
|
88908
88851
|
}
|
|
88909
|
-
return (
|
|
88852
|
+
return (_c = (_b = seriesData.fields) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : defaultField;
|
|
88910
88853
|
}
|
|
88911
88854
|
_initSelectedData() {
|
|
88912
88855
|
if (this._spec.defaultSelected) {
|
|
@@ -89021,17 +88964,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89021
88964
|
const { series, field, scale } = op;
|
|
89022
88965
|
const datumField = field();
|
|
89023
88966
|
if (field && datumField) {
|
|
89024
|
-
let min =
|
|
89025
|
-
let max =
|
|
88967
|
+
let min = Infinity;
|
|
88968
|
+
let max = -Infinity;
|
|
89026
88969
|
series().forEach(s => {
|
|
89027
88970
|
const statisticData = s.getRawDataStatisticsByField(datumField, true);
|
|
89028
88971
|
const seriesMin = statisticData === null || statisticData === void 0 ? void 0 : statisticData.min;
|
|
89029
88972
|
const seriesMax = statisticData === null || statisticData === void 0 ? void 0 : statisticData.max;
|
|
89030
88973
|
if (isValidNumber$1(seriesMin)) {
|
|
89031
|
-
min = seriesMin;
|
|
88974
|
+
min = Math.min(seriesMin, min);
|
|
89032
88975
|
}
|
|
89033
88976
|
if (isValidNumber$1(seriesMax)) {
|
|
89034
|
-
max = seriesMax;
|
|
88977
|
+
max = Math.max(seriesMax, max);
|
|
89035
88978
|
}
|
|
89036
88979
|
});
|
|
89037
88980
|
return [min, max];
|
|
@@ -89186,10 +89129,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89186
89129
|
type: 'continuousLegendDataMake',
|
|
89187
89130
|
options: {
|
|
89188
89131
|
series: () => {
|
|
89189
|
-
return this._regions
|
|
89190
|
-
|
|
89191
|
-
|
|
89192
|
-
}
|
|
89132
|
+
return getSeries(this._regions, {
|
|
89133
|
+
userId: this._seriesUserId,
|
|
89134
|
+
specIndex: this._seriesIndex
|
|
89135
|
+
});
|
|
89193
89136
|
},
|
|
89194
89137
|
field: () => this._field,
|
|
89195
89138
|
scale: this._getScaleInGlobal.bind(this)
|
|
@@ -91093,13 +91036,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91093
91036
|
_handleChange(start, end, updateComponent) {
|
|
91094
91037
|
var _a, _b;
|
|
91095
91038
|
const zoomLock = (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.zoomLock) !== null && _b !== void 0 ? _b : false;
|
|
91096
|
-
if (zoomLock ||
|
|
91039
|
+
if (zoomLock ||
|
|
91040
|
+
(end - start !== this._spanCache &&
|
|
91041
|
+
(end - start < this._minSpan || end - start > this._maxSpan))) {
|
|
91097
91042
|
this._shouldChange = false;
|
|
91098
91043
|
}
|
|
91099
91044
|
else {
|
|
91100
91045
|
this._shouldChange = true;
|
|
91046
|
+
this._spanCache = end - start;
|
|
91101
91047
|
}
|
|
91102
|
-
this._spanCache = end - start;
|
|
91103
91048
|
}
|
|
91104
91049
|
_isReverse() {
|
|
91105
91050
|
const axis = this._relatedAxisComponent;
|
|
@@ -91181,7 +91126,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91181
91126
|
onZoomChange: (tag) => {
|
|
91182
91127
|
var _a, _b;
|
|
91183
91128
|
const axis = this._relatedAxisComponent;
|
|
91184
|
-
if (axis && this._filterMode ===
|
|
91129
|
+
if (axis && this._filterMode === 'axis') {
|
|
91185
91130
|
const axisScale = axis.getScale();
|
|
91186
91131
|
const axisSpec = axis.getSpec();
|
|
91187
91132
|
if (this._auto && this._getAxisBandSize(axisSpec) && this._spec.ignoreBandSize) {
|
|
@@ -91265,7 +91210,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91265
91210
|
if (active) {
|
|
91266
91211
|
this._handleChartMove(value, (_a = this._scrollAttr.rate) !== null && _a !== void 0 ? _a : 1);
|
|
91267
91212
|
}
|
|
91268
|
-
|
|
91213
|
+
const hasChange = this._start !== 0 && this._end !== 1;
|
|
91214
|
+
return active && hasChange;
|
|
91269
91215
|
};
|
|
91270
91216
|
this._handleChartDrag = (delta, e) => {
|
|
91271
91217
|
var _a;
|
|
@@ -91291,6 +91237,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91291
91237
|
this._handleChange(this._start + moveDelta, this._end + moveDelta, true);
|
|
91292
91238
|
}
|
|
91293
91239
|
}
|
|
91240
|
+
return false;
|
|
91294
91241
|
};
|
|
91295
91242
|
this._orient = getOrient(spec);
|
|
91296
91243
|
this._isHorizontal = getDirectionByOrient(this._orient) === "horizontal";
|
|
@@ -91326,7 +91273,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91326
91273
|
this._relatedAxisComponent = bandAxis;
|
|
91327
91274
|
}
|
|
91328
91275
|
}
|
|
91329
|
-
if (this._relatedAxisComponent && this._filterMode ===
|
|
91276
|
+
if (this._relatedAxisComponent && this._filterMode === 'axis') {
|
|
91330
91277
|
this._relatedAxisComponent.autoIndentOnce = true;
|
|
91331
91278
|
}
|
|
91332
91279
|
}
|
|
@@ -91568,8 +91515,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91568
91515
|
}
|
|
91569
91516
|
this._minSpan = Math.max(0, this._minSpan);
|
|
91570
91517
|
this._maxSpan = Math.min(this._maxSpan, 1);
|
|
91571
|
-
if ((!this._relatedAxisComponent || this._filterMode !==
|
|
91572
|
-
(this._start !== 0 || this._end !== 1)) {
|
|
91518
|
+
if ((!this._relatedAxisComponent || this._filterMode !== 'axis') && (this._start !== 0 || this._end !== 1)) {
|
|
91573
91519
|
this._newDomain = this._parseDomainFromState(this._startValue, this._endValue);
|
|
91574
91520
|
}
|
|
91575
91521
|
}
|
|
@@ -91607,7 +91553,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91607
91553
|
}
|
|
91608
91554
|
}
|
|
91609
91555
|
_addTransformToSeries() {
|
|
91610
|
-
if (!this._relatedAxisComponent || this._filterMode !==
|
|
91556
|
+
if (!this._relatedAxisComponent || this._filterMode !== 'axis') {
|
|
91611
91557
|
registerDataSetInstanceTransform(this._option.dataSet, 'dataFilterWithNewDomain', dataFilterWithNewDomain);
|
|
91612
91558
|
eachSeries(this._regions, s => {
|
|
91613
91559
|
s.addViewDataFilter({
|
|
@@ -91890,7 +91836,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91890
91836
|
return yScale.scale(min) + this.getLayoutStartPoint().y + offsetTop + offsetHandler;
|
|
91891
91837
|
};
|
|
91892
91838
|
this._valueField = 'y';
|
|
91893
|
-
this._filterMode = (_a = spec.filterMode) !== null && _a !== void 0 ? _a :
|
|
91839
|
+
this._filterMode = (_a = spec.filterMode) !== null && _a !== void 0 ? _a : 'filter';
|
|
91894
91840
|
}
|
|
91895
91841
|
created() {
|
|
91896
91842
|
super.created();
|
|
@@ -92100,7 +92046,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92100
92046
|
this.event.emit(exports.ChartEvent.dataZoomChange, {
|
|
92101
92047
|
model: this,
|
|
92102
92048
|
value: {
|
|
92103
|
-
filterData: this._filterMode !==
|
|
92049
|
+
filterData: this._filterMode !== 'axis',
|
|
92104
92050
|
start,
|
|
92105
92051
|
end,
|
|
92106
92052
|
startValue: this._startValue,
|
|
@@ -92226,7 +92172,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92226
92172
|
this.layoutZIndex = exports.LayoutZIndex.DataZoom;
|
|
92227
92173
|
this.layoutLevel = exports.LayoutLevel.DataZoom;
|
|
92228
92174
|
this.layoutType = 'region-relative';
|
|
92229
|
-
this._filterMode = (_a = spec.filterMode) !== null && _a !== void 0 ? _a :
|
|
92175
|
+
this._filterMode = (_a = spec.filterMode) !== null && _a !== void 0 ? _a : 'axis';
|
|
92230
92176
|
}
|
|
92231
92177
|
setAttrFromSpec() {
|
|
92232
92178
|
super.setAttrFromSpec();
|
|
@@ -92310,7 +92256,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92310
92256
|
this.event.emit(exports.ChartEvent.scrollBarChange, {
|
|
92311
92257
|
model: this,
|
|
92312
92258
|
value: {
|
|
92313
|
-
filterData: this._filterMode !==
|
|
92259
|
+
filterData: this._filterMode !== 'axis',
|
|
92314
92260
|
start: this._start,
|
|
92315
92261
|
end: this._end,
|
|
92316
92262
|
startValue: this._startValue,
|
|
@@ -92357,12 +92303,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92357
92303
|
Factory.registerComponent(ScrollBar.type, ScrollBar);
|
|
92358
92304
|
};
|
|
92359
92305
|
|
|
92360
|
-
var IFilterMode;
|
|
92361
|
-
(function (IFilterMode) {
|
|
92362
|
-
IFilterMode["filter"] = "filter";
|
|
92363
|
-
IFilterMode["axis"] = "axis";
|
|
92364
|
-
})(IFilterMode || (IFilterMode = {}));
|
|
92365
|
-
|
|
92366
92306
|
const indicatorMapper = (data, op) => {
|
|
92367
92307
|
const { datum, title, content } = op;
|
|
92368
92308
|
const mappedData = [];
|
|
@@ -93801,7 +93741,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93801
93741
|
const pause = baseToAttribute((_k = (_j = spec === null || spec === void 0 ? void 0 : spec.controller) === null || _j === void 0 ? void 0 : _j.pause) !== null && _k !== void 0 ? _k : {});
|
|
93802
93742
|
const backward = baseToAttribute((_m = (_l = spec === null || spec === void 0 ? void 0 : spec.controller) === null || _l === void 0 ? void 0 : _l.backward) !== null && _m !== void 0 ? _m : {});
|
|
93803
93743
|
const forward = baseToAttribute((_p = (_o = spec === null || spec === void 0 ? void 0 : spec.controller) === null || _o === void 0 ? void 0 : _o.forward) !== null && _p !== void 0 ? _p : {});
|
|
93804
|
-
|
|
93744
|
+
const attrs = Object.assign(Object.assign({}, spec), { direction: spec.direction, interval: spec.interval, visible: spec.visible, orient: (_q = spec.orient) !== null && _q !== void 0 ? _q : 'bottom', slider: Object.assign(Object.assign({}, spec.slider), { trackStyle: trackStyle, railStyle: railStyle, handlerStyle: handlerStyle }), controller: Object.assign(Object.assign({}, spec.controller), { start: start, pause: pause, backward: backward, forward: forward }) });
|
|
93745
|
+
if (!spec.visible) {
|
|
93746
|
+
attrs.controller.visible = false;
|
|
93747
|
+
attrs.slider.visible = false;
|
|
93748
|
+
}
|
|
93749
|
+
return attrs;
|
|
93805
93750
|
};
|
|
93806
93751
|
const transformContinuousSpecToAttrs = (spec, data) => (Object.assign(Object.assign({}, transformToAttrs(spec)), { data, type: 'continuous' }));
|
|
93807
93752
|
const transformDiscreteSpecToAttrs = (spec, data) => (Object.assign(Object.assign({}, transformToAttrs(spec)), { data, type: 'discrete' }));
|
|
@@ -93880,7 +93825,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93880
93825
|
this._playerComponent.play();
|
|
93881
93826
|
}
|
|
93882
93827
|
});
|
|
93883
|
-
this._playerComponent.addEventListener(PlayerEventEnum.
|
|
93828
|
+
this._playerComponent.addEventListener(PlayerEventEnum.end, () => {
|
|
93884
93829
|
var _a;
|
|
93885
93830
|
this.event.emit(exports.ChartEvent.playerEnd, { model: this });
|
|
93886
93831
|
if (this._alternate && this._spec.type === 'discrete') {
|
|
@@ -93894,7 +93839,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93894
93839
|
this._playerComponent.play();
|
|
93895
93840
|
}
|
|
93896
93841
|
});
|
|
93897
|
-
this._playerComponent.addEventListener(PlayerEventEnum.
|
|
93842
|
+
this._playerComponent.addEventListener(PlayerEventEnum.change, (e) => {
|
|
93898
93843
|
const { index } = e.detail;
|
|
93899
93844
|
const spec = this._specs[index];
|
|
93900
93845
|
array(spec.data).forEach(data => {
|
|
@@ -93910,7 +93855,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93910
93855
|
}
|
|
93911
93856
|
});
|
|
93912
93857
|
});
|
|
93913
|
-
this._playerComponent.addEventListener(PlayerEventEnum.
|
|
93858
|
+
this._playerComponent.addEventListener(PlayerEventEnum.backward, (e) => {
|
|
93914
93859
|
const { index } = e.detail;
|
|
93915
93860
|
const spec = this._specs[index];
|
|
93916
93861
|
this.event.emit(exports.ChartEvent.playerBackward, {
|
|
@@ -93922,7 +93867,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93922
93867
|
}
|
|
93923
93868
|
});
|
|
93924
93869
|
});
|
|
93925
|
-
this._playerComponent.addEventListener(PlayerEventEnum.
|
|
93870
|
+
this._playerComponent.addEventListener(PlayerEventEnum.forward, (e) => {
|
|
93926
93871
|
const { index } = e.detail;
|
|
93927
93872
|
const spec = this._specs[index];
|
|
93928
93873
|
this.event.emit(exports.ChartEvent.playerForward, {
|
|
@@ -93934,7 +93879,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93934
93879
|
}
|
|
93935
93880
|
});
|
|
93936
93881
|
});
|
|
93937
|
-
this._playerComponent.addEventListener(PlayerEventEnum.
|
|
93882
|
+
this._playerComponent.addEventListener(PlayerEventEnum.play, (e) => {
|
|
93938
93883
|
const { index } = e.detail;
|
|
93939
93884
|
const spec = this._specs[index];
|
|
93940
93885
|
this.event.emit(exports.ChartEvent.playerPlay, {
|
|
@@ -93946,7 +93891,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93946
93891
|
}
|
|
93947
93892
|
});
|
|
93948
93893
|
});
|
|
93949
|
-
this._playerComponent.addEventListener(PlayerEventEnum.
|
|
93894
|
+
this._playerComponent.addEventListener(PlayerEventEnum.pause, (e) => {
|
|
93950
93895
|
const { index } = e.detail;
|
|
93951
93896
|
const spec = this._specs[index];
|
|
93952
93897
|
this.event.emit(exports.ChartEvent.playerPause, {
|
|
@@ -93968,7 +93913,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93968
93913
|
}
|
|
93969
93914
|
static getSpecInfo(chartSpec) {
|
|
93970
93915
|
const playerSpec = chartSpec[this.specKey];
|
|
93971
|
-
if (isNil$3(playerSpec)
|
|
93916
|
+
if (isNil$3(playerSpec)) {
|
|
93972
93917
|
return null;
|
|
93973
93918
|
}
|
|
93974
93919
|
return [
|
|
@@ -93981,7 +93926,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93981
93926
|
];
|
|
93982
93927
|
}
|
|
93983
93928
|
setAttrFromSpec() {
|
|
93984
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
93929
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
93985
93930
|
super.setAttrFromSpec();
|
|
93986
93931
|
this._orient = (_a = this._spec.orient) !== null && _a !== void 0 ? _a : 'bottom';
|
|
93987
93932
|
this._specs = (_b = this._spec.specs) !== null && _b !== void 0 ? _b : [];
|
|
@@ -93990,6 +93935,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93990
93935
|
this._dx = (_e = this._spec.dx) !== null && _e !== void 0 ? _e : 0;
|
|
93991
93936
|
this._dy = (_f = this._spec.dy) !== null && _f !== void 0 ? _f : 0;
|
|
93992
93937
|
this._position = (_g = this._spec.position) !== null && _g !== void 0 ? _g : 'middle';
|
|
93938
|
+
this._visible = (_h = this._spec.visible) !== null && _h !== void 0 ? _h : true;
|
|
93993
93939
|
}
|
|
93994
93940
|
afterSetLayoutStartPoint(pos) {
|
|
93995
93941
|
super.afterSetLayoutStartPoint(pos);
|
|
@@ -94019,6 +93965,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
94019
93965
|
return [this._playerComponent];
|
|
94020
93966
|
}
|
|
94021
93967
|
_computeLayoutRect(rect, width, height) {
|
|
93968
|
+
if (this._visible === false) {
|
|
93969
|
+
return { x1: 0, x2: 0, y1: 0, y2: 0 };
|
|
93970
|
+
}
|
|
94022
93971
|
switch (this._orient) {
|
|
94023
93972
|
case 'top': {
|
|
94024
93973
|
return { x1: 0, y1: 0, x2: width, y2: height };
|