@visactor/vchart 1.10.4 → 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 +311 -345
- 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/chart/stack.js +2 -1
- package/cjs/compile/grammar-item.js +1 -2
- 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/chart/stack.js +2 -1
- package/esm/compile/grammar-item.js +1 -2
- 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 +14 -14
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;
|
|
@@ -8652,6 +8658,7 @@
|
|
|
8652
8658
|
const DefaultStyle = Object.assign(Object.assign(Object.assign(Object.assign({
|
|
8653
8659
|
opacity: 1,
|
|
8654
8660
|
background: null,
|
|
8661
|
+
backgroundOpacity: 1,
|
|
8655
8662
|
backgroundCornerRadius: 0,
|
|
8656
8663
|
texture: null,
|
|
8657
8664
|
textureColor: "black",
|
|
@@ -8793,6 +8800,7 @@
|
|
|
8793
8800
|
textBaseline: "top",
|
|
8794
8801
|
layoutDirection: "horizontal",
|
|
8795
8802
|
textConfig: [],
|
|
8803
|
+
forceBreakLine: !1,
|
|
8796
8804
|
maxHeight: void 0,
|
|
8797
8805
|
maxWidth: void 0,
|
|
8798
8806
|
singleLine: !1
|
|
@@ -9184,13 +9192,14 @@
|
|
|
9184
9192
|
});
|
|
9185
9193
|
}
|
|
9186
9194
|
clipTextWithSuffix(text, options, width, suffix, wordBreak, position) {
|
|
9195
|
+
let forceSuffix = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !1;
|
|
9187
9196
|
if ("" === suffix) return this.clipText(text, options, width, wordBreak);
|
|
9188
9197
|
if (0 === text.length) return {
|
|
9189
9198
|
str: "",
|
|
9190
9199
|
width: 0
|
|
9191
9200
|
};
|
|
9192
9201
|
const length = this.measureTextWidth(text, options);
|
|
9193
|
-
if (length <= width) return {
|
|
9202
|
+
if (!forceSuffix && length <= width) return {
|
|
9194
9203
|
str: text,
|
|
9195
9204
|
width: length
|
|
9196
9205
|
};
|
|
@@ -9199,12 +9208,16 @@
|
|
|
9199
9208
|
str: "",
|
|
9200
9209
|
width: 0
|
|
9201
9210
|
};
|
|
9211
|
+
if (forceSuffix && length + suffixWidth <= width) return {
|
|
9212
|
+
str: text + suffix,
|
|
9213
|
+
width: length + suffixWidth
|
|
9214
|
+
};
|
|
9202
9215
|
width -= suffixWidth;
|
|
9203
9216
|
const data = this._clipText(text, options, width, 0, text.length - 1, position, suffix);
|
|
9204
9217
|
if (wordBreak && data.str !== text) {
|
|
9205
9218
|
const index = testLetter(text, data.str.length);
|
|
9206
|
-
index !== data.str.length && (data.
|
|
9207
|
-
}
|
|
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);
|
|
9208
9221
|
return data.str = data.result, data.width += suffixWidth, data;
|
|
9209
9222
|
}
|
|
9210
9223
|
};
|
|
@@ -10605,7 +10618,12 @@
|
|
|
10605
10618
|
for (; overTargetAncestor && overTargetAncestor !== this.rootTarget.parent && overTargetAncestor !== e.target;) overTargetAncestor = overTargetAncestor.parent;
|
|
10606
10619
|
if (!overTargetAncestor || overTargetAncestor === this.rootTarget.parent) {
|
|
10607
10620
|
const enterEvent = this.clonePointerEvent(e, "pointerenter");
|
|
10608
|
-
|
|
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;
|
|
10609
10627
|
this.freeEvent(enterEvent);
|
|
10610
10628
|
}
|
|
10611
10629
|
this.freeEvent(overEvent);
|
|
@@ -10807,8 +10825,6 @@
|
|
|
10807
10825
|
}
|
|
10808
10826
|
|
|
10809
10827
|
const EventTarget = {
|
|
10810
|
-
pickable: !0,
|
|
10811
|
-
visible: !0,
|
|
10812
10828
|
dispatchEvent(e) {
|
|
10813
10829
|
var _a;
|
|
10814
10830
|
if (!(e instanceof FederatedEvent)) throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");
|
|
@@ -13328,7 +13344,7 @@
|
|
|
13328
13344
|
}
|
|
13329
13345
|
tryUpdateGlobalAABBBounds() {
|
|
13330
13346
|
const b = this.AABBBounds;
|
|
13331
|
-
return this._globalAABBBounds ? this._globalAABBBounds.setValue(b.x1, b.y1, b.x2, b.y2) : this._globalAABBBounds = b.clone(), this.parent && this._globalAABBBounds.transformWithMatrix(this.parent.globalTransMatrix), this._globalAABBBounds;
|
|
13347
|
+
return this._globalAABBBounds ? this._globalAABBBounds.setValue(b.x1, b.y1, b.x2, b.y2) : this._globalAABBBounds = b.clone(), this._globalAABBBounds.empty() || this.parent && this._globalAABBBounds.transformWithMatrix(this.parent.globalTransMatrix), this._globalAABBBounds;
|
|
13332
13348
|
}
|
|
13333
13349
|
tryUpdateGlobalTransMatrix() {
|
|
13334
13350
|
if (this._globalTransMatrix) {
|
|
@@ -13548,19 +13564,17 @@
|
|
|
13548
13564
|
var _a, _b, _c, _d;
|
|
13549
13565
|
if (hasAnimation) {
|
|
13550
13566
|
const keys = Object.keys(attrs),
|
|
13551
|
-
|
|
13567
|
+
noWorkAttrs = this.getNoWorkAnimateAttr(),
|
|
13552
13568
|
animateAttrs = {};
|
|
13553
13569
|
let noAnimateAttrs;
|
|
13554
|
-
|
|
13555
|
-
|
|
13556
|
-
}) : keys.forEach(key => {
|
|
13557
|
-
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];
|
|
13558
13572
|
});
|
|
13559
13573
|
const animate = this.animate();
|
|
13560
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, {
|
|
13561
13575
|
type: AttributeUpdateType.STATE
|
|
13562
13576
|
});
|
|
13563
|
-
} else this.setAttributes(attrs, !1, {
|
|
13577
|
+
} else this.stopStateAnimates(), this.setAttributes(attrs, !1, {
|
|
13564
13578
|
type: AttributeUpdateType.STATE
|
|
13565
13579
|
});
|
|
13566
13580
|
}
|
|
@@ -13574,6 +13588,12 @@
|
|
|
13574
13588
|
newNormalAttrs[key] = this.getNormalAttribute(key);
|
|
13575
13589
|
}), this.normalAttrs = newNormalAttrs;
|
|
13576
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
|
+
}
|
|
13577
13597
|
getNormalAttribute(key) {
|
|
13578
13598
|
let value = this.attribute[key];
|
|
13579
13599
|
return this.animates && this.animates.forEach(animate => {
|
|
@@ -15127,7 +15147,7 @@
|
|
|
15127
15147
|
const str = lines[i];
|
|
15128
15148
|
let needCut = !0;
|
|
15129
15149
|
if (i === lineCountLimit - 1) {
|
|
15130
|
-
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);
|
|
15131
15151
|
linesLayout.push({
|
|
15132
15152
|
str: clip.str,
|
|
15133
15153
|
width: clip.width
|
|
@@ -15497,138 +15517,6 @@
|
|
|
15497
15517
|
return new Text$1(attributes);
|
|
15498
15518
|
}
|
|
15499
15519
|
|
|
15500
|
-
const WRAP_TEXT_UPDATE_TAG_KEY = ["heightLimit", "lineClamp"];
|
|
15501
|
-
class WrapText extends Text$1 {
|
|
15502
|
-
constructor(params) {
|
|
15503
|
-
super(Object.assign(Object.assign({}, params), {
|
|
15504
|
-
wrap: !0
|
|
15505
|
-
}));
|
|
15506
|
-
}
|
|
15507
|
-
_isValid() {
|
|
15508
|
-
const {
|
|
15509
|
-
text: text
|
|
15510
|
-
} = this.attribute;
|
|
15511
|
-
return isArray$3(text) ? !text.every(t => null == t || "" === t) : null != text && "" !== text;
|
|
15512
|
-
}
|
|
15513
|
-
updateMultilineAABBBounds(text) {
|
|
15514
|
-
var _a, _b, _c, _d;
|
|
15515
|
-
const textTheme = getTheme$1(this).text,
|
|
15516
|
-
{
|
|
15517
|
-
fontFamily = textTheme.fontFamily,
|
|
15518
|
-
textAlign = textTheme.textAlign,
|
|
15519
|
-
textBaseline = textTheme.textBaseline,
|
|
15520
|
-
fontSize = textTheme.fontSize,
|
|
15521
|
-
ellipsis = textTheme.ellipsis,
|
|
15522
|
-
maxLineWidth: maxLineWidth,
|
|
15523
|
-
stroke = textTheme.stroke,
|
|
15524
|
-
lineWidth = textTheme.lineWidth,
|
|
15525
|
-
wordBreak = textTheme.wordBreak,
|
|
15526
|
-
fontWeight = textTheme.fontWeight,
|
|
15527
|
-
ignoreBuf = textTheme.ignoreBuf,
|
|
15528
|
-
heightLimit = 0,
|
|
15529
|
-
suffixPosition = textTheme.suffixPosition,
|
|
15530
|
-
lineClamp: lineClamp
|
|
15531
|
-
} = this.attribute,
|
|
15532
|
-
lineHeight = null !== (_a = calculateLineHeight(this.attribute.lineHeight, this.attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : this.attribute.fontSize || textTheme.fontSize,
|
|
15533
|
-
buf = ignoreBuf ? 0 : 2;
|
|
15534
|
-
if (!this.shouldUpdateShape() && (null === (_b = this.cache) || void 0 === _b ? void 0 : _b.layoutData)) {
|
|
15535
|
-
const bbox = this.cache.layoutData.bbox;
|
|
15536
|
-
return this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
|
|
15537
|
-
}
|
|
15538
|
-
const textMeasure = application.graphicUtil.textMeasure,
|
|
15539
|
-
layoutObj = new CanvasTextLayout(fontFamily, {
|
|
15540
|
-
fontSize: fontSize,
|
|
15541
|
-
fontWeight: fontWeight,
|
|
15542
|
-
fontFamily: fontFamily
|
|
15543
|
-
}, textMeasure),
|
|
15544
|
-
lines = text.map(l => l.toString()),
|
|
15545
|
-
linesLayout = [],
|
|
15546
|
-
bboxWH = [0, 0];
|
|
15547
|
-
let lineCountLimit = 1 / 0;
|
|
15548
|
-
if (heightLimit > 0 && (lineCountLimit = Math.max(Math.floor(heightLimit / lineHeight), 1)), lineClamp && (lineCountLimit = Math.min(lineCountLimit, lineClamp)), "number" == typeof maxLineWidth && maxLineWidth !== 1 / 0) {
|
|
15549
|
-
if (maxLineWidth > 0) for (let i = 0; i < lines.length; i++) {
|
|
15550
|
-
const str = lines[i];
|
|
15551
|
-
let needCut = !0;
|
|
15552
|
-
if (i === lineCountLimit - 1) {
|
|
15553
|
-
const clip = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
|
|
15554
|
-
linesLayout.push({
|
|
15555
|
-
str: clip.str,
|
|
15556
|
-
width: clip.width
|
|
15557
|
-
});
|
|
15558
|
-
break;
|
|
15559
|
-
}
|
|
15560
|
-
const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, "break-word" === wordBreak);
|
|
15561
|
-
if ("" !== str && "" === clip.str) {
|
|
15562
|
-
if (ellipsis) {
|
|
15563
|
-
const clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
|
|
15564
|
-
clip.str = null !== (_c = clipEllipsis.str) && void 0 !== _c ? _c : "", clip.width = null !== (_d = clipEllipsis.width) && void 0 !== _d ? _d : 0;
|
|
15565
|
-
} else clip.str = "", clip.width = 0;
|
|
15566
|
-
needCut = !1;
|
|
15567
|
-
}
|
|
15568
|
-
if (linesLayout.push({
|
|
15569
|
-
str: clip.str,
|
|
15570
|
-
width: clip.width
|
|
15571
|
-
}), clip.str.length === str.length) ;else if (needCut) {
|
|
15572
|
-
const newStr = str.substring(clip.str.length);
|
|
15573
|
-
lines.splice(i + 1, 0, newStr);
|
|
15574
|
-
}
|
|
15575
|
-
}
|
|
15576
|
-
let maxWidth = 0;
|
|
15577
|
-
linesLayout.forEach(layout => {
|
|
15578
|
-
maxWidth = Math.max(maxWidth, layout.width);
|
|
15579
|
-
}), bboxWH[0] = maxWidth;
|
|
15580
|
-
} else {
|
|
15581
|
-
let width,
|
|
15582
|
-
text,
|
|
15583
|
-
lineWidth = 0;
|
|
15584
|
-
for (let i = 0, len = lines.length; i < len; i++) {
|
|
15585
|
-
if (i === lineCountLimit - 1) {
|
|
15586
|
-
const clip = layoutObj.textMeasure.clipTextWithSuffix(lines[i], layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
|
|
15587
|
-
linesLayout.push({
|
|
15588
|
-
str: clip.str,
|
|
15589
|
-
width: clip.width
|
|
15590
|
-
}), lineWidth = Math.max(lineWidth, clip.width);
|
|
15591
|
-
break;
|
|
15592
|
-
}
|
|
15593
|
-
text = lines[i], width = layoutObj.textMeasure.measureTextWidth(text, layoutObj.textOptions, "break-word" === wordBreak), lineWidth = Math.max(lineWidth, width), linesLayout.push({
|
|
15594
|
-
str: text,
|
|
15595
|
-
width: width
|
|
15596
|
-
});
|
|
15597
|
-
}
|
|
15598
|
-
bboxWH[0] = lineWidth;
|
|
15599
|
-
}
|
|
15600
|
-
bboxWH[1] = linesLayout.length * (lineHeight + buf);
|
|
15601
|
-
const bbox = {
|
|
15602
|
-
xOffset: 0,
|
|
15603
|
-
yOffset: 0,
|
|
15604
|
-
width: bboxWH[0],
|
|
15605
|
-
height: bboxWH[1]
|
|
15606
|
-
};
|
|
15607
|
-
layoutObj.LayoutBBox(bbox, textAlign, textBaseline);
|
|
15608
|
-
const layoutData = layoutObj.layoutWithBBox(bbox, linesLayout, textAlign, textBaseline, lineHeight);
|
|
15609
|
-
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;
|
|
15610
|
-
}
|
|
15611
|
-
needUpdateTags(keys) {
|
|
15612
|
-
for (let i = 0; i < WRAP_TEXT_UPDATE_TAG_KEY.length; i++) {
|
|
15613
|
-
const attrKey = WRAP_TEXT_UPDATE_TAG_KEY[i];
|
|
15614
|
-
if (-1 !== keys.indexOf(attrKey)) return !0;
|
|
15615
|
-
}
|
|
15616
|
-
return super.needUpdateTags(keys);
|
|
15617
|
-
}
|
|
15618
|
-
needUpdateTag(key) {
|
|
15619
|
-
for (let i = 0; i < WRAP_TEXT_UPDATE_TAG_KEY.length; i++) {
|
|
15620
|
-
if (key === WRAP_TEXT_UPDATE_TAG_KEY[i]) return !0;
|
|
15621
|
-
}
|
|
15622
|
-
return super.needUpdateTag(key);
|
|
15623
|
-
}
|
|
15624
|
-
getNoWorkAnimateAttr() {
|
|
15625
|
-
return WrapText.NOWORK_ANIMATE_ATTR;
|
|
15626
|
-
}
|
|
15627
|
-
}
|
|
15628
|
-
function createWrapText(attributes) {
|
|
15629
|
-
return new WrapText(attributes);
|
|
15630
|
-
}
|
|
15631
|
-
|
|
15632
15520
|
class BaseSymbol {
|
|
15633
15521
|
bounds(size, bounds) {
|
|
15634
15522
|
if (isNumber$3(size)) {
|
|
@@ -16555,11 +16443,11 @@
|
|
|
16555
16443
|
} = this.lines[i];
|
|
16556
16444
|
if (top + height < this[this.directionKey.top] || top + height > this[this.directionKey.top] + frameHeight) return lastLineTag;
|
|
16557
16445
|
let lastLine = !1;
|
|
16558
|
-
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);
|
|
16559
16447
|
} else {
|
|
16560
16448
|
const detalHeight = Math.floor((frameHeight - this.actualHeight) / 2);
|
|
16561
16449
|
"vertical" === this.layoutDirection ? deltaX += detalHeight : deltaY += detalHeight;
|
|
16562
|
-
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);
|
|
16563
16451
|
}
|
|
16564
16452
|
} else if ("bottom" === this.verticalDirection && "vertical" !== this.layoutDirection) for (let i = 0; i < this.lines.length; i++) {
|
|
16565
16453
|
const {
|
|
@@ -16567,11 +16455,11 @@
|
|
|
16567
16455
|
height: height
|
|
16568
16456
|
} = this.lines[i],
|
|
16569
16457
|
y = frameHeight - this.lines[i].top - this.lines[i].height;
|
|
16570
|
-
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 {
|
|
16571
16459
|
if (y + height > this[this.directionKey.top] + frameHeight || y < this[this.directionKey.top]) return lastLineTag;
|
|
16572
16460
|
{
|
|
16573
16461
|
let lastLine = !1;
|
|
16574
|
-
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);
|
|
16575
16463
|
}
|
|
16576
16464
|
}
|
|
16577
16465
|
} else {
|
|
@@ -16582,11 +16470,11 @@
|
|
|
16582
16470
|
top: top,
|
|
16583
16471
|
height: height
|
|
16584
16472
|
} = this.lines[i];
|
|
16585
|
-
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 {
|
|
16586
16474
|
if (top + height < this[this.directionKey.top] || top + height > this[this.directionKey.top] + frameHeight) return lastLineTag;
|
|
16587
16475
|
{
|
|
16588
16476
|
let lastLine = !1;
|
|
16589
|
-
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);
|
|
16590
16478
|
}
|
|
16591
16479
|
}
|
|
16592
16480
|
}
|
|
@@ -16889,11 +16777,12 @@
|
|
|
16889
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);
|
|
16890
16778
|
});
|
|
16891
16779
|
}
|
|
16892
|
-
draw(ctx, lastLine, x, y, drawIcon) {
|
|
16893
|
-
if (lastLine) {
|
|
16780
|
+
draw(ctx, lastLine, x, y, drawEllipsis, drawIcon) {
|
|
16781
|
+
if (drawEllipsis && (lastLine || this.paragraphs.some(p => p.overflow))) {
|
|
16894
16782
|
let otherParagraphWidth = 0;
|
|
16895
16783
|
for (let i = this.paragraphs.length - 1; i >= 0; i--) {
|
|
16896
16784
|
const paragraph = this.paragraphs[i];
|
|
16785
|
+
if (paragraph.overflow) continue;
|
|
16897
16786
|
if (paragraph instanceof RichTextIcon) break;
|
|
16898
16787
|
if ("vertical" === this.direction && "vertical" !== paragraph.direction) {
|
|
16899
16788
|
paragraph.verticalEllipsis = !0;
|
|
@@ -17114,7 +17003,8 @@
|
|
|
17114
17003
|
textAlign: textAlign,
|
|
17115
17004
|
textBaseline: textBaseline,
|
|
17116
17005
|
layoutDirection: layoutDirection,
|
|
17117
|
-
singleLine: singleLine
|
|
17006
|
+
singleLine: singleLine,
|
|
17007
|
+
forceBreakLine: forceBreakLine
|
|
17118
17008
|
} = this.attribute,
|
|
17119
17009
|
paragraphs = [];
|
|
17120
17010
|
for (let i = 0; i < textConfig.length; i++) if ("image" in textConfig[i]) {
|
|
@@ -17140,7 +17030,14 @@
|
|
|
17140
17030
|
richTextHeightEnable = "number" == typeof height && Number.isFinite(height) && height > 0 && (!maxHeightFinite || height <= maxHeight),
|
|
17141
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),
|
|
17142
17032
|
wrapper = new Wrapper(frame);
|
|
17143
|
-
|
|
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]);
|
|
17144
17041
|
wrapper.send();
|
|
17145
17042
|
if (!("horizontal" === frame.layoutDirection ? richTextWidthEnable : richTextHeightEnable)) {
|
|
17146
17043
|
const frameSize = frame.getActualSizeWidthEllipsis();
|
|
@@ -18053,6 +17950,8 @@
|
|
|
18053
17950
|
}), this.transformAABBBounds(attribute, aabbBounds, rectTheme, !1, graphic), aabbBounds;
|
|
18054
17951
|
}
|
|
18055
17952
|
updateGroupAABBBounds(attribute, groupTheme, aabbBounds, graphic) {
|
|
17953
|
+
const originalAABBBounds = aabbBounds;
|
|
17954
|
+
aabbBounds = aabbBounds.clone();
|
|
18056
17955
|
const {
|
|
18057
17956
|
width: width,
|
|
18058
17957
|
height: height,
|
|
@@ -18061,12 +17960,12 @@
|
|
|
18061
17960
|
} = attribute;
|
|
18062
17961
|
path && path.length ? path.forEach(g => {
|
|
18063
17962
|
aabbBounds.union(g.AABBBounds);
|
|
18064
|
-
}) : 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 => {
|
|
18065
17964
|
aabbBounds.union(node.AABBBounds);
|
|
18066
17965
|
});
|
|
18067
17966
|
const tb1 = this.tempAABBBounds1,
|
|
18068
17967
|
tb2 = this.tempAABBBounds2;
|
|
18069
|
-
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;
|
|
18070
17969
|
}
|
|
18071
17970
|
updateGlyphAABBBounds(attribute, theme, aabbBounds, graphic) {
|
|
18072
17971
|
return this._validCheck(attribute, theme, aabbBounds, graphic) ? (graphic.getSubGraphic().forEach(node => {
|
|
@@ -18918,8 +18817,11 @@
|
|
|
18918
18817
|
this.time = BaseRenderContributionTime.beforeFillStroke, this.useStyle = !0, this.order = 0;
|
|
18919
18818
|
}
|
|
18920
18819
|
drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
|
|
18820
|
+
var _a;
|
|
18921
18821
|
const {
|
|
18922
18822
|
background: background,
|
|
18823
|
+
backgroundOpacity = null !== (_a = graphic.attribute.fillOpacity) && void 0 !== _a ? _a : graphicAttribute.backgroundOpacity,
|
|
18824
|
+
opacity = graphicAttribute.opacity,
|
|
18923
18825
|
backgroundMode = graphicAttribute.backgroundMode,
|
|
18924
18826
|
backgroundFit = graphicAttribute.backgroundFit
|
|
18925
18827
|
} = graphic.attribute;
|
|
@@ -18936,8 +18838,8 @@
|
|
|
18936
18838
|
}
|
|
18937
18839
|
context.clip();
|
|
18938
18840
|
const b = graphic.AABBBounds;
|
|
18939
|
-
context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), this.doDrawImage(context, res.data, b, backgroundMode, backgroundFit), context.restore(), graphic.transMatrix.onlyTranslate() || context.setTransformForCurrent();
|
|
18940
|
-
} else context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.fillStyle = background, context.fill(), context.highPerformanceRestore();
|
|
18841
|
+
context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.globalAlpha = backgroundOpacity * opacity, this.doDrawImage(context, res.data, b, backgroundMode, backgroundFit), context.restore(), graphic.transMatrix.onlyTranslate() || context.setTransformForCurrent();
|
|
18842
|
+
} else context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.globalAlpha = backgroundOpacity * opacity, context.fillStyle = background, context.fill(), context.highPerformanceRestore();
|
|
18941
18843
|
}
|
|
18942
18844
|
doDrawImage(context, data, b, backgroundMode, backgroundFit) {
|
|
18943
18845
|
if ("no-repeat" === backgroundMode) context.drawImage(data, b.x1, b.y1, b.width(), b.height());else {
|
|
@@ -20660,11 +20562,16 @@
|
|
|
20660
20562
|
backgroundMode = graphicAttribute.backgroundMode,
|
|
20661
20563
|
backgroundFit = graphicAttribute.backgroundFit
|
|
20662
20564
|
} = graphic.attribute;
|
|
20663
|
-
let
|
|
20565
|
+
let matrix,
|
|
20664
20566
|
{
|
|
20665
20567
|
background: background
|
|
20666
20568
|
} = graphic.attribute;
|
|
20667
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());
|
|
20668
20575
|
const shouldReCalBounds = isObject$2(background) && background.background,
|
|
20669
20576
|
onlyTranslate = graphic.transMatrix.onlyTranslate();
|
|
20670
20577
|
if (shouldReCalBounds) {
|
|
@@ -20689,7 +20596,7 @@
|
|
|
20689
20596
|
})).clone());
|
|
20690
20597
|
if (graphic.backgroundImg && graphic.resources) {
|
|
20691
20598
|
const res = graphic.resources.get(background);
|
|
20692
|
-
if ("success" !== res.state || !res.data) return;
|
|
20599
|
+
if ("success" !== res.state || !res.data) return void restore();
|
|
20693
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();
|
|
20694
20601
|
} else {
|
|
20695
20602
|
const {
|
|
@@ -20697,7 +20604,7 @@
|
|
|
20697
20604
|
} = graphic.attribute;
|
|
20698
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();
|
|
20699
20606
|
}
|
|
20700
|
-
shouldReCalBounds && boundsAllocate.free(b);
|
|
20607
|
+
shouldReCalBounds && boundsAllocate.free(b), restore();
|
|
20701
20608
|
}
|
|
20702
20609
|
}
|
|
20703
20610
|
const defaultTextBackgroundRenderContribution = new DefaultTextBackgroundRenderContribution();
|
|
@@ -21335,7 +21242,7 @@
|
|
|
21335
21242
|
render(groups, params) {
|
|
21336
21243
|
this.renderTreeRoots = groups, this.drawParams = params;
|
|
21337
21244
|
const updateBounds = params.updateBounds;
|
|
21338
|
-
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;
|
|
21339
21246
|
}
|
|
21340
21247
|
};
|
|
21341
21248
|
DefaultRenderService = __decorate$1c([injectable(), __param$z(0, inject(DrawContribution)), __metadata$U("design:paramtypes", [Object])], DefaultRenderService);
|
|
@@ -21895,7 +21802,7 @@
|
|
|
21895
21802
|
return (null !== (_a = a.attribute.zIndex) && void 0 !== _a ? _a : DefaultAttribute.zIndex) - (null !== (_b = b.attribute.zIndex) && void 0 !== _b ? _b : DefaultAttribute.zIndex);
|
|
21896
21803
|
}).forEach(group => {
|
|
21897
21804
|
group.isContainer ? this.renderGroup(group, drawContext, matrixAllocate.allocate(1, 0, 0, 1, 0, 0)) : this.renderItem(group, drawContext);
|
|
21898
|
-
}), context.restore(), context.
|
|
21805
|
+
}), context.restore(), context.setClearMatrix(1, 0, 0, 1, 0, 0), context.inuse = !1, context.draw();
|
|
21899
21806
|
}
|
|
21900
21807
|
doRegister() {
|
|
21901
21808
|
throw new Error("暂不支持");
|
|
@@ -22657,7 +22564,7 @@
|
|
|
22657
22564
|
}), !isFinite(boundsLegal)) return;
|
|
22658
22565
|
width = childrenWidth, height = childrenHeight;
|
|
22659
22566
|
}
|
|
22660
|
-
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);
|
|
22661
22568
|
const result = {
|
|
22662
22569
|
main: {
|
|
22663
22570
|
len: width,
|
|
@@ -22700,7 +22607,7 @@
|
|
|
22700
22607
|
}), tempMainL = 0, tempCrossL = 0) : (mainList.push({
|
|
22701
22608
|
idx: i - 1,
|
|
22702
22609
|
mainLen: tempMainL,
|
|
22703
|
-
crossLen:
|
|
22610
|
+
crossLen: tempCrossL
|
|
22704
22611
|
}), tempMainL = mainLen, tempCrossL = crossLen) : (tempMainL += mainLen, tempCrossL = Math.max(tempCrossL, crossLen));
|
|
22705
22612
|
}), mainList.push({
|
|
22706
22613
|
idx: mianLenArray.length - 1,
|
|
@@ -23496,7 +23403,7 @@
|
|
|
23496
23403
|
release() {
|
|
23497
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 => {
|
|
23498
23405
|
layer.release();
|
|
23499
|
-
}), 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 = [];
|
|
23500
23407
|
}
|
|
23501
23408
|
setStage(stage) {}
|
|
23502
23409
|
dirty(b, matrix) {
|
|
@@ -24765,10 +24672,6 @@
|
|
|
24765
24672
|
graphicCreator.RegisterGraphicCreator("shadowRoot", createShadowRoot);
|
|
24766
24673
|
}
|
|
24767
24674
|
|
|
24768
|
-
function registerWrapTextGraphic() {
|
|
24769
|
-
graphicCreator.RegisterGraphicCreator("wrapText", createWrapText);
|
|
24770
|
-
}
|
|
24771
|
-
|
|
24772
24675
|
const warn = (msg, detail) => {
|
|
24773
24676
|
if (isFunction$1(config.warnHandler)) {
|
|
24774
24677
|
config.warnHandler.call(null, msg, detail);
|
|
@@ -26057,9 +25960,9 @@
|
|
|
26057
25960
|
dragstartTriggered = !1;
|
|
26058
25961
|
function handlePointerMove(moveEvent) {
|
|
26059
25962
|
if (dragstartTriggered || (moveEvent.type = "dragstart", null == target || target.dispatchEvent(moveEvent), dragstartTriggered = !0), moveEvent.type = "drag", null == target || target.dispatchEvent(moveEvent), !isRoot) {
|
|
26060
|
-
target.pickable = !1;
|
|
25963
|
+
target.attribute.pickable = !1;
|
|
26061
25964
|
const elemBelow = (null == rootNode ? void 0 : rootNode.pick(moveEvent.global.x, moveEvent.global.y)).graphic;
|
|
26062
|
-
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)));
|
|
26063
25966
|
}
|
|
26064
25967
|
}
|
|
26065
25968
|
null == rootNode || rootNode.addEventListener("pointermove", handlePointerMove);
|
|
@@ -30596,12 +30499,6 @@
|
|
|
30596
30499
|
_registerText.__loaded = !1;
|
|
30597
30500
|
const registerText = _registerText;
|
|
30598
30501
|
|
|
30599
|
-
function _registerWrapText() {
|
|
30600
|
-
_registerWrapText.__loaded || (_registerWrapText.__loaded = !0, registerWrapTextGraphic());
|
|
30601
|
-
}
|
|
30602
|
-
_registerWrapText.__loaded = !1;
|
|
30603
|
-
const registerWrapText = _registerWrapText;
|
|
30604
|
-
|
|
30605
30502
|
function loadScrollbarComponent() {
|
|
30606
30503
|
registerGroup(), registerRect();
|
|
30607
30504
|
}
|
|
@@ -30979,22 +30876,21 @@
|
|
|
30979
30876
|
specialCharSet: "-/: .,@%'\"~" + TextMeasure.ALPHABET_CHAR_SET + TextMeasure.ALPHABET_CHAR_SET.toUpperCase()
|
|
30980
30877
|
}, null != option ? option : {}), textSpec);
|
|
30981
30878
|
function measureTextSize(text, textSpec) {
|
|
30982
|
-
let
|
|
30983
|
-
var _a, _b;
|
|
30879
|
+
let defaultTextTheme = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
30984
30880
|
if (!text) return {
|
|
30985
30881
|
width: 0,
|
|
30986
30882
|
height: 0
|
|
30987
30883
|
};
|
|
30988
30884
|
const bounds = getTextBounds({
|
|
30989
30885
|
text: text,
|
|
30990
|
-
fontFamily:
|
|
30991
|
-
fontSize: textSpec.fontSize || 12,
|
|
30992
|
-
fontWeight: textSpec.fontWeight,
|
|
30993
|
-
textAlign:
|
|
30886
|
+
fontFamily: textSpec.fontFamily || defaultTextTheme.fontFamily || DEFAULT_TEXT_FONT_FAMILY,
|
|
30887
|
+
fontSize: textSpec.fontSize || defaultTextTheme.fontSize || 12,
|
|
30888
|
+
fontWeight: textSpec.fontWeight || defaultTextTheme.fontWeight,
|
|
30889
|
+
textAlign: textSpec.textAlign || "center",
|
|
30994
30890
|
textBaseline: textSpec.textBaseline,
|
|
30995
30891
|
ellipsis: !!textSpec.ellipsis,
|
|
30996
30892
|
maxLineWidth: textSpec.maxLineWidth || 1 / 0,
|
|
30997
|
-
lineHeight: textSpec.fontSize || 12
|
|
30893
|
+
lineHeight: textSpec.fontSize || defaultTextTheme.fontSize || 12
|
|
30998
30894
|
});
|
|
30999
30895
|
return {
|
|
31000
30896
|
width: bounds.width(),
|
|
@@ -31029,7 +30925,7 @@
|
|
|
31029
30925
|
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, Tag.defaultAttributes, attributes)), this.name = "tag";
|
|
31030
30926
|
}
|
|
31031
30927
|
render() {
|
|
31032
|
-
var _a, _b;
|
|
30928
|
+
var _a, _b, _c;
|
|
31033
30929
|
const {
|
|
31034
30930
|
text = "",
|
|
31035
30931
|
textStyle = {},
|
|
@@ -31110,11 +31006,11 @@
|
|
|
31110
31006
|
y: 0
|
|
31111
31007
|
});
|
|
31112
31008
|
isNil$3(textAttrs.lineHeight) && (textAttrs.lineHeight = textStyle.fontSize), textShape = group.createOrUpdateChild("tag-text", textAttrs, "text"), isEmpty(null == state ? void 0 : state.text) || (textShape.states = state.text);
|
|
31113
|
-
const textBounds = measureTextSize(textAttrs.text, textStyle, null === (_a = this.stage) || void 0 === _a ? void 0 : _a.getTheme().text
|
|
31009
|
+
const textBounds = measureTextSize(textAttrs.text, textStyle, null === (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.getTheme()) || void 0 === _b ? void 0 : _b.text),
|
|
31114
31010
|
textWidth = textBounds.width,
|
|
31115
31011
|
textHeight = textBounds.height;
|
|
31116
31012
|
tagWidth += textWidth;
|
|
31117
|
-
const size = null !== (
|
|
31013
|
+
const size = null !== (_c = shape.size) && void 0 !== _c ? _c : 10,
|
|
31118
31014
|
maxSize = isNumber$3(size) ? size : Math.max(size[0], size[1]);
|
|
31119
31015
|
tagHeight += Math.max(textHeight, shape.visible ? maxSize : 0);
|
|
31120
31016
|
const {
|
|
@@ -31196,7 +31092,7 @@
|
|
|
31196
31092
|
};
|
|
31197
31093
|
|
|
31198
31094
|
function loadPoptipComponent() {
|
|
31199
|
-
registerGroup(),
|
|
31095
|
+
registerGroup(), registerText(), registerSymbol(), registerRect();
|
|
31200
31096
|
}
|
|
31201
31097
|
function setPoptipTheme(defaultPoptipTheme) {
|
|
31202
31098
|
merge$2(theme.poptip, DEFAULT_THEME, defaultPoptipTheme);
|
|
@@ -31249,7 +31145,8 @@
|
|
|
31249
31145
|
titleVisible = isValid$3(title) && !1 !== visible,
|
|
31250
31146
|
titleAttrs = Object.assign(Object.assign({
|
|
31251
31147
|
text: isArray$3(title) ? title : [title],
|
|
31252
|
-
visible: titleVisible
|
|
31148
|
+
visible: titleVisible,
|
|
31149
|
+
wrap: !0
|
|
31253
31150
|
}, titleStyle), {
|
|
31254
31151
|
x: parsedPadding[3],
|
|
31255
31152
|
y: parsedPadding[0],
|
|
@@ -31257,7 +31154,7 @@
|
|
|
31257
31154
|
textAlign: "left",
|
|
31258
31155
|
textBaseline: "top"
|
|
31259
31156
|
}),
|
|
31260
|
-
titleShape = group.createOrUpdateChild("poptip-title", titleAttrs, "
|
|
31157
|
+
titleShape = group.createOrUpdateChild("poptip-title", titleAttrs, "text");
|
|
31261
31158
|
isEmpty(null == state ? void 0 : state.title) || (titleShape.states = state.title);
|
|
31262
31159
|
const titleBounds = titleShape.AABBBounds,
|
|
31263
31160
|
titleHeight = titleBounds.height(),
|
|
@@ -31267,7 +31164,8 @@
|
|
|
31267
31164
|
const contentVisible = isValid$3(content) && !1 !== visible,
|
|
31268
31165
|
contentAttrs = Object.assign(Object.assign({
|
|
31269
31166
|
text: isArray$3(content) ? content : [content],
|
|
31270
|
-
visible: contentVisible
|
|
31167
|
+
visible: contentVisible,
|
|
31168
|
+
wrap: !0
|
|
31271
31169
|
}, contentStyle), {
|
|
31272
31170
|
x: parsedPadding[3],
|
|
31273
31171
|
y: parsedPadding[0] + height,
|
|
@@ -31275,7 +31173,7 @@
|
|
|
31275
31173
|
textAlign: "left",
|
|
31276
31174
|
textBaseline: "top"
|
|
31277
31175
|
}),
|
|
31278
|
-
contentShape = group.createOrUpdateChild("poptip-content", contentAttrs, "
|
|
31176
|
+
contentShape = group.createOrUpdateChild("poptip-content", contentAttrs, "text");
|
|
31279
31177
|
isEmpty(null == state ? void 0 : state.content) || (contentShape.states = state.content);
|
|
31280
31178
|
const contentBounds = contentShape.AABBBounds,
|
|
31281
31179
|
contentHeight = contentBounds.height(),
|
|
@@ -32408,7 +32306,9 @@
|
|
|
32408
32306
|
state && !isEmpty(state) && (target.states = state);
|
|
32409
32307
|
}
|
|
32410
32308
|
_createLabelText(attributes) {
|
|
32411
|
-
|
|
32309
|
+
var _a, _b;
|
|
32310
|
+
const textAttrs = Object.assign(Object.assign({}, null === (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.getTheme()) || void 0 === _b ? void 0 : _b.text), attributes);
|
|
32311
|
+
return isRichText(attributes, "textType") ? graphicCreator.richtext(richTextAttributeTransform(textAttrs)) : graphicCreator.text(textAttrs);
|
|
32412
32312
|
}
|
|
32413
32313
|
_prepare() {
|
|
32414
32314
|
var _a, _b, _c, _d, _e;
|
|
@@ -34691,9 +34591,9 @@
|
|
|
34691
34591
|
}
|
|
34692
34592
|
getLabelAlign(vector, inside, angle) {
|
|
34693
34593
|
const orient = this.attribute.orient;
|
|
34694
|
-
if (
|
|
34695
|
-
if ("top" === orient || "bottom" === orient) return getXAxisLabelAlign(orient, angle);
|
|
34696
|
-
if ("left" === orient || "right" === orient) return getYAxisLabelAlign(orient, angle);
|
|
34594
|
+
if (["top", "bottom", "right", "left"].includes(orient) || 0 === vector[0] && 0 === vector[1]) {
|
|
34595
|
+
if ("top" === orient || "bottom" === orient) return getXAxisLabelAlign(inside ? "bottom" === orient ? "top" : "bottom" : orient, angle);
|
|
34596
|
+
if ("left" === orient || "right" === orient) return getYAxisLabelAlign(inside ? "left" === orient ? "right" : "left" : orient, angle);
|
|
34697
34597
|
}
|
|
34698
34598
|
return {
|
|
34699
34599
|
textAlign: this.getTextAlign(vector),
|
|
@@ -34837,7 +34737,7 @@
|
|
|
34837
34737
|
}
|
|
34838
34738
|
}
|
|
34839
34739
|
_getAxisLabelLimitLength(limitSize, layerCount) {
|
|
34840
|
-
var _a, _b, _c, _d;
|
|
34740
|
+
var _a, _b, _c, _d, _e;
|
|
34841
34741
|
const {
|
|
34842
34742
|
label: label,
|
|
34843
34743
|
title: title,
|
|
@@ -34851,7 +34751,7 @@
|
|
|
34851
34751
|
const axisLineWidth = line && line.visible ? null !== (_b = line.style.lineWidth) && void 0 !== _b ? _b : 1 : 0,
|
|
34852
34752
|
tickLength = tick && tick.visible ? null !== (_c = tick.length) && void 0 !== _c ? _c : 4 : 0;
|
|
34853
34753
|
if (title && title.visible && "string" == typeof title.text) {
|
|
34854
|
-
titleHeight = measureTextSize(title.text, title.textStyle, null === (_d = this.stage) || void 0 === _d ? void 0 : _d.getTheme().text
|
|
34754
|
+
titleHeight = measureTextSize(title.text, title.textStyle, null === (_e = null === (_d = this.stage) || void 0 === _d ? void 0 : _d.getTheme()) || void 0 === _e ? void 0 : _e.text).height;
|
|
34855
34755
|
const padding = normalizePadding$1(title.padding);
|
|
34856
34756
|
titleSpacing = title.space + padding[0] + padding[2];
|
|
34857
34757
|
}
|
|
@@ -35758,7 +35658,7 @@
|
|
|
35758
35658
|
super.setAttributes(params, forceUpdateTag), this.setPropsFromAttrs();
|
|
35759
35659
|
}
|
|
35760
35660
|
bindEvents() {
|
|
35761
|
-
if (this.attribute.disableTriggerEvent) return;
|
|
35661
|
+
if (this.attribute.disableTriggerEvent) return void this.setAttribute("childrenPickable", !1);
|
|
35762
35662
|
const {
|
|
35763
35663
|
showDetail: showDetail,
|
|
35764
35664
|
brushSelect: brushSelect
|
|
@@ -35790,14 +35690,21 @@
|
|
|
35790
35690
|
}));
|
|
35791
35691
|
}
|
|
35792
35692
|
eventPosToStagePos(e) {
|
|
35793
|
-
var _a, _b, _c, _d
|
|
35693
|
+
var _a, _b, _c, _d;
|
|
35794
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({
|
|
35795
35703
|
x: x,
|
|
35796
35704
|
y: y
|
|
35797
|
-
}
|
|
35798
|
-
|
|
35799
|
-
|
|
35800
|
-
y: y - ((null === (_f = this.stage) || void 0 === _f ? void 0 : _f.y) || 0)
|
|
35705
|
+
}, layerPosition), {
|
|
35706
|
+
x: layerPosition.x,
|
|
35707
|
+
y: layerPosition.y
|
|
35801
35708
|
};
|
|
35802
35709
|
}
|
|
35803
35710
|
_onHandlerPointerEnter(e) {
|
|
@@ -37148,7 +37055,7 @@
|
|
|
37148
37055
|
};
|
|
37149
37056
|
}
|
|
37150
37057
|
render() {
|
|
37151
|
-
var _a, _b;
|
|
37058
|
+
var _a, _b, _c;
|
|
37152
37059
|
this._reset();
|
|
37153
37060
|
const {
|
|
37154
37061
|
layout = "horizontal",
|
|
@@ -37190,7 +37097,7 @@
|
|
|
37190
37097
|
} = measureTextSize(this._getPageText(total), Object.assign({
|
|
37191
37098
|
textAlign: "center",
|
|
37192
37099
|
textBaseline: "middle"
|
|
37193
|
-
}, textStyle), null === (_b = this.stage) || void 0 === _b ? void 0 : _b.getTheme().text
|
|
37100
|
+
}, textStyle), null === (_c = null === (_b = this.stage) || void 0 === _b ? void 0 : _b.getTheme()) || void 0 === _c ? void 0 : _c.text),
|
|
37194
37101
|
handlerSizeX = isNumber$3(handlerSize) ? handlerSize : handlerSize[0],
|
|
37195
37102
|
handlerSizeY = isNumber$3(handlerSize) ? handlerSize : handlerSize[1],
|
|
37196
37103
|
text = graphicCreator.text(Object.assign({
|
|
@@ -37420,7 +37327,7 @@
|
|
|
37420
37327
|
maxRow = 2,
|
|
37421
37328
|
maxWidth: maxWidth,
|
|
37422
37329
|
maxHeight: maxHeight,
|
|
37423
|
-
defaultSelected
|
|
37330
|
+
defaultSelected: defaultSelected,
|
|
37424
37331
|
lazyload: lazyload,
|
|
37425
37332
|
autoPage: autoPage
|
|
37426
37333
|
} = this.attribute,
|
|
@@ -37446,7 +37353,9 @@
|
|
|
37446
37353
|
} = this._itemContext;
|
|
37447
37354
|
for (let index = startIndex, len = legendItems.length; index < len && !(lazyload && pages > this._itemContext.currentPage * maxPages); index++) {
|
|
37448
37355
|
lazyload && (this._itemContext.startIndex = index + 1), item = legendItems[index], item.id || (item.id = item.label), item.index = index;
|
|
37449
|
-
|
|
37356
|
+
let isSelected = !0;
|
|
37357
|
+
isArray$3(defaultSelected) && (isSelected = defaultSelected.includes(item.label));
|
|
37358
|
+
const itemGroup = this._renderEachItem(item, isSelected, index, legendItems),
|
|
37450
37359
|
itemWidth = itemGroup.attribute.width,
|
|
37451
37360
|
itemHeight = itemGroup.attribute.height;
|
|
37452
37361
|
this._itemHeight = Math.max(this._itemHeight, itemHeight), maxWidthInCol = Math.max(itemWidth, maxWidthInCol), this._itemMaxWidth = Math.max(itemWidth, this._itemMaxWidth), isHorizontal ? (isValid$3(maxWidth) && (isScrollbar && autoPage ? (pages = Math.ceil((startX + itemWidth) / maxWidth), doWrap = pages > 1) : startX + itemWidth > maxWidth && (doWrap = !0, startX > 0 && (pages += 1, startX = 0, startY += itemHeight + spaceRow))), 0 === startX && 0 === startY || itemGroup.setAttributes({
|
|
@@ -39518,10 +39427,15 @@
|
|
|
39518
39427
|
});
|
|
39519
39428
|
}
|
|
39520
39429
|
_getHandlers() {
|
|
39521
|
-
|
|
39522
|
-
|
|
39430
|
+
const {
|
|
39431
|
+
inverse: inverse
|
|
39432
|
+
} = this.attribute;
|
|
39433
|
+
let startHandler = this._startHandler,
|
|
39523
39434
|
endHandler = this._endHandler;
|
|
39524
|
-
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
|
+
}) : {
|
|
39525
39439
|
startHandler: startHandler,
|
|
39526
39440
|
endHandler: endHandler
|
|
39527
39441
|
};
|
|
@@ -39895,7 +39809,7 @@
|
|
|
39895
39809
|
};
|
|
39896
39810
|
|
|
39897
39811
|
function loadTitleComponent() {
|
|
39898
|
-
registerGroup(),
|
|
39812
|
+
registerGroup(), registerText(), registerRichtext();
|
|
39899
39813
|
}
|
|
39900
39814
|
|
|
39901
39815
|
loadTitleComponent();
|
|
@@ -39958,7 +39872,8 @@
|
|
|
39958
39872
|
}, textStyle);
|
|
39959
39873
|
this._mainTitle = group.createOrUpdateChild("mainTitle", attr, "richtext");
|
|
39960
39874
|
} else isValid$3(text) && (this._mainTitle = group.createOrUpdateChild("mainTitle", Object.assign(Object.assign({
|
|
39961
|
-
text: isArray$3(text) ? text : [text]
|
|
39875
|
+
text: isArray$3(text) ? text : [text],
|
|
39876
|
+
wrap: !0
|
|
39962
39877
|
}, textStyle), {
|
|
39963
39878
|
maxLineWidth: null !== (_t = textStyle.maxLineWidth) && void 0 !== _t ? _t : width,
|
|
39964
39879
|
heightLimit: textStyle.heightLimit,
|
|
@@ -39966,7 +39881,7 @@
|
|
|
39966
39881
|
ellipsis: null === (_u = textStyle.ellipsis) || void 0 === _u || _u,
|
|
39967
39882
|
x: 0,
|
|
39968
39883
|
y: 0
|
|
39969
|
-
}), "
|
|
39884
|
+
}), "text"));
|
|
39970
39885
|
const maintextHeight = this._mainTitle ? this._mainTitle.AABBBounds.height() : 0,
|
|
39971
39886
|
maintextWidth = this._mainTitle ? this._mainTitle.AABBBounds.width() : 0;
|
|
39972
39887
|
if (!1 !== this.attribute.visible && !1 !== subtextStyle.visible) if ("rich" === subtextType || isValid$3(subtextStyle.character)) {
|
|
@@ -39999,7 +39914,8 @@
|
|
|
39999
39914
|
}, subtextStyle);
|
|
40000
39915
|
this._subTitle = group.createOrUpdateChild("subTitle", attr, "richtext");
|
|
40001
39916
|
} else isValid$3(subtext) && (this._subTitle = group.createOrUpdateChild("subTitle", Object.assign(Object.assign({
|
|
40002
|
-
text: isArray$3(subtext) ? subtext : [subtext]
|
|
39917
|
+
text: isArray$3(subtext) ? subtext : [subtext],
|
|
39918
|
+
wrap: !0
|
|
40003
39919
|
}, subtextStyle), {
|
|
40004
39920
|
maxLineWidth: null !== (_12 = subtextStyle.maxLineWidth) && void 0 !== _12 ? _12 : width,
|
|
40005
39921
|
heightLimit: subtextStyle.heightLimit,
|
|
@@ -40007,7 +39923,7 @@
|
|
|
40007
39923
|
ellipsis: null === (_13 = subtextStyle.ellipsis) || void 0 === _13 || _13,
|
|
40008
39924
|
x: 0,
|
|
40009
39925
|
y: maintextHeight
|
|
40010
|
-
}), "
|
|
39926
|
+
}), "text"));
|
|
40011
39927
|
const subtextHeight = this._subTitle ? this._subTitle.AABBBounds.height() : 0,
|
|
40012
39928
|
subtextWidth = this._subTitle ? this._subTitle.AABBBounds.width() : 0;
|
|
40013
39929
|
let titleWidth = Math.max(maintextWidth, subtextWidth),
|
|
@@ -40152,12 +40068,12 @@
|
|
|
40152
40068
|
group.setAttribute("y", size.height / 2 - totalHeight / 2), group.setAttribute("x", size.width / 2);
|
|
40153
40069
|
}
|
|
40154
40070
|
_setLocalAutoFit(limit, indicatorItem, indicatorItemSpec) {
|
|
40155
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
40071
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
40156
40072
|
if ("default" !== (null !== (_a = indicatorItemSpec.fitStrategy) && void 0 !== _a ? _a : "default")) return;
|
|
40157
|
-
const originWidth = measureTextSize(null !== (_c = null === (_b = indicatorItemSpec.style) || void 0 === _b ? void 0 : _b.text) && void 0 !== _c ? _c : "", null !== (_d = indicatorItemSpec.style) && void 0 !== _d ? _d : {}, null === (_e = this.stage) || void 0 === _e ? void 0 : _e.getTheme().text
|
|
40073
|
+
const originWidth = measureTextSize(null !== (_c = null === (_b = indicatorItemSpec.style) || void 0 === _b ? void 0 : _b.text) && void 0 !== _c ? _c : "", null !== (_d = indicatorItemSpec.style) && void 0 !== _d ? _d : {}, null === (_f = null === (_e = this.stage) || void 0 === _e ? void 0 : _e.getTheme()) || void 0 === _f ? void 0 : _f.text).width;
|
|
40158
40074
|
if (originWidth > 0) {
|
|
40159
|
-
const ratio = limit * (null !== (
|
|
40160
|
-
fontSize = Math.floor((null !== (
|
|
40075
|
+
const ratio = limit * (null !== (_g = indicatorItemSpec.fitPercent) && void 0 !== _g ? _g : .5) / originWidth,
|
|
40076
|
+
fontSize = Math.floor((null !== (_j = null === (_h = indicatorItemSpec.style) || void 0 === _h ? void 0 : _h.fontSize) && void 0 !== _j ? _j : 20) * ratio);
|
|
40161
40077
|
indicatorItem.setAttribute("fontSize", fontSize), indicatorItem.setAttribute("lineHeight", isValid$3(indicatorItemSpec.style.lineHeight) ? indicatorItemSpec.style.lineHeight : fontSize);
|
|
40162
40078
|
}
|
|
40163
40079
|
}
|
|
@@ -40284,13 +40200,13 @@
|
|
|
40284
40200
|
}, this.renderForward = () => {
|
|
40285
40201
|
this._forwardController.setAttributes(this._forwardAttr.style);
|
|
40286
40202
|
}, this.play = () => {
|
|
40287
|
-
this._dispatchEvent(
|
|
40203
|
+
this._dispatchEvent(ControllerEventEnum.OnPlay);
|
|
40288
40204
|
}, this.pause = () => {
|
|
40289
|
-
this._dispatchEvent(
|
|
40205
|
+
this._dispatchEvent(ControllerEventEnum.OnPause);
|
|
40290
40206
|
}, this.forward = () => {
|
|
40291
|
-
this._dispatchEvent(
|
|
40207
|
+
this._dispatchEvent(ControllerEventEnum.OnForward);
|
|
40292
40208
|
}, this.backward = () => {
|
|
40293
|
-
this._dispatchEvent(
|
|
40209
|
+
this._dispatchEvent(ControllerEventEnum.OnBackward);
|
|
40294
40210
|
}, this.togglePlay = () => {
|
|
40295
40211
|
this._playController.setAttributes(this._startAttr.style), this._isPaused = !0;
|
|
40296
40212
|
}, this.togglePause = () => {
|
|
@@ -40411,15 +40327,15 @@
|
|
|
40411
40327
|
|
|
40412
40328
|
class BasePlayer extends AbstractComponent {
|
|
40413
40329
|
constructor(attributes, options) {
|
|
40414
|
-
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, BasePlayer.defaultAttributes, attributes)), this._data = [], this._layoutInfo = {}, this._updateSliderAttrs = () => {
|
|
40415
|
-
var _a, _b
|
|
40330
|
+
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, BasePlayer.defaultAttributes, attributes)), this._data = [], this._dataIndex = 0, this._layoutInfo = {}, this._updateSliderAttrs = () => {
|
|
40331
|
+
var _a, _b;
|
|
40416
40332
|
let handlerSize;
|
|
40417
40333
|
isValidNumber$1(this._handlerStyle.size) ? handlerSize = this._handlerStyle.size : this._handlerStyle.size && this._handlerStyle.size.length && (handlerSize = max$1(this._handlerStyle.size[0], this._handlerStyle.size[1]));
|
|
40418
40334
|
const attrs = {
|
|
40419
40335
|
visible: this._sliderVisible,
|
|
40420
40336
|
min: this._minIndex,
|
|
40421
40337
|
max: this._maxIndex,
|
|
40422
|
-
value:
|
|
40338
|
+
value: this._dataIndex,
|
|
40423
40339
|
railWidth: this._railStyle.width,
|
|
40424
40340
|
railHeight: this._railStyle.height,
|
|
40425
40341
|
railStyle: this._railStyle,
|
|
@@ -40443,11 +40359,11 @@
|
|
|
40443
40359
|
};
|
|
40444
40360
|
if (isHorizontal$1(this._orient)) {
|
|
40445
40361
|
const railWidth = Math.max(0, this._layoutInfo.slider.size),
|
|
40446
|
-
railHeight = null !== (
|
|
40362
|
+
railHeight = null !== (_a = this._railStyle.height) && void 0 !== _a ? _a : RailDefaultSize[1];
|
|
40447
40363
|
attrs.layout = "horizontal", attrs.railHeight = railHeight, attrs.railWidth = railWidth, attrs.x = this._layoutInfo.slider.x, attrs.y = this._layoutInfo.slider.y;
|
|
40448
40364
|
} else {
|
|
40449
40365
|
const railHeight = Math.max(0, this._layoutInfo.slider.size),
|
|
40450
|
-
railWidth = null !== (
|
|
40366
|
+
railWidth = null !== (_b = this._railStyle.width) && void 0 !== _b ? _b : RailDefaultSize[1];
|
|
40451
40367
|
attrs.layout = "vertical", attrs.railWidth = railWidth, attrs.railHeight = railHeight, attrs.x = this._layoutInfo.slider.x, attrs.y = this._layoutInfo.slider.y;
|
|
40452
40368
|
}
|
|
40453
40369
|
return attrs;
|
|
@@ -40506,7 +40422,7 @@
|
|
|
40506
40422
|
}, this._initController = () => {
|
|
40507
40423
|
const attrs = this._updateControllerAttrs();
|
|
40508
40424
|
this._controller = new Controller(attrs), this._controllerVisible && this.add(this._controller);
|
|
40509
|
-
}, this._initAttributes(), this._initLayoutInfo(), this._initController(), this._initSlider();
|
|
40425
|
+
}, this._initAttributes(), this._initDataIndex(), this._initLayoutInfo(), this._initController(), this._initSlider();
|
|
40510
40426
|
}
|
|
40511
40427
|
_initAttributes() {
|
|
40512
40428
|
this._size = this.attribute.size, this._orient = this.attribute.orient, this._data = this.attribute.data, this._minIndex = 0, this._maxIndex = this._data.length - 1;
|
|
@@ -40516,6 +40432,10 @@
|
|
|
40516
40432
|
} = this.attribute;
|
|
40517
40433
|
this._sliderVisible = slider.visible, this._railStyle = Object.assign({}, slider.railStyle), this._trackStyle = Object.assign({}, slider.trackStyle), this._handlerStyle = Object.assign({}, slider.handlerStyle), this._controllerVisible = controller.visible, this._start = Object.assign({}, controller.start), this._pause = Object.assign({}, controller.pause), this._forward = Object.assign({}, controller.forward), this._backward = Object.assign({}, controller.backward);
|
|
40518
40434
|
}
|
|
40435
|
+
_initDataIndex() {
|
|
40436
|
+
var _a;
|
|
40437
|
+
this._dataIndex = null !== (_a = this.attribute.dataIndex) && void 0 !== _a ? _a : 0;
|
|
40438
|
+
}
|
|
40519
40439
|
_initLayoutInfo() {
|
|
40520
40440
|
var _a, _b, _c;
|
|
40521
40441
|
const controllers = [this._start, this._backward, this._forward].sort((a, b) => a.order - b.order),
|
|
@@ -40640,8 +40560,11 @@
|
|
|
40640
40560
|
class DiscretePlayer extends BasePlayer {
|
|
40641
40561
|
constructor(attributes, options) {
|
|
40642
40562
|
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, attributes)), this._activeIndex = -1, this._isReachEnd = !1, this._initAttributes = () => {
|
|
40643
|
-
var _a, _b, _c
|
|
40644
|
-
super._initAttributes(), this._alternate = null !== (_a = this.attribute.alternate) && void 0 !== _a && _a, this._interval = null !== (_b = this.attribute.interval) && void 0 !== _b ? _b : 1e3, this._direction = null !== (_c = this.attribute.direction) && void 0 !== _c ? _c : DirectionEnum.Default
|
|
40563
|
+
var _a, _b, _c;
|
|
40564
|
+
super._initAttributes(), this._alternate = null !== (_a = this.attribute.alternate) && void 0 !== _a && _a, this._interval = null !== (_b = this.attribute.interval) && void 0 !== _b ? _b : 1e3, this._direction = null !== (_c = this.attribute.direction) && void 0 !== _c ? _c : DirectionEnum.Default;
|
|
40565
|
+
}, this._initDataIndex = () => {
|
|
40566
|
+
var _a;
|
|
40567
|
+
this._dataIndex = isNil$3(this.attribute.dataIndex) ? "default" === this._direction ? this._minIndex : this._maxIndex : null !== (_a = this.attribute.dataIndex) && void 0 !== _a ? _a : 0, this._slider.setAttribute("value", this._dataIndex);
|
|
40645
40568
|
}, this._initEvents = () => {
|
|
40646
40569
|
this.attribute.disableTriggerEvent || (this._controller.addEventListener(ControllerEventEnum.OnPlay, e => {
|
|
40647
40570
|
e.stopPropagation(), this.play();
|
|
@@ -40683,7 +40606,7 @@
|
|
|
40683
40606
|
}, this.forward = () => {
|
|
40684
40607
|
const index = Math.min(this._dataIndex + 1, this._maxIndex);
|
|
40685
40608
|
this._updateDataIndex(index), this.dispatchCustomEvent(PlayerEventEnum.change), this.dispatchCustomEvent(PlayerEventEnum.forward);
|
|
40686
|
-
}, this._initAttributes(), this._initEvents();
|
|
40609
|
+
}, this._initAttributes(), this._initDataIndex(), this._initEvents();
|
|
40687
40610
|
}
|
|
40688
40611
|
setAttributes(params, forceUpdateTag) {
|
|
40689
40612
|
super.setAttributes(params, forceUpdateTag), this._initAttributes();
|
|
@@ -40722,10 +40645,13 @@
|
|
|
40722
40645
|
class ContinuousPlayer extends BasePlayer {
|
|
40723
40646
|
constructor(attributes) {
|
|
40724
40647
|
super(attributes), this._isPlaying = !1, this._startTime = Date.now(), this._initAttributes = () => {
|
|
40725
|
-
var _a
|
|
40726
|
-
super._initAttributes(), this._maxIndex = this._data.length, this._slider.setAttribute("max", this._maxIndex), this._isPlaying = !1, this._elapsed = 0, this._interval = null !== (_a = this.attribute.interval) && void 0 !== _a ? _a : 1e3
|
|
40648
|
+
var _a;
|
|
40649
|
+
super._initAttributes(), this._maxIndex = this._data.length, this._slider.setAttribute("max", this._maxIndex), this._isPlaying = !1, this._elapsed = 0, this._interval = null !== (_a = this.attribute.interval) && void 0 !== _a ? _a : 1e3;
|
|
40727
40650
|
const frames = this._data.length;
|
|
40728
40651
|
this.attribute.totalDuration && this._data.length ? (this._totalDuration = this.attribute.totalDuration, this._interval = this._totalDuration / (null != frames ? frames : 1)) : (this._totalDuration = this._interval * frames, this._interval = this.attribute.interval);
|
|
40652
|
+
}, this._initDataIndex = () => {
|
|
40653
|
+
var _a;
|
|
40654
|
+
this._dataIndex = null !== (_a = this.attribute.dataIndex) && void 0 !== _a ? _a : this._minIndex;
|
|
40729
40655
|
}, this._initEvents = () => {
|
|
40730
40656
|
this.attribute.disableTriggerEvent || (this._controller.addEventListener(ControllerEventEnum.OnPlay, e => {
|
|
40731
40657
|
e.stopPropagation(), this.play();
|
|
@@ -40771,7 +40697,7 @@
|
|
|
40771
40697
|
interval = 1 * this._interval,
|
|
40772
40698
|
elapsed = this._elapsed + interval;
|
|
40773
40699
|
elapsed >= this._totalDuration ? (this._startTime = now - this._totalDuration, this._elapsed = this._totalDuration) : (this._startTime = this._startTime - interval, this._elapsed = elapsed), this._updateSlider(), this.dispatchCustomEvent(PlayerEventEnum.forward);
|
|
40774
|
-
}, this._initAttributes(), this._initEvents();
|
|
40700
|
+
}, this._initAttributes(), this._initDataIndex(), this._initEvents();
|
|
40775
40701
|
}
|
|
40776
40702
|
dispatchCustomEvent(eventType) {
|
|
40777
40703
|
super.dispatchCustomEvent(eventType, this._dataIndex);
|
|
@@ -40833,15 +40759,16 @@
|
|
|
40833
40759
|
}, this._onBrushing = e => {
|
|
40834
40760
|
this._outOfInteractiveRange(e) || ((this._activeDrawState || this._activeMoveState) && e.stopPropagation(), this._activeDrawState && this._drawing(e), this._activeMoveState && this._moving(e));
|
|
40835
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;
|
|
40836
40763
|
e.preventDefault();
|
|
40837
40764
|
const {
|
|
40838
40765
|
removeOnClick = !0
|
|
40839
40766
|
} = this.attribute;
|
|
40840
|
-
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, {
|
|
40841
40768
|
operateMask: this._operatingMask,
|
|
40842
40769
|
operatedMaskAABBBounds: this._brushMaskAABBBoundsDict,
|
|
40843
40770
|
event: e
|
|
40844
|
-
})) : (this._activeDrawState && this._dispatchEvent(IOperateType.drawEnd, {
|
|
40771
|
+
}), this._container.incrementalClearChild(), this._brushMaskAABBBoundsDict = {}) : (this._activeDrawState && this._dispatchEvent(IOperateType.drawEnd, {
|
|
40845
40772
|
operateMask: this._operatingMask,
|
|
40846
40773
|
operatedMaskAABBBounds: this._brushMaskAABBBoundsDict,
|
|
40847
40774
|
event: e
|
|
@@ -40921,28 +40848,29 @@
|
|
|
40921
40848
|
_drawing(e) {
|
|
40922
40849
|
var _a, _b;
|
|
40923
40850
|
const pos = this.eventPosToStagePos(e),
|
|
40924
|
-
{
|
|
40925
|
-
x1 = 0,
|
|
40926
|
-
x2 = 0,
|
|
40927
|
-
y1 = 0,
|
|
40928
|
-
y2 = 0
|
|
40929
|
-
} = null === (_a = this._operatingMask) || void 0 === _a ? void 0 : _a._AABBBounds,
|
|
40930
40851
|
{
|
|
40931
40852
|
sizeThreshold = DEFAULT_SIZE_THRESHOLD,
|
|
40932
40853
|
brushType: brushType
|
|
40933
40854
|
} = this.attribute,
|
|
40934
40855
|
cacheLength = this._cacheDrawPoints.length;
|
|
40935
|
-
if (
|
|
40936
|
-
const lastPos = null !== (
|
|
40856
|
+
if (cacheLength > 0) {
|
|
40857
|
+
const lastPos = null !== (_a = this._cacheDrawPoints[this._cacheDrawPoints.length - 1]) && void 0 !== _a ? _a : {};
|
|
40937
40858
|
if (pos.x === lastPos.x && pos.y === lastPos.y) return;
|
|
40938
40859
|
}
|
|
40939
40860
|
"polygon" === brushType || cacheLength <= 1 ? this._cacheDrawPoints.push(pos) : this._cacheDrawPoints[cacheLength - 1] = pos;
|
|
40940
40861
|
const maskPoints = this._computeMaskPoints();
|
|
40941
|
-
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, {
|
|
40942
40870
|
operateMask: this._operatingMask,
|
|
40943
40871
|
operatedMaskAABBBounds: this._brushMaskAABBBoundsDict,
|
|
40944
40872
|
event: e
|
|
40945
|
-
});
|
|
40873
|
+
}));
|
|
40946
40874
|
}
|
|
40947
40875
|
_moving(e) {
|
|
40948
40876
|
const startPos = this._cacheMovePoint,
|
|
@@ -41031,14 +40959,20 @@
|
|
|
41031
40959
|
return pos.x > maxX || pos.x < minX || pos.y > maxY || pos.y < minY;
|
|
41032
40960
|
}
|
|
41033
40961
|
eventPosToStagePos(e) {
|
|
41034
|
-
var _a, _b;
|
|
41035
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({
|
|
41036
40971
|
x: x,
|
|
41037
40972
|
y: y
|
|
41038
|
-
}
|
|
41039
|
-
|
|
41040
|
-
|
|
41041
|
-
y: y - ((null === (_b = this.stage) || void 0 === _b ? void 0 : _b.y) || 0)
|
|
40973
|
+
}, layerPosition), {
|
|
40974
|
+
x: layerPosition.x,
|
|
40975
|
+
y: layerPosition.y
|
|
41042
40976
|
};
|
|
41043
40977
|
}
|
|
41044
40978
|
render() {
|
|
@@ -42056,10 +41990,7 @@
|
|
|
42056
41990
|
function distance(p1, p2 = { x: 0, y: 0 }) {
|
|
42057
41991
|
return PointService.distancePP(p1, p2);
|
|
42058
41992
|
}
|
|
42059
|
-
function getPercentValue(valueList,
|
|
42060
|
-
if (!valueList[idx]) {
|
|
42061
|
-
return 0;
|
|
42062
|
-
}
|
|
41993
|
+
function getPercentValue(valueList, precision = 2) {
|
|
42063
41994
|
const sum = valueList.reduce((a, c) => {
|
|
42064
41995
|
return (a += isNaN(c) ? 0 : c);
|
|
42065
41996
|
}, 0);
|
|
@@ -42093,7 +42024,7 @@
|
|
|
42093
42024
|
remainder[maxId] = 0;
|
|
42094
42025
|
++currentSum;
|
|
42095
42026
|
}
|
|
42096
|
-
return seats
|
|
42027
|
+
return seats.map(entry => entry / digits);
|
|
42097
42028
|
}
|
|
42098
42029
|
|
|
42099
42030
|
function eachSeries(regions, callback, filter) {
|
|
@@ -43278,10 +43209,21 @@
|
|
|
43278
43209
|
});
|
|
43279
43210
|
}), res;
|
|
43280
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
|
+
};
|
|
43281
43223
|
|
|
43282
43224
|
class ElementSelect extends BaseInteraction {
|
|
43283
43225
|
constructor(view, options) {
|
|
43284
|
-
super(view, options), this.type = ElementSelect.type, this.clearPrevElements = () => {
|
|
43226
|
+
super(view, options), this.type = ElementSelect.type, this._resetType = [], this.clearPrevElements = () => {
|
|
43285
43227
|
const {
|
|
43286
43228
|
state: state,
|
|
43287
43229
|
reverseState: reverseState
|
|
@@ -43305,12 +43247,17 @@
|
|
|
43305
43247
|
events = [{
|
|
43306
43248
|
type: trigger,
|
|
43307
43249
|
handler: this.handleStart
|
|
43308
|
-
}]
|
|
43309
|
-
|
|
43310
|
-
|
|
43311
|
-
|
|
43312
|
-
|
|
43313
|
-
|
|
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;
|
|
43314
43261
|
}
|
|
43315
43262
|
start(element) {
|
|
43316
43263
|
const {
|
|
@@ -43318,17 +43265,24 @@
|
|
|
43318
43265
|
reverseState: reverseState,
|
|
43319
43266
|
isMultiple: isMultiple
|
|
43320
43267
|
} = this.options;
|
|
43321
|
-
element && this._marks && this._marks.includes(element.mark)
|
|
43322
|
-
|
|
43323
|
-
|
|
43324
|
-
|
|
43325
|
-
|
|
43326
|
-
|
|
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();
|
|
43327
43281
|
}
|
|
43328
43282
|
reset(element) {
|
|
43329
43283
|
if (!this._statedElements || !this._statedElements.length) return;
|
|
43330
43284
|
const hasActiveElement = element && this._marks && this._marks.includes(element.mark);
|
|
43331
|
-
"view"
|
|
43285
|
+
(this._resetType.includes("view") && !hasActiveElement || this._resetType.includes("self") && hasActiveElement) && this.clearPrevElements();
|
|
43332
43286
|
}
|
|
43333
43287
|
}
|
|
43334
43288
|
ElementSelect.type = "element-select", ElementSelect.defaultOptions = {
|
|
@@ -48051,7 +48005,7 @@
|
|
|
48051
48005
|
}
|
|
48052
48006
|
release() {
|
|
48053
48007
|
var _a, _b, _c;
|
|
48054
|
-
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 => {
|
|
48055
48009
|
listener.source.removeEventListener(listener.type, listener.handler);
|
|
48056
48010
|
}), this._eventListeners = null;
|
|
48057
48011
|
}
|
|
@@ -50299,12 +50253,16 @@
|
|
|
50299
50253
|
const from = Object.assign({}, element.getPrevGraphicAttributes()),
|
|
50300
50254
|
to = Object.assign({}, element.getNextGraphicAttributes());
|
|
50301
50255
|
let excludeChannels;
|
|
50302
|
-
|
|
50256
|
+
options && array(options.excludeChannels).forEach(key => {
|
|
50303
50257
|
delete from[key], delete to[key];
|
|
50304
50258
|
}), element.mark && element.mark.markType && (excludeChannels = BUILT_IN_EXCLUDE_CHANNELS[element.mark.markType]) && excludeChannels.forEach(key => {
|
|
50305
50259
|
delete from[key], delete to[key];
|
|
50306
50260
|
}), Object.keys(to).forEach(key => {
|
|
50307
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]);
|
|
50308
50266
|
}), {
|
|
50309
50267
|
from: from,
|
|
50310
50268
|
to: to
|
|
@@ -56855,13 +56813,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56855
56813
|
const chartSpec = this._option.getChart().getSpec();
|
|
56856
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) => {
|
|
56857
56815
|
var _a;
|
|
56858
|
-
const filterMode = (_a = entry.filterMode) !== null && _a !== void 0 ? _a :
|
|
56859
|
-
return filterMode ===
|
|
56816
|
+
const filterMode = (_a = entry.filterMode) !== null && _a !== void 0 ? _a : 'filter';
|
|
56817
|
+
return filterMode === 'axis';
|
|
56860
56818
|
});
|
|
56861
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) => {
|
|
56862
56820
|
var _a;
|
|
56863
|
-
const filterMode = (_a = entry.filterMode) !== null && _a !== void 0 ? _a :
|
|
56864
|
-
return filterMode ===
|
|
56821
|
+
const filterMode = (_a = entry.filterMode) !== null && _a !== void 0 ? _a : 'axis';
|
|
56822
|
+
return filterMode === 'axis';
|
|
56865
56823
|
});
|
|
56866
56824
|
return hasDataZoom || hasScrollBar ? true : this._layout.layoutClip;
|
|
56867
56825
|
}
|
|
@@ -64572,7 +64530,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
64572
64530
|
registerComponentPlugin(CanvasTooltipHandler);
|
|
64573
64531
|
};
|
|
64574
64532
|
|
|
64575
|
-
const version = "1.10.
|
|
64533
|
+
const version = "1.10.5";
|
|
64576
64534
|
|
|
64577
64535
|
const addVChartProperty = (data, op) => {
|
|
64578
64536
|
const context = op.beforeCall();
|
|
@@ -68141,9 +68099,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68141
68099
|
this.updateChartConfig({ change: true, reMake: false }, this._spec);
|
|
68142
68100
|
this.setLayoutTag(true, null, false);
|
|
68143
68101
|
this.updateGlobalScaleTheme();
|
|
68144
|
-
this._regions.forEach(
|
|
68145
|
-
|
|
68146
|
-
|
|
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
|
+
});
|
|
68147
68108
|
}
|
|
68148
68109
|
clear() {
|
|
68149
68110
|
this.getAllModels().forEach(i => { var _a; return (_a = i.clear) === null || _a === void 0 ? void 0 : _a.call(i); });
|
|
@@ -73758,6 +73719,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
73758
73719
|
let lastAngle = startAngle;
|
|
73759
73720
|
let restAngle = angleRange;
|
|
73760
73721
|
let largeThanMinAngleTotal = 0;
|
|
73722
|
+
const percents = getPercentValue(valueList);
|
|
73761
73723
|
data.forEach((d, i) => {
|
|
73762
73724
|
const angleFieldValue = d[ARC_TRANSFORM_VALUE];
|
|
73763
73725
|
const ratio = total ? angleFieldValue / total : 0;
|
|
@@ -73773,7 +73735,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
73773
73735
|
const dEndAngle = lastAngle + radian;
|
|
73774
73736
|
d[asRatio] = ratio;
|
|
73775
73737
|
d[asK] = max ? angleFieldValue / max : 0;
|
|
73776
|
-
d._percent_ =
|
|
73738
|
+
d._percent_ = percents[i];
|
|
73777
73739
|
appendArcInfo(d, dStartAngle, radian);
|
|
73778
73740
|
lastAngle = dEndAngle;
|
|
73779
73741
|
});
|
|
@@ -80006,8 +79968,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
80006
79968
|
if (null === (_b = datum.children) || void 0 === _b ? void 0 : _b.length) {
|
|
80007
79969
|
node.children = [], node.isLeaf = !1;
|
|
80008
79970
|
const res = calculateNodeValue$1(datum.children, node.children, depth + 1, prevFlattenIndex, node, getNodeKey);
|
|
80009
|
-
node.value = isNil$3(datum.value) ? res.sum : Math.max(res.sum,
|
|
80010
|
-
} 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);
|
|
80011
79973
|
sum += Math.abs(node.value), output.push(node);
|
|
80012
79974
|
}), {
|
|
80013
79975
|
sum: sum,
|
|
@@ -84598,8 +84560,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
84598
84560
|
super.transformSpec(spec);
|
|
84599
84561
|
if (isArray$3(spec.dataZoom) && spec.dataZoom.length > 0) {
|
|
84600
84562
|
spec.dataZoom.forEach((zoom) => {
|
|
84601
|
-
if (zoom.filterMode ===
|
|
84602
|
-
zoom.filterMode =
|
|
84563
|
+
if (zoom.filterMode === 'axis') {
|
|
84564
|
+
zoom.filterMode = 'filter';
|
|
84603
84565
|
}
|
|
84604
84566
|
});
|
|
84605
84567
|
}
|
|
@@ -85078,7 +85040,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
85078
85040
|
if (dataLength) {
|
|
85079
85041
|
ratio = ((seriesSpec === null || seriesSpec === void 0 ? void 0 : seriesSpec.height) || defaultSeriesRowHeight) / (dataLength * 30);
|
|
85080
85042
|
}
|
|
85081
|
-
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]));
|
|
85082
85044
|
}
|
|
85083
85045
|
seriesSpec.regionIndex = region.length - 1;
|
|
85084
85046
|
rowNum++;
|
|
@@ -86615,6 +86577,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86615
86577
|
result.height = Math.ceil(result.height);
|
|
86616
86578
|
return this._layout.setRectInSpec(this._layoutCacheProcessing(result));
|
|
86617
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
|
+
};
|
|
86618
86591
|
this._fixAxisOnZero = () => {
|
|
86619
86592
|
const { onZero, visible } = this._spec.domainLine;
|
|
86620
86593
|
if (this.visible && onZero && visible !== false) {
|
|
@@ -86992,21 +86965,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86992
86965
|
}
|
|
86993
86966
|
return result;
|
|
86994
86967
|
}
|
|
86995
|
-
updateLayoutAttribute() {
|
|
86996
|
-
if (!this.visible) {
|
|
86997
|
-
return;
|
|
86998
|
-
}
|
|
86999
|
-
const startPoint = this.getLayoutStartPoint();
|
|
87000
|
-
const _a = this._getUpdateAttribute(false), { grid: updateGridAttrs } = _a, updateAxisAttrs = __rest$7(_a, ["grid"]);
|
|
87001
|
-
const axisProduct = this._axisMark.getProduct();
|
|
87002
|
-
const axisAttrs = mergeSpec({ x: startPoint.x, y: startPoint.y }, this._axisStyle, updateAxisAttrs);
|
|
87003
|
-
axisProduct.encode(axisAttrs);
|
|
87004
|
-
if (this._gridMark) {
|
|
87005
|
-
const gridProduct = this._gridMark.getProduct();
|
|
87006
|
-
gridProduct.encode(mergeSpec({ x: startPoint.x, y: startPoint.y }, this._getGridAttributes(), updateGridAttrs));
|
|
87007
|
-
}
|
|
87008
|
-
super.updateLayoutAttribute();
|
|
87009
|
-
}
|
|
87010
86968
|
_getTitleLimit(isX) {
|
|
87011
86969
|
var _a, _b, _c, _d, _e;
|
|
87012
86970
|
if (this._spec.title.visible && isNil$3((_a = this._spec.title.style) === null || _a === void 0 ? void 0 : _a.maxLineWidth)) {
|
|
@@ -87149,6 +87107,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
87149
87107
|
initEvent() {
|
|
87150
87108
|
super.initEvent();
|
|
87151
87109
|
if (this.visible) {
|
|
87110
|
+
this.event.on(exports.ChartEvent.layoutEnd, this._updateAxisLayout);
|
|
87152
87111
|
this.event.on(exports.ChartEvent.layoutEnd, this._fixAxisOnZero);
|
|
87153
87112
|
this.event.on(exports.ChartEvent.layoutRectUpdate, () => {
|
|
87154
87113
|
this._clearLayoutCache();
|
|
@@ -88867,15 +88826,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
88867
88826
|
return legendData;
|
|
88868
88827
|
}
|
|
88869
88828
|
_getSeriesLegendField(s) {
|
|
88870
|
-
var _a, _b;
|
|
88829
|
+
var _a, _b, _c;
|
|
88871
88830
|
const defaultField = s.getSeriesField();
|
|
88872
|
-
|
|
88831
|
+
const specifyScaleId = (_a = this._spec.scaleName) !== null && _a !== void 0 ? _a : this._spec.scale;
|
|
88832
|
+
if (isNil$3(specifyScaleId)) {
|
|
88873
88833
|
return defaultField;
|
|
88874
88834
|
}
|
|
88875
88835
|
if (!s.getRawData()) {
|
|
88876
88836
|
return defaultField;
|
|
88877
88837
|
}
|
|
88878
|
-
const scaleSpec = this._option.globalScale.getScaleSpec(
|
|
88838
|
+
const scaleSpec = this._option.globalScale.getScaleSpec(specifyScaleId);
|
|
88879
88839
|
if (!scaleSpec) {
|
|
88880
88840
|
return defaultField;
|
|
88881
88841
|
}
|
|
@@ -88889,7 +88849,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
88889
88849
|
if (!seriesData) {
|
|
88890
88850
|
return defaultField;
|
|
88891
88851
|
}
|
|
88892
|
-
return (
|
|
88852
|
+
return (_c = (_b = seriesData.fields) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : defaultField;
|
|
88893
88853
|
}
|
|
88894
88854
|
_initSelectedData() {
|
|
88895
88855
|
if (this._spec.defaultSelected) {
|
|
@@ -89004,17 +88964,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89004
88964
|
const { series, field, scale } = op;
|
|
89005
88965
|
const datumField = field();
|
|
89006
88966
|
if (field && datumField) {
|
|
89007
|
-
let min =
|
|
89008
|
-
let max =
|
|
88967
|
+
let min = Infinity;
|
|
88968
|
+
let max = -Infinity;
|
|
89009
88969
|
series().forEach(s => {
|
|
89010
88970
|
const statisticData = s.getRawDataStatisticsByField(datumField, true);
|
|
89011
88971
|
const seriesMin = statisticData === null || statisticData === void 0 ? void 0 : statisticData.min;
|
|
89012
88972
|
const seriesMax = statisticData === null || statisticData === void 0 ? void 0 : statisticData.max;
|
|
89013
88973
|
if (isValidNumber$1(seriesMin)) {
|
|
89014
|
-
min = seriesMin;
|
|
88974
|
+
min = Math.min(seriesMin, min);
|
|
89015
88975
|
}
|
|
89016
88976
|
if (isValidNumber$1(seriesMax)) {
|
|
89017
|
-
max = seriesMax;
|
|
88977
|
+
max = Math.max(seriesMax, max);
|
|
89018
88978
|
}
|
|
89019
88979
|
});
|
|
89020
88980
|
return [min, max];
|
|
@@ -89169,10 +89129,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89169
89129
|
type: 'continuousLegendDataMake',
|
|
89170
89130
|
options: {
|
|
89171
89131
|
series: () => {
|
|
89172
|
-
return this._regions
|
|
89173
|
-
|
|
89174
|
-
|
|
89175
|
-
}
|
|
89132
|
+
return getSeries(this._regions, {
|
|
89133
|
+
userId: this._seriesUserId,
|
|
89134
|
+
specIndex: this._seriesIndex
|
|
89135
|
+
});
|
|
89176
89136
|
},
|
|
89177
89137
|
field: () => this._field,
|
|
89178
89138
|
scale: this._getScaleInGlobal.bind(this)
|
|
@@ -91076,13 +91036,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91076
91036
|
_handleChange(start, end, updateComponent) {
|
|
91077
91037
|
var _a, _b;
|
|
91078
91038
|
const zoomLock = (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.zoomLock) !== null && _b !== void 0 ? _b : false;
|
|
91079
|
-
if (zoomLock ||
|
|
91039
|
+
if (zoomLock ||
|
|
91040
|
+
(end - start !== this._spanCache &&
|
|
91041
|
+
(end - start < this._minSpan || end - start > this._maxSpan))) {
|
|
91080
91042
|
this._shouldChange = false;
|
|
91081
91043
|
}
|
|
91082
91044
|
else {
|
|
91083
91045
|
this._shouldChange = true;
|
|
91046
|
+
this._spanCache = end - start;
|
|
91084
91047
|
}
|
|
91085
|
-
this._spanCache = end - start;
|
|
91086
91048
|
}
|
|
91087
91049
|
_isReverse() {
|
|
91088
91050
|
const axis = this._relatedAxisComponent;
|
|
@@ -91164,7 +91126,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91164
91126
|
onZoomChange: (tag) => {
|
|
91165
91127
|
var _a, _b;
|
|
91166
91128
|
const axis = this._relatedAxisComponent;
|
|
91167
|
-
if (axis && this._filterMode ===
|
|
91129
|
+
if (axis && this._filterMode === 'axis') {
|
|
91168
91130
|
const axisScale = axis.getScale();
|
|
91169
91131
|
const axisSpec = axis.getSpec();
|
|
91170
91132
|
if (this._auto && this._getAxisBandSize(axisSpec) && this._spec.ignoreBandSize) {
|
|
@@ -91248,7 +91210,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91248
91210
|
if (active) {
|
|
91249
91211
|
this._handleChartMove(value, (_a = this._scrollAttr.rate) !== null && _a !== void 0 ? _a : 1);
|
|
91250
91212
|
}
|
|
91251
|
-
|
|
91213
|
+
const hasChange = this._start !== 0 && this._end !== 1;
|
|
91214
|
+
return active && hasChange;
|
|
91252
91215
|
};
|
|
91253
91216
|
this._handleChartDrag = (delta, e) => {
|
|
91254
91217
|
var _a;
|
|
@@ -91274,6 +91237,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91274
91237
|
this._handleChange(this._start + moveDelta, this._end + moveDelta, true);
|
|
91275
91238
|
}
|
|
91276
91239
|
}
|
|
91240
|
+
return false;
|
|
91277
91241
|
};
|
|
91278
91242
|
this._orient = getOrient(spec);
|
|
91279
91243
|
this._isHorizontal = getDirectionByOrient(this._orient) === "horizontal";
|
|
@@ -91309,7 +91273,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91309
91273
|
this._relatedAxisComponent = bandAxis;
|
|
91310
91274
|
}
|
|
91311
91275
|
}
|
|
91312
|
-
if (this._relatedAxisComponent && this._filterMode ===
|
|
91276
|
+
if (this._relatedAxisComponent && this._filterMode === 'axis') {
|
|
91313
91277
|
this._relatedAxisComponent.autoIndentOnce = true;
|
|
91314
91278
|
}
|
|
91315
91279
|
}
|
|
@@ -91551,8 +91515,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91551
91515
|
}
|
|
91552
91516
|
this._minSpan = Math.max(0, this._minSpan);
|
|
91553
91517
|
this._maxSpan = Math.min(this._maxSpan, 1);
|
|
91554
|
-
if ((!this._relatedAxisComponent || this._filterMode !==
|
|
91555
|
-
(this._start !== 0 || this._end !== 1)) {
|
|
91518
|
+
if ((!this._relatedAxisComponent || this._filterMode !== 'axis') && (this._start !== 0 || this._end !== 1)) {
|
|
91556
91519
|
this._newDomain = this._parseDomainFromState(this._startValue, this._endValue);
|
|
91557
91520
|
}
|
|
91558
91521
|
}
|
|
@@ -91590,7 +91553,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91590
91553
|
}
|
|
91591
91554
|
}
|
|
91592
91555
|
_addTransformToSeries() {
|
|
91593
|
-
if (!this._relatedAxisComponent || this._filterMode !==
|
|
91556
|
+
if (!this._relatedAxisComponent || this._filterMode !== 'axis') {
|
|
91594
91557
|
registerDataSetInstanceTransform(this._option.dataSet, 'dataFilterWithNewDomain', dataFilterWithNewDomain);
|
|
91595
91558
|
eachSeries(this._regions, s => {
|
|
91596
91559
|
s.addViewDataFilter({
|
|
@@ -91873,7 +91836,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91873
91836
|
return yScale.scale(min) + this.getLayoutStartPoint().y + offsetTop + offsetHandler;
|
|
91874
91837
|
};
|
|
91875
91838
|
this._valueField = 'y';
|
|
91876
|
-
this._filterMode = (_a = spec.filterMode) !== null && _a !== void 0 ? _a :
|
|
91839
|
+
this._filterMode = (_a = spec.filterMode) !== null && _a !== void 0 ? _a : 'filter';
|
|
91877
91840
|
}
|
|
91878
91841
|
created() {
|
|
91879
91842
|
super.created();
|
|
@@ -92083,7 +92046,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92083
92046
|
this.event.emit(exports.ChartEvent.dataZoomChange, {
|
|
92084
92047
|
model: this,
|
|
92085
92048
|
value: {
|
|
92086
|
-
filterData: this._filterMode !==
|
|
92049
|
+
filterData: this._filterMode !== 'axis',
|
|
92087
92050
|
start,
|
|
92088
92051
|
end,
|
|
92089
92052
|
startValue: this._startValue,
|
|
@@ -92209,7 +92172,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92209
92172
|
this.layoutZIndex = exports.LayoutZIndex.DataZoom;
|
|
92210
92173
|
this.layoutLevel = exports.LayoutLevel.DataZoom;
|
|
92211
92174
|
this.layoutType = 'region-relative';
|
|
92212
|
-
this._filterMode = (_a = spec.filterMode) !== null && _a !== void 0 ? _a :
|
|
92175
|
+
this._filterMode = (_a = spec.filterMode) !== null && _a !== void 0 ? _a : 'axis';
|
|
92213
92176
|
}
|
|
92214
92177
|
setAttrFromSpec() {
|
|
92215
92178
|
super.setAttrFromSpec();
|
|
@@ -92293,7 +92256,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92293
92256
|
this.event.emit(exports.ChartEvent.scrollBarChange, {
|
|
92294
92257
|
model: this,
|
|
92295
92258
|
value: {
|
|
92296
|
-
filterData: this._filterMode !==
|
|
92259
|
+
filterData: this._filterMode !== 'axis',
|
|
92297
92260
|
start: this._start,
|
|
92298
92261
|
end: this._end,
|
|
92299
92262
|
startValue: this._startValue,
|
|
@@ -92340,12 +92303,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92340
92303
|
Factory.registerComponent(ScrollBar.type, ScrollBar);
|
|
92341
92304
|
};
|
|
92342
92305
|
|
|
92343
|
-
var IFilterMode;
|
|
92344
|
-
(function (IFilterMode) {
|
|
92345
|
-
IFilterMode["filter"] = "filter";
|
|
92346
|
-
IFilterMode["axis"] = "axis";
|
|
92347
|
-
})(IFilterMode || (IFilterMode = {}));
|
|
92348
|
-
|
|
92349
92306
|
const indicatorMapper = (data, op) => {
|
|
92350
92307
|
const { datum, title, content } = op;
|
|
92351
92308
|
const mappedData = [];
|
|
@@ -93784,7 +93741,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93784
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 : {});
|
|
93785
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 : {});
|
|
93786
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 : {});
|
|
93787
|
-
|
|
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;
|
|
93788
93750
|
};
|
|
93789
93751
|
const transformContinuousSpecToAttrs = (spec, data) => (Object.assign(Object.assign({}, transformToAttrs(spec)), { data, type: 'continuous' }));
|
|
93790
93752
|
const transformDiscreteSpecToAttrs = (spec, data) => (Object.assign(Object.assign({}, transformToAttrs(spec)), { data, type: 'discrete' }));
|
|
@@ -93863,7 +93825,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93863
93825
|
this._playerComponent.play();
|
|
93864
93826
|
}
|
|
93865
93827
|
});
|
|
93866
|
-
this._playerComponent.addEventListener(PlayerEventEnum.
|
|
93828
|
+
this._playerComponent.addEventListener(PlayerEventEnum.end, () => {
|
|
93867
93829
|
var _a;
|
|
93868
93830
|
this.event.emit(exports.ChartEvent.playerEnd, { model: this });
|
|
93869
93831
|
if (this._alternate && this._spec.type === 'discrete') {
|
|
@@ -93877,7 +93839,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93877
93839
|
this._playerComponent.play();
|
|
93878
93840
|
}
|
|
93879
93841
|
});
|
|
93880
|
-
this._playerComponent.addEventListener(PlayerEventEnum.
|
|
93842
|
+
this._playerComponent.addEventListener(PlayerEventEnum.change, (e) => {
|
|
93881
93843
|
const { index } = e.detail;
|
|
93882
93844
|
const spec = this._specs[index];
|
|
93883
93845
|
array(spec.data).forEach(data => {
|
|
@@ -93893,7 +93855,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93893
93855
|
}
|
|
93894
93856
|
});
|
|
93895
93857
|
});
|
|
93896
|
-
this._playerComponent.addEventListener(PlayerEventEnum.
|
|
93858
|
+
this._playerComponent.addEventListener(PlayerEventEnum.backward, (e) => {
|
|
93897
93859
|
const { index } = e.detail;
|
|
93898
93860
|
const spec = this._specs[index];
|
|
93899
93861
|
this.event.emit(exports.ChartEvent.playerBackward, {
|
|
@@ -93905,7 +93867,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93905
93867
|
}
|
|
93906
93868
|
});
|
|
93907
93869
|
});
|
|
93908
|
-
this._playerComponent.addEventListener(PlayerEventEnum.
|
|
93870
|
+
this._playerComponent.addEventListener(PlayerEventEnum.forward, (e) => {
|
|
93909
93871
|
const { index } = e.detail;
|
|
93910
93872
|
const spec = this._specs[index];
|
|
93911
93873
|
this.event.emit(exports.ChartEvent.playerForward, {
|
|
@@ -93917,7 +93879,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93917
93879
|
}
|
|
93918
93880
|
});
|
|
93919
93881
|
});
|
|
93920
|
-
this._playerComponent.addEventListener(PlayerEventEnum.
|
|
93882
|
+
this._playerComponent.addEventListener(PlayerEventEnum.play, (e) => {
|
|
93921
93883
|
const { index } = e.detail;
|
|
93922
93884
|
const spec = this._specs[index];
|
|
93923
93885
|
this.event.emit(exports.ChartEvent.playerPlay, {
|
|
@@ -93929,7 +93891,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93929
93891
|
}
|
|
93930
93892
|
});
|
|
93931
93893
|
});
|
|
93932
|
-
this._playerComponent.addEventListener(PlayerEventEnum.
|
|
93894
|
+
this._playerComponent.addEventListener(PlayerEventEnum.pause, (e) => {
|
|
93933
93895
|
const { index } = e.detail;
|
|
93934
93896
|
const spec = this._specs[index];
|
|
93935
93897
|
this.event.emit(exports.ChartEvent.playerPause, {
|
|
@@ -93951,7 +93913,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93951
93913
|
}
|
|
93952
93914
|
static getSpecInfo(chartSpec) {
|
|
93953
93915
|
const playerSpec = chartSpec[this.specKey];
|
|
93954
|
-
if (isNil$3(playerSpec)
|
|
93916
|
+
if (isNil$3(playerSpec)) {
|
|
93955
93917
|
return null;
|
|
93956
93918
|
}
|
|
93957
93919
|
return [
|
|
@@ -93964,7 +93926,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93964
93926
|
];
|
|
93965
93927
|
}
|
|
93966
93928
|
setAttrFromSpec() {
|
|
93967
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
93929
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
93968
93930
|
super.setAttrFromSpec();
|
|
93969
93931
|
this._orient = (_a = this._spec.orient) !== null && _a !== void 0 ? _a : 'bottom';
|
|
93970
93932
|
this._specs = (_b = this._spec.specs) !== null && _b !== void 0 ? _b : [];
|
|
@@ -93973,6 +93935,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93973
93935
|
this._dx = (_e = this._spec.dx) !== null && _e !== void 0 ? _e : 0;
|
|
93974
93936
|
this._dy = (_f = this._spec.dy) !== null && _f !== void 0 ? _f : 0;
|
|
93975
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;
|
|
93976
93939
|
}
|
|
93977
93940
|
afterSetLayoutStartPoint(pos) {
|
|
93978
93941
|
super.afterSetLayoutStartPoint(pos);
|
|
@@ -94002,6 +93965,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
94002
93965
|
return [this._playerComponent];
|
|
94003
93966
|
}
|
|
94004
93967
|
_computeLayoutRect(rect, width, height) {
|
|
93968
|
+
if (this._visible === false) {
|
|
93969
|
+
return { x1: 0, x2: 0, y1: 0, y2: 0 };
|
|
93970
|
+
}
|
|
94005
93971
|
switch (this._orient) {
|
|
94006
93972
|
case 'top': {
|
|
94007
93973
|
return { x1: 0, y1: 0, x2: width, y2: height };
|