@visactor/vstory 0.0.16 → 0.0.18
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/dist/index.js +933 -113
- package/dist/index.min.js +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -7274,7 +7274,8 @@
|
|
|
7274
7274
|
justifyContent: "flex-start",
|
|
7275
7275
|
alignItems: "flex-start",
|
|
7276
7276
|
alignContent: "flex-start",
|
|
7277
|
-
baseOpacity: 1
|
|
7277
|
+
baseOpacity: 1,
|
|
7278
|
+
cornerType: "round"
|
|
7278
7279
|
});
|
|
7279
7280
|
var DefaultGlyphAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
|
|
7280
7281
|
path: "",
|
|
@@ -7311,7 +7312,8 @@
|
|
|
7311
7312
|
x1: 0,
|
|
7312
7313
|
y1: 0,
|
|
7313
7314
|
strokeBoundsBuffer: 0,
|
|
7314
|
-
cornerRadius: 0
|
|
7315
|
+
cornerRadius: 0,
|
|
7316
|
+
cornerType: "round"
|
|
7315
7317
|
});
|
|
7316
7318
|
Object.assign(Object.assign({}, DefaultAttribute), {
|
|
7317
7319
|
width: 0,
|
|
@@ -7319,7 +7321,8 @@
|
|
|
7319
7321
|
x1: 0,
|
|
7320
7322
|
y1: 0,
|
|
7321
7323
|
cornerRadius: 0,
|
|
7322
|
-
length: 0
|
|
7324
|
+
length: 0,
|
|
7325
|
+
cornerType: "round"
|
|
7323
7326
|
});
|
|
7324
7327
|
var DefaultSymbolAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
|
|
7325
7328
|
symbolType: "circle",
|
|
@@ -7355,7 +7358,8 @@
|
|
|
7355
7358
|
height: 0
|
|
7356
7359
|
}, DefaultAttribute), {
|
|
7357
7360
|
fill: !0,
|
|
7358
|
-
cornerRadius: 0
|
|
7361
|
+
cornerRadius: 0,
|
|
7362
|
+
cornerType: "round"
|
|
7359
7363
|
});
|
|
7360
7364
|
var DefaultRichTextIconAttribute = Object.assign(Object.assign({}, DefaultImageAttribute), {
|
|
7361
7365
|
backgroundShowMode: "never",
|
|
@@ -10699,6 +10703,13 @@
|
|
|
10699
10703
|
}
|
|
10700
10704
|
}]);
|
|
10701
10705
|
}();
|
|
10706
|
+
function flicker$1(t, n) {
|
|
10707
|
+
var step = 1 / n;
|
|
10708
|
+
var flag = 1;
|
|
10709
|
+
for (; t > step;) t -= step, flag *= -1;
|
|
10710
|
+
var v = flag * t / step;
|
|
10711
|
+
return v > 0 ? v : 1 + v;
|
|
10712
|
+
}
|
|
10702
10713
|
Easing.quadIn = Easing.getPowIn(2), Easing.quadOut = Easing.getPowOut(2), Easing.quadInOut = Easing.getPowInOut(2), Easing.cubicIn = Easing.getPowIn(3), Easing.cubicOut = Easing.getPowOut(3), Easing.cubicInOut = Easing.getPowInOut(3), Easing.quartIn = Easing.getPowIn(4), Easing.quartOut = Easing.getPowOut(4), Easing.quartInOut = Easing.getPowInOut(4), Easing.quintIn = Easing.getPowIn(5), Easing.quintOut = Easing.getPowOut(5), Easing.quintInOut = Easing.getPowInOut(5), Easing.backIn = Easing.getBackIn(1.7), Easing.backOut = Easing.getBackOut(1.7), Easing.backInOut = Easing.getBackInOut(1.7), Easing.elasticIn = Easing.getElasticIn(1, .3), Easing.elasticOut = Easing.getElasticOut(1, .3), Easing.elasticInOut = Easing.getElasticInOut(1, .3 * 1.5), Easing.easeInOutQuad = function (t) {
|
|
10703
10714
|
return (t /= .5) < 1 ? .5 * Math.pow(t, 2) : -.5 * ((t -= 2) * t - 2);
|
|
10704
10715
|
}, Easing.easeOutElastic = function (x) {
|
|
@@ -10708,6 +10719,22 @@
|
|
|
10708
10719
|
var c5 = 2 * Math.PI / 4.5;
|
|
10709
10720
|
return 0 === x ? 0 : 1 === x ? 1 : x < .5 ? -Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * c5) / 2 : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * c5) / 2 + 1;
|
|
10710
10721
|
};
|
|
10722
|
+
var _loop = function _loop(i) {
|
|
10723
|
+
Easing["flicker".concat(i)] = function (t) {
|
|
10724
|
+
return flicker$1(t, i);
|
|
10725
|
+
};
|
|
10726
|
+
};
|
|
10727
|
+
for (var i$1 = 0; i$1 < 10; i$1++) {
|
|
10728
|
+
_loop(i$1);
|
|
10729
|
+
}
|
|
10730
|
+
var _loop2 = function _loop2(_i) {
|
|
10731
|
+
Easing["aIn".concat(_i)] = function (t) {
|
|
10732
|
+
return _i * t * t + (1 - _i) * t;
|
|
10733
|
+
};
|
|
10734
|
+
};
|
|
10735
|
+
for (var _i = 2; _i < 10; _i++) {
|
|
10736
|
+
_loop2(_i);
|
|
10737
|
+
}
|
|
10711
10738
|
|
|
10712
10739
|
var DefaultTimeline = /*#__PURE__*/function () {
|
|
10713
10740
|
function DefaultTimeline() {
|
|
@@ -11465,6 +11492,54 @@
|
|
|
11465
11492
|
!function (Direction) {
|
|
11466
11493
|
Direction[Direction.LEFT_TO_RIGHT = 0] = "LEFT_TO_RIGHT", Direction[Direction.RIGHT_TO_LEFT = 1] = "RIGHT_TO_LEFT", Direction[Direction.TOP_TO_BOTTOM = 2] = "TOP_TO_BOTTOM", Direction[Direction.BOTTOM_TO_TOP = 3] = "BOTTOM_TO_TOP", Direction[Direction.STROKE = 4] = "STROKE";
|
|
11467
11494
|
}(Direction$1 || (Direction$1 = {}));
|
|
11495
|
+
var InputText = /*#__PURE__*/function (_ACustomAnimate3) {
|
|
11496
|
+
function InputText() {
|
|
11497
|
+
var _this2;
|
|
11498
|
+
_classCallCheck(this, InputText);
|
|
11499
|
+
_this2 = _callSuper(this, InputText, arguments), _this2.fromText = "", _this2.toText = "";
|
|
11500
|
+
return _this2;
|
|
11501
|
+
}
|
|
11502
|
+
_inherits(InputText, _ACustomAnimate3);
|
|
11503
|
+
return _createClass(InputText, [{
|
|
11504
|
+
key: "getEndProps",
|
|
11505
|
+
value: function getEndProps() {
|
|
11506
|
+
return !1 === this.valid ? {} : {
|
|
11507
|
+
text: this.to
|
|
11508
|
+
};
|
|
11509
|
+
}
|
|
11510
|
+
}, {
|
|
11511
|
+
key: "onBind",
|
|
11512
|
+
value: function onBind() {
|
|
11513
|
+
var _a, _b, _c;
|
|
11514
|
+
this.fromText = null !== (_b = null === (_a = this.from) || void 0 === _a ? void 0 : _a.text) && void 0 !== _b ? _b : "", this.toText = (null === (_c = this.to) || void 0 === _c ? void 0 : _c.text) || "", (!this.toText || isArray$3(this.toText) && 0 === this.toText.length) && (this.valid = !1), isArray$3(this.toText) && (this.toText = this.toText.map(function (item) {
|
|
11515
|
+
return (item || "").toString();
|
|
11516
|
+
}));
|
|
11517
|
+
}
|
|
11518
|
+
}, {
|
|
11519
|
+
key: "onEnd",
|
|
11520
|
+
value: function onEnd() {
|
|
11521
|
+
this.target.detachShadow();
|
|
11522
|
+
}
|
|
11523
|
+
}, {
|
|
11524
|
+
key: "onUpdate",
|
|
11525
|
+
value: function onUpdate(end, ratio, out) {
|
|
11526
|
+
if (!1 === this.valid) return;
|
|
11527
|
+
var fromCount = this.fromText.length,
|
|
11528
|
+
toTextIsArray = isArray$3(this.toText),
|
|
11529
|
+
toCount = toTextIsArray ? this.toText.reduce(function (c, t) {
|
|
11530
|
+
return c + (t || "").length;
|
|
11531
|
+
}, 0) : this.toText.length,
|
|
11532
|
+
count = Math.ceil(fromCount + (toCount - fromCount) * ratio);
|
|
11533
|
+
if (toTextIsArray) {
|
|
11534
|
+
out.text = [];
|
|
11535
|
+
var len = 0;
|
|
11536
|
+
this.toText.forEach(function (t) {
|
|
11537
|
+
len + t.length > count ? (out.text.push(t.substr(0, count - len)), len = count) : (out.text.push(t), len += t.length);
|
|
11538
|
+
});
|
|
11539
|
+
} else out.text = this.toText.substr(0, count);
|
|
11540
|
+
}
|
|
11541
|
+
}]);
|
|
11542
|
+
}(ACustomAnimate);
|
|
11468
11543
|
var TagPointsUpdate = /*#__PURE__*/function (_ACustomAnimate7) {
|
|
11469
11544
|
function TagPointsUpdate(from, to, duration, easing, params) {
|
|
11470
11545
|
var _this6;
|
|
@@ -12923,6 +12998,20 @@
|
|
|
12923
12998
|
});
|
|
12924
12999
|
return _color2 && (nextAttributes[key] = _color2), !0;
|
|
12925
13000
|
}
|
|
13001
|
+
if (Array.isArray(nextStepVal) && nextStepVal.length === lastStepVal.length) {
|
|
13002
|
+
var nextList = [];
|
|
13003
|
+
var valid = !0;
|
|
13004
|
+
for (var i = 0; i < nextStepVal.length; i++) {
|
|
13005
|
+
var v = lastStepVal[i],
|
|
13006
|
+
val = v + (nextStepVal[i] - v) * ratio;
|
|
13007
|
+
if (!Number.isFinite(val)) {
|
|
13008
|
+
valid = !1;
|
|
13009
|
+
break;
|
|
13010
|
+
}
|
|
13011
|
+
nextList.push(val);
|
|
13012
|
+
}
|
|
13013
|
+
valid && (nextAttributes[key] = nextList);
|
|
13014
|
+
}
|
|
12926
13015
|
return !1;
|
|
12927
13016
|
}
|
|
12928
13017
|
}, {
|
|
@@ -19358,7 +19447,7 @@
|
|
|
19358
19447
|
var defaultGroupBackgroundRenderContribution = new DefaultGroupBackgroundRenderContribution();
|
|
19359
19448
|
|
|
19360
19449
|
var halfPi$1 = pi$1 / 2;
|
|
19361
|
-
function createRectPath(path, x, y, width, height, rectCornerRadius, edgeCb) {
|
|
19450
|
+
function createRectPath(path, x, y, width, height, rectCornerRadius, roundCorner, edgeCb) {
|
|
19362
19451
|
var cornerRadius;
|
|
19363
19452
|
if (width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$3(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs$1(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
|
|
19364
19453
|
var cornerRadiusArr = rectCornerRadius;
|
|
@@ -19393,27 +19482,29 @@
|
|
|
19393
19482
|
rightBottomPoint2 = [rightBottom[0], rightBottom[1] - _cornerRadius[2]],
|
|
19394
19483
|
leftBottomPoint1 = [leftBottom[0] + _cornerRadius[3], leftBottom[1]],
|
|
19395
19484
|
leftBottomPoint2 = [leftBottom[0], leftBottom[1] - _cornerRadius[3]];
|
|
19396
|
-
if (path.moveTo(leftTopPoint1[0], leftTopPoint1[1]),
|
|
19397
|
-
edgeCb && edgeCb[0]
|
|
19398
|
-
|
|
19399
|
-
|
|
19400
|
-
|
|
19401
|
-
|
|
19402
|
-
|
|
19403
|
-
|
|
19404
|
-
|
|
19405
|
-
|
|
19406
|
-
|
|
19407
|
-
|
|
19408
|
-
|
|
19409
|
-
|
|
19410
|
-
|
|
19411
|
-
|
|
19412
|
-
|
|
19413
|
-
|
|
19414
|
-
|
|
19415
|
-
|
|
19416
|
-
|
|
19485
|
+
if (path.moveTo(leftTopPoint1[0], leftTopPoint1[1]), roundCorner) {
|
|
19486
|
+
if (edgeCb && edgeCb[0] ? edgeCb[0](leftTopPoint1[0], leftTopPoint1[1], rightTopPoint1[0], rightTopPoint1[1]) : path.lineTo(rightTopPoint1[0], rightTopPoint1[1]), !arrayEqual(rightTopPoint1, rightTopPoint2)) {
|
|
19487
|
+
edgeCb && edgeCb[0] && path.moveTo(rightTopPoint1[0], rightTopPoint1[1]);
|
|
19488
|
+
var centerX = rightTopPoint1[0],
|
|
19489
|
+
centerY = rightTopPoint1[1] + _cornerRadius[1];
|
|
19490
|
+
path.arc(centerX, centerY, _cornerRadius[1], -halfPi$1, 0, !1);
|
|
19491
|
+
}
|
|
19492
|
+
if (edgeCb && edgeCb[1] ? edgeCb[1](rightTopPoint2[0], rightTopPoint2[1], rightBottomPoint2[0], rightBottomPoint2[1]) : path.lineTo(rightBottomPoint2[0], rightBottomPoint2[1]), !arrayEqual(rightBottomPoint1, rightBottomPoint2)) {
|
|
19493
|
+
var _centerX = rightBottomPoint2[0] - _cornerRadius[2],
|
|
19494
|
+
_centerY = rightBottomPoint2[1];
|
|
19495
|
+
edgeCb && edgeCb[1] && path.moveTo(rightBottomPoint2[0], rightBottomPoint2[1]), path.arc(_centerX, _centerY, _cornerRadius[2], 0, halfPi$1, !1);
|
|
19496
|
+
}
|
|
19497
|
+
if (edgeCb && edgeCb[2] ? edgeCb[2](rightBottomPoint1[0], rightBottomPoint1[1], leftBottomPoint1[0], leftBottomPoint1[1]) : path.lineTo(leftBottomPoint1[0], leftBottomPoint1[1]), !arrayEqual(leftBottomPoint1, leftBottomPoint2)) {
|
|
19498
|
+
var _centerX2 = leftBottomPoint1[0],
|
|
19499
|
+
_centerY2 = leftBottomPoint1[1] - _cornerRadius[3];
|
|
19500
|
+
edgeCb && edgeCb[2] && path.moveTo(leftBottomPoint1[0], leftBottomPoint1[1]), path.arc(_centerX2, _centerY2, _cornerRadius[3], halfPi$1, pi$1, !1);
|
|
19501
|
+
}
|
|
19502
|
+
if (edgeCb && edgeCb[3] ? edgeCb[3](leftBottomPoint2[0], leftBottomPoint2[1], leftTopPoint2[0], leftTopPoint2[1]) : path.lineTo(leftTopPoint2[0], leftTopPoint2[1]), !arrayEqual(leftTopPoint1, leftTopPoint2)) {
|
|
19503
|
+
var _centerX3 = leftTopPoint1[0],
|
|
19504
|
+
_centerY3 = leftTopPoint1[1] + _cornerRadius[0];
|
|
19505
|
+
edgeCb && edgeCb[3] && path.moveTo(leftTopPoint2[0], leftTopPoint2[1]), path.arc(_centerX3, _centerY3, _cornerRadius[0], pi$1, pi$1 + halfPi$1, !1);
|
|
19506
|
+
}
|
|
19507
|
+
} else edgeCb && edgeCb[0] ? edgeCb[0](leftTopPoint1[0], leftTopPoint1[1], rightTopPoint1[0], rightTopPoint1[1]) : path.lineTo(rightTopPoint1[0], rightTopPoint1[1]), edgeCb && edgeCb[1] ? edgeCb[1](rightTopPoint1[0], rightTopPoint1[1], rightBottomPoint1[0], rightBottomPoint1[1]) : path.lineTo(rightBottomPoint1[0], rightBottomPoint1[1]), edgeCb && edgeCb[2] ? edgeCb[2](rightBottomPoint1[0], rightBottomPoint1[1], leftBottomPoint1[0], leftBottomPoint1[1]) : path.lineTo(leftBottomPoint1[0], leftBottomPoint1[1]), edgeCb && edgeCb[2] ? edgeCb[2](leftBottomPoint1[0], leftBottomPoint1[1], leftTopPoint1[0], leftTopPoint1[1]) : path.lineTo(leftTopPoint1[0], leftTopPoint1[1]);
|
|
19417
19508
|
return !edgeCb && path.closePath(), path;
|
|
19418
19509
|
}
|
|
19419
19510
|
|
|
@@ -19441,6 +19532,8 @@
|
|
|
19441
19532
|
var _rect$attribute2 = rect.attribute,
|
|
19442
19533
|
_rect$attribute2$corn = _rect$attribute2.cornerRadius,
|
|
19443
19534
|
cornerRadius = _rect$attribute2$corn === void 0 ? rectAttribute.cornerRadius : _rect$attribute2$corn,
|
|
19535
|
+
_rect$attribute2$corn2 = _rect$attribute2.cornerType,
|
|
19536
|
+
cornerType = _rect$attribute2$corn2 === void 0 ? rectAttribute.cornerType : _rect$attribute2$corn2,
|
|
19444
19537
|
_rect$attribute2$opac = _rect$attribute2.opacity,
|
|
19445
19538
|
opacity = _rect$attribute2$opac === void 0 ? rectAttribute.opacity : _rect$attribute2$opac,
|
|
19446
19539
|
_rect$attribute2$x = _rect$attribute2.x,
|
|
@@ -19470,7 +19563,7 @@
|
|
|
19470
19563
|
dw = 2 * d;
|
|
19471
19564
|
if (0 === cornerRadius || isArray$3(cornerRadius) && cornerRadius.every(function (num) {
|
|
19472
19565
|
return 0 === num;
|
|
19473
|
-
}) ? (context.beginPath(), context.rect(nextX, nextY, width - sign * dw, height - sign * dw)) : (context.beginPath(), createRectPath(context, nextX, nextY, width - sign * dw, height - sign * dw, cornerRadius)), context.setShadowBlendStyle && context.setShadowBlendStyle(rect, rect.attribute, rectAttribute), strokeCb) strokeCb(context, borderStyle, rectAttribute[key]);else if (doStroke) {
|
|
19566
|
+
}) ? (context.beginPath(), context.rect(nextX, nextY, width - sign * dw, height - sign * dw)) : (context.beginPath(), createRectPath(context, nextX, nextY, width - sign * dw, height - sign * dw, cornerRadius, "round" === cornerType)), context.setShadowBlendStyle && context.setShadowBlendStyle(rect, rect.attribute, rectAttribute), strokeCb) strokeCb(context, borderStyle, rectAttribute[key]);else if (doStroke) {
|
|
19474
19567
|
var lastOpacity = rectAttribute[key].opacity;
|
|
19475
19568
|
rectAttribute[key].opacity = opacity, context.setStrokeStyle(rect, borderStyle, (originX - x) / scaleX, (originY - y) / scaleY, rectAttribute[key]), rectAttribute[key].opacity = lastOpacity, context.stroke();
|
|
19476
19569
|
}
|
|
@@ -19514,7 +19607,9 @@
|
|
|
19514
19607
|
_rect$attribute4$stro = _rect$attribute4.stroke,
|
|
19515
19608
|
stroke = _rect$attribute4$stro === void 0 ? groupAttribute.stroke : _rect$attribute4$stro,
|
|
19516
19609
|
_rect$attribute4$corn = _rect$attribute4.cornerRadius,
|
|
19517
|
-
cornerRadius = _rect$attribute4$corn === void 0 ? groupAttribute.cornerRadius : _rect$attribute4$corn
|
|
19610
|
+
cornerRadius = _rect$attribute4$corn === void 0 ? groupAttribute.cornerRadius : _rect$attribute4$corn,
|
|
19611
|
+
_rect$attribute4$corn2 = _rect$attribute4.cornerType,
|
|
19612
|
+
cornerType = _rect$attribute4$corn2 === void 0 ? groupAttribute.cornerType : _rect$attribute4$corn2;
|
|
19518
19613
|
var _rect$attribute5 = rect.attribute,
|
|
19519
19614
|
width = _rect$attribute5.width,
|
|
19520
19615
|
height = _rect$attribute5.height;
|
|
@@ -19526,7 +19621,7 @@
|
|
|
19526
19621
|
}))) {
|
|
19527
19622
|
var lastStroke,
|
|
19528
19623
|
lastStrokeI = 0;
|
|
19529
|
-
return createRectPath(context, x, y, width, height, cornerRadius, new Array(4).fill(0).map(function (_, i) {
|
|
19624
|
+
return createRectPath(context, x, y, width, height, cornerRadius, "round" === cornerType, new Array(4).fill(0).map(function (_, i) {
|
|
19530
19625
|
return function (x1, y1, x2, y2) {
|
|
19531
19626
|
stroke[i] && (lastStrokeI === i - 1 && stroke[i] === lastStroke || (context.setStrokeStyle(rect, Object.assign(Object.assign({}, rect.attribute), {
|
|
19532
19627
|
stroke: stroke[i]
|
|
@@ -19597,7 +19692,7 @@
|
|
|
19597
19692
|
_y = _getActualPosition.y,
|
|
19598
19693
|
width = _getActualPosition.width,
|
|
19599
19694
|
height = _getActualPosition.height;
|
|
19600
|
-
cornerRadius ? createRectPath(context, _x - expandX, _y - expandY, width + 2 * expandX, height + 2 * expandY, cornerRadius) : context.rect(_x - expandX, _y - expandY, width + 2 * expandX, height + 2 * expandY), context.globalAlpha = 1, fill && (context.fillStyle = fill, context.fill()), stroke && lineWidth > 0 && (context.lineWidth = lineWidth, context.strokeStyle = stroke, context.stroke());
|
|
19695
|
+
cornerRadius ? createRectPath(context, _x - expandX, _y - expandY, width + 2 * expandX, height + 2 * expandY, cornerRadius, !0) : context.rect(_x - expandX, _y - expandY, width + 2 * expandX, height + 2 * expandY), context.globalAlpha = 1, fill && (context.fillStyle = fill, context.fill()), stroke && lineWidth > 0 && (context.lineWidth = lineWidth, context.strokeStyle = stroke, context.stroke());
|
|
19601
19696
|
} else {
|
|
19602
19697
|
context.beginPath();
|
|
19603
19698
|
var _b = graphic.AABBBounds;
|
|
@@ -20831,6 +20926,8 @@
|
|
|
20831
20926
|
stroke = _rect$attribute$strok === void 0 ? rectAttribute.stroke : _rect$attribute$strok,
|
|
20832
20927
|
_rect$attribute$corne = _rect$attribute.cornerRadius,
|
|
20833
20928
|
cornerRadius = _rect$attribute$corne === void 0 ? rectAttribute.cornerRadius : _rect$attribute$corne,
|
|
20929
|
+
_rect$attribute$corne2 = _rect$attribute.cornerType,
|
|
20930
|
+
cornerType = _rect$attribute$corne2 === void 0 ? rectAttribute.cornerType : _rect$attribute$corne2,
|
|
20834
20931
|
_rect$attribute$opaci = _rect$attribute.opacity,
|
|
20835
20932
|
opacity = _rect$attribute$opaci === void 0 ? rectAttribute.opacity : _rect$attribute$opaci,
|
|
20836
20933
|
_rect$attribute$fillO = _rect$attribute.fillOpacity,
|
|
@@ -20862,7 +20959,7 @@
|
|
|
20862
20959
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
|
|
20863
20960
|
0 === cornerRadius || isArray$3(cornerRadius) && cornerRadius.every(function (num) {
|
|
20864
20961
|
return 0 === num;
|
|
20865
|
-
}) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius));
|
|
20962
|
+
}) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius, "round" === cornerType));
|
|
20866
20963
|
var doFillOrStroke = {
|
|
20867
20964
|
doFill: doFill,
|
|
20868
20965
|
doStroke: doStroke
|
|
@@ -21070,7 +21167,7 @@
|
|
|
21070
21167
|
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();
|
|
21071
21168
|
} else {
|
|
21072
21169
|
var backgroundCornerRadius = graphic.attribute.backgroundCornerRadius;
|
|
21073
|
-
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();
|
|
21170
|
+
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, !0), context.fill()) : context.fillRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore();
|
|
21074
21171
|
}
|
|
21075
21172
|
shouldReCalBounds && boundsAllocate.free(b), restore();
|
|
21076
21173
|
}
|
|
@@ -21421,6 +21518,8 @@
|
|
|
21421
21518
|
visible = _group$attribute$visi === void 0 ? groupAttribute.visible : _group$attribute$visi,
|
|
21422
21519
|
_group$attribute$fill3 = _group$attribute.fillStrokeOrder,
|
|
21423
21520
|
fillStrokeOrder = _group$attribute$fill3 === void 0 ? groupAttribute.fillStrokeOrder : _group$attribute$fill3,
|
|
21521
|
+
_group$attribute$corn2 = _group$attribute.cornerType,
|
|
21522
|
+
cornerType = _group$attribute$corn2 === void 0 ? groupAttribute.cornerType : _group$attribute$corn2,
|
|
21424
21523
|
_group$attribute$x = _group$attribute.x,
|
|
21425
21524
|
originX = _group$attribute$x === void 0 ? groupAttribute.x : _group$attribute$x,
|
|
21426
21525
|
_group$attribute$y = _group$attribute.y,
|
|
@@ -21443,7 +21542,7 @@
|
|
|
21443
21542
|
}), context.disableFill = disableFill, context.disableStroke = disableStroke, context.disableBeginPath = disableBeginPath;
|
|
21444
21543
|
} else 0 === cornerRadius || isArray$3(cornerRadius) && cornerRadius.every(function (num) {
|
|
21445
21544
|
return 0 === num;
|
|
21446
|
-
}) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius));
|
|
21545
|
+
}) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius, "round" === cornerType));
|
|
21447
21546
|
this._groupRenderContribitions || (this._groupRenderContribitions = this.groupRenderContribitions.getContributions() || [], this._groupRenderContribitions.push(defaultGroupBackgroundRenderContribution));
|
|
21448
21547
|
var doFillOrStroke = {
|
|
21449
21548
|
doFill: doFill,
|
|
@@ -21545,6 +21644,8 @@
|
|
|
21545
21644
|
cornerRadius = _image$attribute$corn === void 0 ? imageAttribute.cornerRadius : _image$attribute$corn,
|
|
21546
21645
|
_image$attribute$fill = _image$attribute.fillStrokeOrder,
|
|
21547
21646
|
fillStrokeOrder = _image$attribute$fill === void 0 ? imageAttribute.fillStrokeOrder : _image$attribute$fill,
|
|
21647
|
+
_image$attribute$corn2 = _image$attribute.cornerType,
|
|
21648
|
+
cornerType = _image$attribute$corn2 === void 0 ? imageAttribute.cornerType : _image$attribute$corn2,
|
|
21548
21649
|
url = _image$attribute.image,
|
|
21549
21650
|
data = this.valid(image, imageAttribute, fillCb);
|
|
21550
21651
|
if (!data) return;
|
|
@@ -21561,7 +21662,7 @@
|
|
|
21561
21662
|
var needRestore = !1;
|
|
21562
21663
|
0 === cornerRadius || isArray$3(cornerRadius) && cornerRadius.every(function (num) {
|
|
21563
21664
|
return 0 === num;
|
|
21564
|
-
}) || (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius), context.save(), context.clip(), needRestore = !0), context.setCommonStyle(image, image.attribute, x, y, imageAttribute);
|
|
21665
|
+
}) || (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius, "round" === cornerType), context.save(), context.clip(), needRestore = !0), context.setCommonStyle(image, image.attribute, x, y, imageAttribute);
|
|
21565
21666
|
var repeat = 0;
|
|
21566
21667
|
if ("repeat" === repeatX && (repeat |= 1), "repeat" === repeatY && (repeat |= 2), repeat) {
|
|
21567
21668
|
var pattern = context.createPattern(res.data, repeatStr[repeat]);
|
|
@@ -24783,7 +24884,7 @@
|
|
|
24783
24884
|
if (margin && (x += icon._marginArray[3], y += icon._marginArray[0]), icon._hovered) {
|
|
24784
24885
|
var expandX = (backgroundWidth - width) / 2,
|
|
24785
24886
|
expandY = (backgroundHeight - height) / 2;
|
|
24786
|
-
0 === backgroundRadius ? (context.beginPath(), context.rect(x - expandX, y - expandY, backgroundWidth, backgroundHeight)) : (context.beginPath(), createRectPath(context, x - expandX, y - expandY, backgroundWidth, backgroundHeight, backgroundRadius)), backgroundFill && (context.globalAlpha = backgroundFillOpacity, context.fillStyle = backgroundFill, context.fill()), backgroundStroke && (context.globalAlpha = backgroundStrokeOpacity, context.strokeStyle = backgroundStroke, context.stroke());
|
|
24887
|
+
0 === backgroundRadius ? (context.beginPath(), context.rect(x - expandX, y - expandY, backgroundWidth, backgroundHeight)) : (context.beginPath(), createRectPath(context, x - expandX, y - expandY, backgroundWidth, backgroundHeight, backgroundRadius, !0)), backgroundFill && (context.globalAlpha = backgroundFillOpacity, context.fillStyle = backgroundFill, context.fill()), backgroundStroke && (context.globalAlpha = backgroundStrokeOpacity, context.strokeStyle = backgroundStroke, context.stroke());
|
|
24787
24888
|
}
|
|
24788
24889
|
var res = url && (null === (_a = null == icon ? void 0 : icon.resources) || void 0 === _a ? void 0 : _a.get(url));
|
|
24789
24890
|
res && "success" === res.state && (context.globalAlpha = opacity, context.drawImage(res.data, x, y, width, height));
|
|
@@ -26793,13 +26894,15 @@
|
|
|
26793
26894
|
lineJoin = _attribute$lineJoin === void 0 ? defaultParams.lineJoin : _attribute$lineJoin,
|
|
26794
26895
|
_attribute$lineDash = attribute.lineDash,
|
|
26795
26896
|
lineDash = _attribute$lineDash === void 0 ? defaultParams.lineDash : _attribute$lineDash,
|
|
26897
|
+
_attribute$lineDashOf = attribute.lineDashOffset,
|
|
26898
|
+
lineDashOffset = _attribute$lineDashOf === void 0 ? defaultParams.lineDashOffset : _attribute$lineDashOf,
|
|
26796
26899
|
_attribute$lineCap = attribute.lineCap,
|
|
26797
26900
|
lineCap = _attribute$lineCap === void 0 ? defaultParams.lineCap : _attribute$lineCap,
|
|
26798
26901
|
_attribute$miterLimit = attribute.miterLimit,
|
|
26799
26902
|
miterLimit = _attribute$miterLimit === void 0 ? defaultParams.miterLimit : _attribute$miterLimit,
|
|
26800
26903
|
_attribute$keepStroke = attribute.keepStrokeScale,
|
|
26801
26904
|
keepStrokeScale = _attribute$keepStroke === void 0 ? defaultParams.keepStrokeScale : _attribute$keepStroke;
|
|
26802
|
-
_context.lineWidth = keepStrokeScale ? lineWidth : getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, lineDash && _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
|
|
26905
|
+
_context.lineWidth = keepStrokeScale ? lineWidth : getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, lineDash && (_context.setLineDash(lineDash), _context.lineDashOffset = lineDashOffset), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
|
|
26803
26906
|
}
|
|
26804
26907
|
}
|
|
26805
26908
|
}, {
|
|
@@ -36894,6 +36997,20 @@
|
|
|
36894
36997
|
};
|
|
36895
36998
|
var _tBounds = new AABBBounds();
|
|
36896
36999
|
loadPoptipComponent();
|
|
37000
|
+
var tlStr = "M -0.5 -0.5, L -0.5 0.5, L 0.5 -0.5, Z",
|
|
37001
|
+
blStr = "M -0.5 -0.5, L -0.5 0.5, L 0.5 0.5, Z",
|
|
37002
|
+
trStr = "M -0.5 -0.5, L 0.5 -0.5, L 0.5 0.5, Z",
|
|
37003
|
+
brStr = "M 0.5 -0.5, L 0.5 0.5, L -0.5 0.5, Z",
|
|
37004
|
+
conciseSymbolMap = {
|
|
37005
|
+
tl: tlStr,
|
|
37006
|
+
tr: trStr,
|
|
37007
|
+
bl: blStr,
|
|
37008
|
+
br: brStr,
|
|
37009
|
+
lt: tlStr,
|
|
37010
|
+
lb: blStr,
|
|
37011
|
+
rt: trStr,
|
|
37012
|
+
rb: brStr
|
|
37013
|
+
};
|
|
36897
37014
|
var PopTip = /*#__PURE__*/function (_AbstractComponent) {
|
|
36898
37015
|
function PopTip(attributes, options) {
|
|
36899
37016
|
var _this;
|
|
@@ -36905,15 +37022,20 @@
|
|
|
36905
37022
|
return _createClass(PopTip, [{
|
|
36906
37023
|
key: "render",
|
|
36907
37024
|
value: function render() {
|
|
36908
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
37025
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
36909
37026
|
var _this$attribute = this.attribute,
|
|
36910
37027
|
_this$attribute$title = _this$attribute.titleStyle,
|
|
36911
37028
|
titleStyle = _this$attribute$title === void 0 ? {} : _this$attribute$title,
|
|
36912
37029
|
position = _this$attribute.position,
|
|
36913
37030
|
_this$attribute$conte = _this$attribute.contentStyle,
|
|
36914
37031
|
contentStyle = _this$attribute$conte === void 0 ? {} : _this$attribute$conte,
|
|
36915
|
-
|
|
36916
|
-
|
|
37032
|
+
panel = _this$attribute.panel,
|
|
37033
|
+
logoSymbol = _this$attribute.logoSymbol,
|
|
37034
|
+
logoText = _this$attribute.logoText,
|
|
37035
|
+
_this$attribute$logoT = _this$attribute.logoTextStyle,
|
|
37036
|
+
logoTextStyle = _this$attribute$logoT === void 0 ? {} : _this$attribute$logoT,
|
|
37037
|
+
_this$attribute$trian = _this$attribute.triangleMode,
|
|
37038
|
+
triangleMode = _this$attribute$trian === void 0 ? "default" : _this$attribute$trian,
|
|
36917
37039
|
_this$attribute$space = _this$attribute.space,
|
|
36918
37040
|
space = _this$attribute$space === void 0 ? 4 : _this$attribute$space,
|
|
36919
37041
|
_this$attribute$minWi = _this$attribute.minWidth,
|
|
@@ -36940,8 +37062,9 @@
|
|
|
36940
37062
|
x: 0,
|
|
36941
37063
|
y: 0,
|
|
36942
37064
|
zIndex: 1
|
|
36943
|
-
}, "group")
|
|
36944
|
-
|
|
37065
|
+
}, "group");
|
|
37066
|
+
this.group = group;
|
|
37067
|
+
var maxLineWidth = maxWidth - parsedPadding[1] - parsedPadding[3],
|
|
36945
37068
|
titleVisible = isValid$3(title) && !1 !== visible,
|
|
36946
37069
|
titleAttrs = Object.assign(Object.assign({
|
|
36947
37070
|
text: isArray$3(title) ? title : [title],
|
|
@@ -36978,13 +37101,24 @@
|
|
|
36978
37101
|
var contentBounds = contentShape.AABBBounds,
|
|
36979
37102
|
contentHeight = contentBounds.height(),
|
|
36980
37103
|
contentWidth = contentBounds.width();
|
|
36981
|
-
contentVisible && (height += contentHeight);
|
|
37104
|
+
contentVisible && (height += contentHeight), this.titleShape = titleShape, this.contentShape = contentShape;
|
|
36982
37105
|
var popTipWidth = max$1(titleWidth + parsedPadding[1] + parsedPadding[3], contentWidth + parsedPadding[1] + parsedPadding[3]);
|
|
36983
37106
|
popTipWidth > maxWidth ? popTipWidth = maxWidth : popTipWidth < minWidth && (popTipWidth = minWidth);
|
|
36984
37107
|
var poptipHeight = parsedPadding[0] + parsedPadding[2] + height;
|
|
36985
37108
|
var bgVisible = panel.visible,
|
|
36986
|
-
|
|
36987
|
-
|
|
37109
|
+
square = panel.square,
|
|
37110
|
+
backgroundStyle = __rest$v(panel, ["visible", "square"]);
|
|
37111
|
+
if (square) {
|
|
37112
|
+
var maxWH = max$1(popTipWidth, poptipHeight);
|
|
37113
|
+
popTipWidth = maxWH;
|
|
37114
|
+
var deltaH = maxWH - poptipHeight;
|
|
37115
|
+
poptipHeight = maxWH, titleShape.setAttributes({
|
|
37116
|
+
dy: deltaH / 2
|
|
37117
|
+
}), contentShape.setAttributes({
|
|
37118
|
+
dy: deltaH / 2
|
|
37119
|
+
});
|
|
37120
|
+
}
|
|
37121
|
+
var symbolSize = null !== (_a = backgroundStyle.size) && void 0 !== _a ? _a : 12,
|
|
36988
37122
|
spaceSize = isArray$3(symbolSize) ? [symbolSize[0] + (null !== (_b = backgroundStyle.space) && void 0 !== _b ? _b : 0), symbolSize[1] + (null !== (_c = backgroundStyle.space) && void 0 !== _c ? _c : 0)] : symbolSize + (null !== (_d = backgroundStyle.space) && void 0 !== _d ? _d : 0),
|
|
36989
37123
|
lineWidth = null !== (_e = backgroundStyle.lineWidth) && void 0 !== _e ? _e : 1,
|
|
36990
37124
|
range = this.stage ? [null !== (_f = this.stage.viewWidth) && void 0 !== _f ? _f : this.stage.width, null !== (_g = this.stage.viewHeight) && void 0 !== _g ? _g : this.stage.height] : void 0;
|
|
@@ -37004,42 +37138,76 @@
|
|
|
37004
37138
|
var maxBBoxI,
|
|
37005
37139
|
maxBBoxSize = -1 / 0;
|
|
37006
37140
|
for (var i = 0; i < this.positionList.length + 1; i++) {
|
|
37007
|
-
var p = layout ? this.positionList[i === this.positionList.length ? maxBBoxI : i] : position
|
|
37008
|
-
|
|
37141
|
+
var p = layout ? this.positionList[i === this.positionList.length ? maxBBoxI : i] : position;
|
|
37142
|
+
var symbolType = "arrow2Left",
|
|
37143
|
+
offsetX = (isArray$3(symbolSize) ? symbolSize[0] : symbolSize) / 4,
|
|
37144
|
+
offsetY = 0;
|
|
37145
|
+
"top" === p || "bottom" === p || "left" === p || "right" === p ? symbolType = "arrow2Left" : "concise" === triangleMode && (symbolType = conciseSymbolMap[p], offsetX = ["tl", "bl", "rt", "rb"].includes(position) ? (isArray$3(symbolSize) ? symbolSize[0] : symbolSize) / 2 : -(isArray$3(symbolSize) ? symbolSize[0] : symbolSize) / 2, offsetY = ["tl", "tr", "lb", "rb"].includes(position) ? -(isArray$3(symbolSize) ? symbolSize[1] : symbolSize) / 2 : (isArray$3(symbolSize) ? symbolSize[1] : symbolSize) / 2);
|
|
37146
|
+
var _this$getAngleAndOffs = this.getAngleAndOffset(p, popTipWidth, poptipHeight, isArray$3(spaceSize) ? spaceSize : [spaceSize, spaceSize - lineWidth], symbolType),
|
|
37009
37147
|
angle = _this$getAngleAndOffs.angle,
|
|
37010
37148
|
offset = _this$getAngleAndOffs.offset;
|
|
37011
|
-
_this$getAngleAndOffs.rectOffset;
|
|
37012
37149
|
if (isBoolean$3(bgVisible)) {
|
|
37013
|
-
var
|
|
37014
|
-
|
|
37015
|
-
|
|
37016
|
-
|
|
37017
|
-
|
|
37018
|
-
|
|
37019
|
-
|
|
37020
|
-
|
|
37021
|
-
|
|
37022
|
-
|
|
37023
|
-
|
|
37024
|
-
|
|
37025
|
-
|
|
37026
|
-
|
|
37027
|
-
|
|
37028
|
-
isEmpty(null == state ? void 0 : state.panel) || (bgSymbol.states = state.panel)
|
|
37029
|
-
|
|
37150
|
+
var bgSymbol = group.createOrUpdateChild("poptip-symbol-panel", Object.assign(Object.assign({}, backgroundStyle), {
|
|
37151
|
+
visible: bgVisible && (contentVisible || titleVisible),
|
|
37152
|
+
x: offsetX,
|
|
37153
|
+
y: offsetY,
|
|
37154
|
+
strokeBoundsBuffer: -1,
|
|
37155
|
+
boundsPadding: -2,
|
|
37156
|
+
anchor: [0, 0],
|
|
37157
|
+
symbolType: symbolType,
|
|
37158
|
+
angle: angle,
|
|
37159
|
+
dx: offset[0],
|
|
37160
|
+
dy: offset[1] - (null !== (_j = backgroundStyle.space) && void 0 !== _j ? _j : 0),
|
|
37161
|
+
size: symbolSize,
|
|
37162
|
+
zIndex: 9
|
|
37163
|
+
}), "symbol");
|
|
37164
|
+
var bgRect = void 0;
|
|
37165
|
+
isEmpty(null == state ? void 0 : state.panel) || (bgSymbol.states = state.panel), bgRect = panel.panelSymbolType ? group.createOrUpdateChild("poptip-rect-panel", Object.assign(Object.assign({}, backgroundStyle), {
|
|
37166
|
+
visible: bgVisible && (contentVisible || titleVisible),
|
|
37167
|
+
x: 0,
|
|
37168
|
+
y: 0,
|
|
37169
|
+
symbolType: "rect",
|
|
37170
|
+
size: [popTipWidth, poptipHeight],
|
|
37171
|
+
zIndex: -8
|
|
37172
|
+
}), "symbol") : group.createOrUpdateChild("poptip-rect-panel", Object.assign(Object.assign({}, backgroundStyle), {
|
|
37030
37173
|
visible: bgVisible && (contentVisible || titleVisible),
|
|
37031
37174
|
x: 0,
|
|
37032
37175
|
y: 0,
|
|
37033
37176
|
width: popTipWidth,
|
|
37034
37177
|
height: poptipHeight,
|
|
37035
37178
|
zIndex: -8
|
|
37036
|
-
}), "rect");
|
|
37037
|
-
isEmpty(null == state ? void 0 : state.panel) || (bgRect.states = state.panel);
|
|
37179
|
+
}), "rect"), isEmpty(null == state ? void 0 : state.panel) || (bgRect.states = state.panel);
|
|
37038
37180
|
}
|
|
37039
37181
|
if (group.setAttributes({
|
|
37040
37182
|
x: -offset[0] + dx,
|
|
37041
|
-
y: -offset[1] + dy
|
|
37042
|
-
|
|
37183
|
+
y: -offset[1] + dy,
|
|
37184
|
+
anchor: [offsetX, offsetY]
|
|
37185
|
+
}), logoSymbol) {
|
|
37186
|
+
var _logoSymbol$size = logoSymbol.size,
|
|
37187
|
+
size = _logoSymbol$size === void 0 ? 12 : _logoSymbol$size,
|
|
37188
|
+
sizeArray = isArray$3(size) ? size : [size, size];
|
|
37189
|
+
"auto" === sizeArray[1] && (sizeArray[1] = poptipHeight), "auto" === sizeArray[0] && (sizeArray[0] = poptipHeight);
|
|
37190
|
+
var sizeW = sizeArray[0];
|
|
37191
|
+
group.createOrUpdateChild("poptip-logo", Object.assign(Object.assign({}, logoSymbol), {
|
|
37192
|
+
x: 0,
|
|
37193
|
+
y: poptipHeight / 2,
|
|
37194
|
+
visible: bgVisible && (contentVisible || titleVisible),
|
|
37195
|
+
zIndex: 10,
|
|
37196
|
+
size: sizeArray
|
|
37197
|
+
}), "symbol"), group.setAttributes({
|
|
37198
|
+
x: -offset[0] + dx + sizeW / 2,
|
|
37199
|
+
y: -offset[1] + dy
|
|
37200
|
+
}), logoText && group.createOrUpdateChild("poptip-logo-text", Object.assign(Object.assign({}, logoTextStyle), {
|
|
37201
|
+
x: 0,
|
|
37202
|
+
y: poptipHeight / 2,
|
|
37203
|
+
visible: bgVisible && (contentVisible || titleVisible),
|
|
37204
|
+
text: logoText,
|
|
37205
|
+
textAlign: "center",
|
|
37206
|
+
textBaseline: "middle",
|
|
37207
|
+
zIndex: 10
|
|
37208
|
+
}), "text");
|
|
37209
|
+
}
|
|
37210
|
+
if (!layout || !range) break;
|
|
37043
37211
|
{
|
|
37044
37212
|
_tBounds.setValue(0, 0, popTipWidth, poptipHeight).transformWithMatrix(group.globalTransMatrix);
|
|
37045
37213
|
var _b2 = _tBounds,
|
|
@@ -37047,91 +37215,125 @@
|
|
|
37047
37215
|
if (rectInsideAnotherRect(_b2, stageBounds, !1)) break;
|
|
37048
37216
|
{
|
|
37049
37217
|
var bbox = getRectIntersect(_b2, stageBounds, !1),
|
|
37050
|
-
|
|
37051
|
-
|
|
37218
|
+
_size = (bbox.x2 - bbox.x1) * (bbox.y2 - bbox.y1);
|
|
37219
|
+
_size > maxBBoxSize && (maxBBoxSize = _size, maxBBoxI = i);
|
|
37052
37220
|
}
|
|
37053
37221
|
}
|
|
37054
37222
|
}
|
|
37055
37223
|
}
|
|
37056
37224
|
}, {
|
|
37057
37225
|
key: "getAngleAndOffset",
|
|
37058
|
-
value: function getAngleAndOffset(position, width, height, size) {
|
|
37059
|
-
var sizeH = size[1] / 2;
|
|
37226
|
+
value: function getAngleAndOffset(position, width, height, size, symbolType) {
|
|
37227
|
+
var sizeH = "arrow2Left" === symbolType ? size[1] / 2 : size[1];
|
|
37060
37228
|
switch (position) {
|
|
37061
37229
|
case "tl":
|
|
37062
37230
|
return {
|
|
37063
|
-
angle: pi$1 / 2 * 3,
|
|
37064
|
-
offset: [width / 4, height + sizeH],
|
|
37065
|
-
rectOffset: [-width / 4, -height - size[1]]
|
|
37231
|
+
angle: "arrow2Left" === symbolType ? pi$1 / 2 * 3 : 0,
|
|
37232
|
+
offset: "arrow2Left" === symbolType ? [width / 4, height + sizeH] : [0, height + sizeH]
|
|
37066
37233
|
};
|
|
37067
37234
|
case "top":
|
|
37068
37235
|
return {
|
|
37069
37236
|
angle: pi$1 / 2 * 3,
|
|
37070
|
-
offset: [width / 2, height + sizeH]
|
|
37071
|
-
rectOffset: [0, -height - size[1]]
|
|
37237
|
+
offset: [width / 2, height + sizeH]
|
|
37072
37238
|
};
|
|
37073
37239
|
case "tr":
|
|
37074
37240
|
return {
|
|
37075
|
-
angle: pi$1 / 2 * 3,
|
|
37076
|
-
offset: [width / 4 * 3, height + sizeH],
|
|
37077
|
-
rectOffset: [width / 4 * 3, -height - size[1]]
|
|
37241
|
+
angle: "arrow2Left" === symbolType ? pi$1 / 2 * 3 : 0,
|
|
37242
|
+
offset: "arrow2Left" === symbolType ? [width / 4 * 3, height + sizeH] : [width, height + sizeH]
|
|
37078
37243
|
};
|
|
37079
37244
|
case "rt":
|
|
37080
37245
|
return {
|
|
37081
37246
|
angle: 0,
|
|
37082
|
-
offset: [-sizeH, height / 5],
|
|
37083
|
-
rectOffset: [width / 4 * 3, -height - size[1]]
|
|
37247
|
+
offset: "arrow2Left" === symbolType ? [-sizeH, height / 5] : [-sizeH, 0]
|
|
37084
37248
|
};
|
|
37085
37249
|
case "right":
|
|
37086
37250
|
return {
|
|
37087
37251
|
angle: 0,
|
|
37088
|
-
offset: [-sizeH, height / 2]
|
|
37089
|
-
rectOffset: [width / 4 * 3, -height - size[1]]
|
|
37252
|
+
offset: [-sizeH, height / 2]
|
|
37090
37253
|
};
|
|
37091
37254
|
case "rb":
|
|
37092
37255
|
return {
|
|
37093
37256
|
angle: 0,
|
|
37094
|
-
offset: [-sizeH, height / 5 * 4],
|
|
37095
|
-
rectOffset: [width / 4 * 3, -height - size[1]]
|
|
37257
|
+
offset: "arrow2Left" === symbolType ? [-sizeH, height / 5 * 4] : [-sizeH, height]
|
|
37096
37258
|
};
|
|
37097
37259
|
case "bl":
|
|
37098
37260
|
return {
|
|
37099
|
-
angle: pi$1 / 2,
|
|
37100
|
-
offset: [width / 4, -sizeH],
|
|
37101
|
-
rectOffset: [-width / 4, -height - size[1]]
|
|
37261
|
+
angle: "arrow2Left" === symbolType ? pi$1 / 2 : 0,
|
|
37262
|
+
offset: "arrow2Left" === symbolType ? [width / 4, -sizeH] : [0, -sizeH]
|
|
37102
37263
|
};
|
|
37103
37264
|
case "bottom":
|
|
37104
37265
|
return {
|
|
37105
37266
|
angle: pi$1 / 2,
|
|
37106
|
-
offset: [width / 2, -sizeH]
|
|
37107
|
-
rectOffset: [0, -height - size[1]]
|
|
37267
|
+
offset: [width / 2, -sizeH]
|
|
37108
37268
|
};
|
|
37109
37269
|
case "br":
|
|
37110
37270
|
return {
|
|
37111
|
-
angle: pi$1 / 2,
|
|
37112
|
-
offset: [width / 4 * 3, -sizeH],
|
|
37113
|
-
rectOffset: [width / 4 * 3, -height - size[1]]
|
|
37271
|
+
angle: "arrow2Left" === symbolType ? pi$1 / 2 : 0,
|
|
37272
|
+
offset: "arrow2Left" === symbolType ? [width / 4 * 3, -sizeH] : [width, -sizeH]
|
|
37114
37273
|
};
|
|
37115
37274
|
case "lt":
|
|
37116
37275
|
return {
|
|
37117
|
-
angle: pi$1,
|
|
37118
|
-
offset: [width + sizeH, height / 5],
|
|
37119
|
-
rectOffset: [-width / 4, -height - size[1]]
|
|
37276
|
+
angle: "arrow2Left" === symbolType ? pi$1 : 0,
|
|
37277
|
+
offset: "arrow2Left" === symbolType ? [width + sizeH, height / 5] : [width + sizeH, 0]
|
|
37120
37278
|
};
|
|
37121
37279
|
case "left":
|
|
37122
37280
|
return {
|
|
37123
37281
|
angle: pi$1,
|
|
37124
|
-
offset: [width + sizeH, height / 2]
|
|
37125
|
-
rectOffset: [0, -height - size[1]]
|
|
37282
|
+
offset: [width + sizeH, height / 2]
|
|
37126
37283
|
};
|
|
37127
37284
|
case "lb":
|
|
37128
37285
|
return {
|
|
37129
|
-
angle: pi$1,
|
|
37130
|
-
offset: [width + sizeH, height / 5 * 4],
|
|
37131
|
-
rectOffset: [width / 4 * 3, -height - size[1]]
|
|
37286
|
+
angle: "arrow2Left" === symbolType ? pi$1 : 0,
|
|
37287
|
+
offset: "arrow2Left" === symbolType ? [width + sizeH, height / 5 * 4] : [width + sizeH, height]
|
|
37132
37288
|
};
|
|
37133
37289
|
}
|
|
37134
37290
|
}
|
|
37291
|
+
}, {
|
|
37292
|
+
key: "appearAnimate",
|
|
37293
|
+
value: function appearAnimate(animateConfig) {
|
|
37294
|
+
var _animateConfig$durati = animateConfig.duration,
|
|
37295
|
+
duration = _animateConfig$durati === void 0 ? 1e3 : _animateConfig$durati,
|
|
37296
|
+
_animateConfig$easing = animateConfig.easing,
|
|
37297
|
+
easing = _animateConfig$easing === void 0 ? "quadOut" : _animateConfig$easing;
|
|
37298
|
+
if (this.setAttributes({
|
|
37299
|
+
scaleX: 0,
|
|
37300
|
+
scaleY: 0
|
|
37301
|
+
}), this.animate().to({
|
|
37302
|
+
scaleX: 1,
|
|
37303
|
+
scaleY: 1
|
|
37304
|
+
}, duration / 3 * 2, easing), this.titleShape && this.titleShape.animate().play(new InputText({
|
|
37305
|
+
text: ""
|
|
37306
|
+
}, {
|
|
37307
|
+
text: this.titleShape.attribute.text
|
|
37308
|
+
}, duration, easing)), this.contentShape && this.contentShape.animate().play(new InputText({
|
|
37309
|
+
text: ""
|
|
37310
|
+
}, {
|
|
37311
|
+
text: this.contentShape.attribute.text
|
|
37312
|
+
}, duration, easing)), animateConfig.wave) {
|
|
37313
|
+
var dur = duration / 6;
|
|
37314
|
+
this.group.animate().to({
|
|
37315
|
+
angle: animateConfig.wave
|
|
37316
|
+
}, dur, easing).to({
|
|
37317
|
+
angle: -animateConfig.wave
|
|
37318
|
+
}, 2 * dur, easing).to({
|
|
37319
|
+
angle: animateConfig.wave
|
|
37320
|
+
}, 2 * dur, easing).to({
|
|
37321
|
+
angle: 0
|
|
37322
|
+
}, dur, easing);
|
|
37323
|
+
}
|
|
37324
|
+
}
|
|
37325
|
+
}, {
|
|
37326
|
+
key: "disappearAnimate",
|
|
37327
|
+
value: function disappearAnimate(animateConfig) {
|
|
37328
|
+
var _animateConfig$durati2 = animateConfig.duration,
|
|
37329
|
+
duration = _animateConfig$durati2 === void 0 ? 1e3 : _animateConfig$durati2,
|
|
37330
|
+
_animateConfig$easing2 = animateConfig.easing,
|
|
37331
|
+
easing = _animateConfig$easing2 === void 0 ? "quadOut" : _animateConfig$easing2;
|
|
37332
|
+
this.animate().to({
|
|
37333
|
+
scaleX: 0,
|
|
37334
|
+
scaleY: 0
|
|
37335
|
+
}, duration, easing);
|
|
37336
|
+
}
|
|
37135
37337
|
}]);
|
|
37136
37338
|
}(AbstractComponent);
|
|
37137
37339
|
PopTip.defaultAttributes = {
|
|
@@ -37151,6 +37353,7 @@
|
|
|
37151
37353
|
textAlign: "left",
|
|
37152
37354
|
textBaseline: "top"
|
|
37153
37355
|
},
|
|
37356
|
+
panel: {},
|
|
37154
37357
|
maxWidthPercent: .8,
|
|
37155
37358
|
space: 8,
|
|
37156
37359
|
padding: 10
|
|
@@ -50925,6 +51128,312 @@
|
|
|
50925
51128
|
clipRange: 0
|
|
50926
51129
|
};
|
|
50927
51130
|
|
|
51131
|
+
var StoryLabelItem = /*#__PURE__*/function (_AbstractComponent) {
|
|
51132
|
+
function StoryLabelItem(attributes, options) {
|
|
51133
|
+
_classCallCheck(this, StoryLabelItem);
|
|
51134
|
+
return _callSuper(this, StoryLabelItem, [(null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, StoryLabelItem.defaultAttributes, attributes)]);
|
|
51135
|
+
}
|
|
51136
|
+
_inherits(StoryLabelItem, _AbstractComponent);
|
|
51137
|
+
return _createClass(StoryLabelItem, [{
|
|
51138
|
+
key: "render",
|
|
51139
|
+
value: function render() {
|
|
51140
|
+
var _this$attribute = this.attribute,
|
|
51141
|
+
contentOffsetX = _this$attribute.contentOffsetX,
|
|
51142
|
+
contentOffsetY = _this$attribute.contentOffsetY,
|
|
51143
|
+
lineStyle = _this$attribute.lineStyle,
|
|
51144
|
+
symbolStartStyle = _this$attribute.symbolStartStyle,
|
|
51145
|
+
symbolEndStyle = _this$attribute.symbolEndStyle,
|
|
51146
|
+
symbolStartOuterStyle = _this$attribute.symbolStartOuterStyle,
|
|
51147
|
+
titleTopText = _this$attribute.titleTop,
|
|
51148
|
+
titleBottomText = _this$attribute.titleBottom,
|
|
51149
|
+
titleTopStyle = _this$attribute.titleTopStyle,
|
|
51150
|
+
titleBottomStyle = _this$attribute.titleBottomStyle,
|
|
51151
|
+
titleSpace = _this$attribute.titleSpace,
|
|
51152
|
+
titleTopPanelStyle = _this$attribute.titleTopPanelStyle,
|
|
51153
|
+
titleBottomPanelStyle = _this$attribute.titleBottomPanelStyle,
|
|
51154
|
+
theme = _this$attribute.theme,
|
|
51155
|
+
group = this.createOrUpdateChild("label-item-container", {
|
|
51156
|
+
x: 0,
|
|
51157
|
+
y: 0,
|
|
51158
|
+
zIndex: 1
|
|
51159
|
+
}, "group"),
|
|
51160
|
+
symbolStart = group.createOrUpdateChild("label-item-symbol-start", Object.assign({
|
|
51161
|
+
x: 0,
|
|
51162
|
+
y: 0
|
|
51163
|
+
}, symbolStartStyle), "symbol"),
|
|
51164
|
+
symbolEnd = group.createOrUpdateChild("label-item-symbol-end", Object.assign({
|
|
51165
|
+
x: contentOffsetX,
|
|
51166
|
+
y: contentOffsetY
|
|
51167
|
+
}, symbolEndStyle), "symbol"),
|
|
51168
|
+
symbolStartOut = group.createOrUpdateChild("label-item-symbol-start-out", Object.assign({
|
|
51169
|
+
x: 0,
|
|
51170
|
+
y: 0
|
|
51171
|
+
}, symbolStartOuterStyle), "symbol"),
|
|
51172
|
+
spaceW = titleSpace[0],
|
|
51173
|
+
spaceH = titleSpace[1],
|
|
51174
|
+
titleTopGroup = group.createOrUpdateChild("label-item-title-top-group", {
|
|
51175
|
+
x: contentOffsetX,
|
|
51176
|
+
y: contentOffsetY,
|
|
51177
|
+
clip: !0
|
|
51178
|
+
}, "group"),
|
|
51179
|
+
titleTop = titleTopGroup.createOrUpdateChild("label-item-title-top", Object.assign(Object.assign({
|
|
51180
|
+
x: spaceW,
|
|
51181
|
+
y: -spaceH,
|
|
51182
|
+
text: titleTopText
|
|
51183
|
+
}, titleTopStyle), {
|
|
51184
|
+
textBaseline: "bottom",
|
|
51185
|
+
textAlign: "left",
|
|
51186
|
+
zIndex: 10
|
|
51187
|
+
}), "text"),
|
|
51188
|
+
titleTopBounds = titleTop.AABBBounds;
|
|
51189
|
+
contentOffsetX > 0 && titleTopGroup.setAttributes({
|
|
51190
|
+
x: contentOffsetX - titleTopBounds.width() - 2 * spaceW
|
|
51191
|
+
}), titleTopGroup.setAttributes({
|
|
51192
|
+
width: titleTopBounds.width() + 2 * spaceW,
|
|
51193
|
+
height: -titleTopBounds.height() - 2 * spaceH
|
|
51194
|
+
});
|
|
51195
|
+
var titleTopPanel = titleTopGroup.createOrUpdateChild("label-item-title-top-panel", Object.assign(Object.assign({}, titleTopPanelStyle), {
|
|
51196
|
+
x: titleTopPanelStyle.padding.left,
|
|
51197
|
+
y: (titleTopGroup.attribute.height > 0 ? 0 : titleTopGroup.attribute.height) + titleTopPanelStyle.padding.top,
|
|
51198
|
+
width: titleTopGroup.attribute.width - titleTopPanelStyle.padding.left - titleTopPanelStyle.padding.right,
|
|
51199
|
+
height: (titleTopGroup.attribute.height > 0 ? 1 : -1) * titleTopGroup.attribute.height - titleTopPanelStyle.padding.bottom - titleTopPanelStyle.padding.top,
|
|
51200
|
+
scaleCenter: [titleTopGroup.attribute.width / 2, titleTopGroup.attribute.height / 2]
|
|
51201
|
+
}), "rect");
|
|
51202
|
+
this._titleTopPanel = titleTopPanel;
|
|
51203
|
+
var titleBottomGroup = group.createOrUpdateChild("label-item-title-bottom-group", {
|
|
51204
|
+
x: contentOffsetX,
|
|
51205
|
+
y: contentOffsetY,
|
|
51206
|
+
clip: !0
|
|
51207
|
+
}, "group"),
|
|
51208
|
+
titleBottom = titleBottomGroup.createOrUpdateChild("label-item-title-bottom", Object.assign(Object.assign({
|
|
51209
|
+
x: spaceW,
|
|
51210
|
+
y: spaceH,
|
|
51211
|
+
text: titleBottomText
|
|
51212
|
+
}, titleBottomStyle), {
|
|
51213
|
+
textBaseline: "top",
|
|
51214
|
+
textAlign: "left",
|
|
51215
|
+
zIndex: 10
|
|
51216
|
+
}), "text"),
|
|
51217
|
+
titleBottomBounds = titleBottom.AABBBounds;
|
|
51218
|
+
contentOffsetX > 0 && titleBottomGroup.setAttributes({
|
|
51219
|
+
x: contentOffsetX - titleBottomBounds.width() - 2 * spaceW
|
|
51220
|
+
}), titleBottomGroup.setAttributes({
|
|
51221
|
+
width: titleBottomBounds.width() + 2 * spaceW,
|
|
51222
|
+
height: titleTopBounds.height() + 2 * spaceH
|
|
51223
|
+
});
|
|
51224
|
+
var titleBottomPanel = titleBottomGroup.createOrUpdateChild("label-item-title-bottom-panel", Object.assign(Object.assign({}, titleBottomPanelStyle), {
|
|
51225
|
+
x: titleBottomPanelStyle.padding.left,
|
|
51226
|
+
y: (titleBottomGroup.attribute.height > 0 ? 0 : titleBottomGroup.attribute.height) + titleBottomPanelStyle.padding.top,
|
|
51227
|
+
width: titleBottomGroup.attribute.width - titleBottomPanelStyle.padding.left - titleBottomPanelStyle.padding.right,
|
|
51228
|
+
height: (titleBottomGroup.attribute.height > 0 ? 1 : -1) * titleBottomGroup.attribute.height - titleBottomPanelStyle.padding.bottom - titleBottomPanelStyle.padding.top,
|
|
51229
|
+
scaleCenter: [titleBottomGroup.attribute.width / 2, titleBottomGroup.attribute.height / 2]
|
|
51230
|
+
}), "rect");
|
|
51231
|
+
this._titleBottomPanel = titleBottomPanel;
|
|
51232
|
+
var maxTextWidth = Math.max(titleTop.AABBBounds.width(), titleBottom.AABBBounds.width()) + 2 * spaceW,
|
|
51233
|
+
points = [{
|
|
51234
|
+
x: 0,
|
|
51235
|
+
y: 0
|
|
51236
|
+
}, contentOffsetX > 0 ? {
|
|
51237
|
+
x: contentOffsetX - maxTextWidth,
|
|
51238
|
+
y: contentOffsetY
|
|
51239
|
+
} : {
|
|
51240
|
+
x: contentOffsetX + maxTextWidth,
|
|
51241
|
+
y: contentOffsetY
|
|
51242
|
+
}, {
|
|
51243
|
+
x: contentOffsetX,
|
|
51244
|
+
y: contentOffsetY
|
|
51245
|
+
}];
|
|
51246
|
+
if ("simple" === theme) {
|
|
51247
|
+
points.pop();
|
|
51248
|
+
var p = points[1];
|
|
51249
|
+
symbolEnd.setAttributes(p);
|
|
51250
|
+
}
|
|
51251
|
+
var line = group.createOrUpdateChild("label-item-line", Object.assign(Object.assign({
|
|
51252
|
+
x: 0,
|
|
51253
|
+
y: 0
|
|
51254
|
+
}, lineStyle), {
|
|
51255
|
+
points: points
|
|
51256
|
+
}), "line");
|
|
51257
|
+
this._symbolEnd = symbolEnd, this._symbolStart = symbolStart, this._symbolStartOuter = symbolStartOut, this._titleTop = titleTop, this._titleBottom = titleBottom, this._line = line;
|
|
51258
|
+
}
|
|
51259
|
+
}, {
|
|
51260
|
+
key: "appearAnimate",
|
|
51261
|
+
value: function appearAnimate(animateConfig) {
|
|
51262
|
+
var _animateConfig$durati = animateConfig.duration,
|
|
51263
|
+
duration = _animateConfig$durati === void 0 ? 1e3 : _animateConfig$durati,
|
|
51264
|
+
_animateConfig$easing = animateConfig.easing,
|
|
51265
|
+
easing = _animateConfig$easing === void 0 ? "quadOut" : _animateConfig$easing,
|
|
51266
|
+
_animateConfig$symbol = animateConfig.symbolStartOuterType,
|
|
51267
|
+
symbolStartOuterType = _animateConfig$symbol === void 0 ? "scale" : _animateConfig$symbol,
|
|
51268
|
+
_animateConfig$titleT = animateConfig.titleType,
|
|
51269
|
+
titleType = _animateConfig$titleT === void 0 ? "typewriter" : _animateConfig$titleT,
|
|
51270
|
+
_animateConfig$titleP = animateConfig.titlePanelType,
|
|
51271
|
+
titlePanelType = _animateConfig$titleP === void 0 ? "scale" : _animateConfig$titleP,
|
|
51272
|
+
symbolTime = duration / 10;
|
|
51273
|
+
var symbolStartOuterFrom, symbolStartOuterTo;
|
|
51274
|
+
if (this._symbolStart.setAttributes({
|
|
51275
|
+
scaleX: 0,
|
|
51276
|
+
scaleY: 0
|
|
51277
|
+
}), this._symbolStart.animate().to({
|
|
51278
|
+
scaleX: 1,
|
|
51279
|
+
scaleY: 1
|
|
51280
|
+
}, 5 * symbolTime, easing), "scale" === symbolStartOuterType ? (symbolStartOuterFrom = {
|
|
51281
|
+
scaleX: 0,
|
|
51282
|
+
scaleY: 0
|
|
51283
|
+
}, symbolStartOuterTo = {
|
|
51284
|
+
scaleX: 1,
|
|
51285
|
+
scaleY: 1
|
|
51286
|
+
}) : (symbolStartOuterFrom = {
|
|
51287
|
+
clipRange: 0
|
|
51288
|
+
}, symbolStartOuterTo = {
|
|
51289
|
+
clipRange: 1
|
|
51290
|
+
}), this._symbolStartOuter.setAttributes(symbolStartOuterFrom), this._symbolStartOuter.animate().to(symbolStartOuterTo, 5 * symbolTime, easing), this._symbolEnd.setAttributes({
|
|
51291
|
+
scaleX: 0,
|
|
51292
|
+
scaleY: 0
|
|
51293
|
+
}), this._symbolEnd.animate().wait(8 * symbolTime).to({
|
|
51294
|
+
scaleX: 1,
|
|
51295
|
+
scaleY: 1
|
|
51296
|
+
}, 2 * symbolTime, easing), this._line.setAttributes({
|
|
51297
|
+
clipRange: 0
|
|
51298
|
+
}), this._line.animate().to({
|
|
51299
|
+
clipRange: 1
|
|
51300
|
+
}, 9 * symbolTime, easing), "typewriter" === titleType) {
|
|
51301
|
+
var titleTopText = this._titleTop.attribute.text;
|
|
51302
|
+
this._titleTop.setAttributes({
|
|
51303
|
+
text: ""
|
|
51304
|
+
}), this._titleTop.animate().wait(5 * symbolTime).play(new InputText({
|
|
51305
|
+
text: ""
|
|
51306
|
+
}, {
|
|
51307
|
+
text: titleTopText
|
|
51308
|
+
}, 4 * symbolTime, "linear"));
|
|
51309
|
+
var titleBottomText = this._titleBottom.attribute.text;
|
|
51310
|
+
this._titleBottom.setAttributes({
|
|
51311
|
+
text: ""
|
|
51312
|
+
}), this._titleBottom.animate().wait(5 * symbolTime).play(new InputText({
|
|
51313
|
+
text: ""
|
|
51314
|
+
}, {
|
|
51315
|
+
text: titleBottomText
|
|
51316
|
+
}, 4 * symbolTime, "linear"));
|
|
51317
|
+
} else this._titleTop.setAttributes({
|
|
51318
|
+
dy: this._titleTop.AABBBounds.height() + 10
|
|
51319
|
+
}), this._titleTop.animate().wait(5 * symbolTime).to({
|
|
51320
|
+
dy: 0
|
|
51321
|
+
}, 4 * symbolTime, "linear"), this._titleBottom.setAttributes({
|
|
51322
|
+
dy: -(10 + this._titleBottom.AABBBounds.height())
|
|
51323
|
+
}), this._titleBottom.animate().wait(5 * symbolTime).to({
|
|
51324
|
+
dy: 0
|
|
51325
|
+
}, 4 * symbolTime, "linear");
|
|
51326
|
+
"scale" === titlePanelType ? [this._titleTopPanel, this._titleBottomPanel].forEach(function (panel) {
|
|
51327
|
+
var scaleX = panel.attribute.scaleX;
|
|
51328
|
+
panel.setAttributes({
|
|
51329
|
+
scaleX: 0
|
|
51330
|
+
}), panel.animate().to({
|
|
51331
|
+
scaleX: scaleX
|
|
51332
|
+
}, duration, "circInOut");
|
|
51333
|
+
}) : "stroke" === titlePanelType && [this._titleTopPanel, this._titleBottomPanel].forEach(function (panel) {
|
|
51334
|
+
var b = panel.AABBBounds,
|
|
51335
|
+
totalLen = 2 * (b.width() + b.height());
|
|
51336
|
+
panel.setAttributes({
|
|
51337
|
+
lineDash: [0, 10 * totalLen]
|
|
51338
|
+
}), panel.animate().to({
|
|
51339
|
+
lineDash: [totalLen, 10 * totalLen]
|
|
51340
|
+
}, duration, "quadOut");
|
|
51341
|
+
});
|
|
51342
|
+
}
|
|
51343
|
+
}, {
|
|
51344
|
+
key: "disappearAnimate",
|
|
51345
|
+
value: function disappearAnimate(animateConfig) {
|
|
51346
|
+
if ("scale" === animateConfig.mode) {
|
|
51347
|
+
var _animateConfig$durati2 = animateConfig.duration,
|
|
51348
|
+
duration = _animateConfig$durati2 === void 0 ? 1e3 : _animateConfig$durati2,
|
|
51349
|
+
_animateConfig$easing2 = animateConfig.easing,
|
|
51350
|
+
easing = _animateConfig$easing2 === void 0 ? "quadOut" : _animateConfig$easing2;
|
|
51351
|
+
this.animate().to({
|
|
51352
|
+
scaleX: 0,
|
|
51353
|
+
scaleY: 0
|
|
51354
|
+
}, duration, easing);
|
|
51355
|
+
} else {
|
|
51356
|
+
var _animateConfig$durati3 = animateConfig.duration,
|
|
51357
|
+
_duration = _animateConfig$durati3 === void 0 ? 1e3 : _animateConfig$durati3,
|
|
51358
|
+
_animateConfig$easing3 = animateConfig.easing,
|
|
51359
|
+
_easing = _animateConfig$easing3 === void 0 ? "quadOut" : _animateConfig$easing3;
|
|
51360
|
+
this._line.animate().to({
|
|
51361
|
+
clipRange: 0
|
|
51362
|
+
}, _duration, _easing), this._symbolStart.animate().wait(_duration / 2).to({
|
|
51363
|
+
scaleX: 0,
|
|
51364
|
+
scaleY: 0
|
|
51365
|
+
}, _duration / 2, _easing), this._symbolEnd.animate().to({
|
|
51366
|
+
scaleX: 0,
|
|
51367
|
+
scaleY: 0
|
|
51368
|
+
}, _duration, _easing), this._titleTop.animate().to({
|
|
51369
|
+
dy: this._titleTop.AABBBounds.height() + 10
|
|
51370
|
+
}, _duration / 2, _easing), this._titleBottom.animate().to({
|
|
51371
|
+
dy: -(10 + this._titleBottom.AABBBounds.height())
|
|
51372
|
+
}, _duration / 2, _easing), this._symbolStartOuter.animate().wait(_duration / 2).to({
|
|
51373
|
+
clipRange: 0
|
|
51374
|
+
}, _duration / 2, _easing), this._titleTopPanel.animate().to({
|
|
51375
|
+
scaleX: 0
|
|
51376
|
+
}, _duration, "circInOut"), this._titleBottomPanel.animate().to({
|
|
51377
|
+
scaleX: 0
|
|
51378
|
+
}, _duration, "circInOut");
|
|
51379
|
+
}
|
|
51380
|
+
}
|
|
51381
|
+
}]);
|
|
51382
|
+
}(AbstractComponent);
|
|
51383
|
+
StoryLabelItem.defaultAttributes = {
|
|
51384
|
+
contentOffsetX: 100,
|
|
51385
|
+
contentOffsetY: -60,
|
|
51386
|
+
titleTopStyle: {
|
|
51387
|
+
fontSize: 12,
|
|
51388
|
+
fill: "white"
|
|
51389
|
+
},
|
|
51390
|
+
titleBottomStyle: {
|
|
51391
|
+
fontSize: 12,
|
|
51392
|
+
fill: "white"
|
|
51393
|
+
},
|
|
51394
|
+
lineStyle: {
|
|
51395
|
+
stroke: "white",
|
|
51396
|
+
lineWidth: 1
|
|
51397
|
+
},
|
|
51398
|
+
symbolStartStyle: {
|
|
51399
|
+
symbolType: "circle",
|
|
51400
|
+
size: 3,
|
|
51401
|
+
fill: "white"
|
|
51402
|
+
},
|
|
51403
|
+
symbolEndStyle: {
|
|
51404
|
+
symbolType: "circle",
|
|
51405
|
+
size: 3,
|
|
51406
|
+
fill: "white"
|
|
51407
|
+
},
|
|
51408
|
+
symbolStartOuterStyle: {
|
|
51409
|
+
symbolType: "M0.5,0A0.5,0.5,0,1,1,-0.5,0A0.5,0.5,0,1,1,0.5,0",
|
|
51410
|
+
size: 8,
|
|
51411
|
+
stroke: "white"
|
|
51412
|
+
},
|
|
51413
|
+
titleSpace: [2, 2],
|
|
51414
|
+
titleTopPanelStyle: {
|
|
51415
|
+
visible: !1,
|
|
51416
|
+
padding: {
|
|
51417
|
+
left: 0,
|
|
51418
|
+
right: 0,
|
|
51419
|
+
bottom: 2,
|
|
51420
|
+
top: 2
|
|
51421
|
+
},
|
|
51422
|
+
cornerRadius: 3
|
|
51423
|
+
},
|
|
51424
|
+
titleBottomPanelStyle: {
|
|
51425
|
+
visible: !1,
|
|
51426
|
+
padding: {
|
|
51427
|
+
left: 0,
|
|
51428
|
+
right: 0,
|
|
51429
|
+
bottom: 2,
|
|
51430
|
+
top: 2
|
|
51431
|
+
},
|
|
51432
|
+
cornerRadius: 3
|
|
51433
|
+
},
|
|
51434
|
+
theme: "default"
|
|
51435
|
+
};
|
|
51436
|
+
|
|
50928
51437
|
var isClose = isNumberClose;
|
|
50929
51438
|
function normalizeStartEndAngle(start, end) {
|
|
50930
51439
|
var startAngle = 0,
|
|
@@ -112503,7 +113012,9 @@
|
|
|
112503
113012
|
componentStyle = Object.assign({}, panelStyle);
|
|
112504
113013
|
["x", "y", "dx", "dy", "scaleX", "scaleY", "width", "height"].forEach(function (key) {
|
|
112505
113014
|
key in graphicStyle && (componentStyle[key] = graphicStyle[key], delete graphicStyle[key]);
|
|
112506
|
-
}), component && (component.styleAnimate ? component.styleAnimate(componentStyle, animation) : component.animate().to(componentStyle, duration, easing)), graphic && graphicStyle && (graphic.styleAnimate ? graphic.styleAnimate(graphicStyle, animation) : graphic.animate().to(graphicStyle, duration, easing)), text && textStyle && text.
|
|
113015
|
+
}), component && (component.styleAnimate ? component.styleAnimate(componentStyle, animation) : component.animate().to(componentStyle, duration, easing)), graphic && graphicStyle && (graphic.styleAnimate ? graphic.styleAnimate(graphicStyle, animation) : graphic.animate().to(graphicStyle, duration, easing)), text && textStyle && (textStyle.text && text.attribute.textConfig && (textStyle.textConfig = [Object.assign(Object.assign({}, (text.attribute.textConfig || [])[0]), {
|
|
113016
|
+
text: textStyle.text
|
|
113017
|
+
})]), text.animate().to(textStyle, duration, easing));
|
|
112507
113018
|
}
|
|
112508
113019
|
}]);
|
|
112509
113020
|
}(ActionProcessorItem);
|
|
@@ -113510,7 +114021,7 @@
|
|
|
113510
114021
|
registerTextVisibilityAction();
|
|
113511
114022
|
}
|
|
113512
114023
|
|
|
113513
|
-
var DefaultVisibility$
|
|
114024
|
+
var DefaultVisibility$4 = /*#__PURE__*/function (_BaseVisibility) {
|
|
113514
114025
|
function DefaultVisibility() {
|
|
113515
114026
|
_classCallCheck(this, DefaultVisibility);
|
|
113516
114027
|
return _callSuper(this, DefaultVisibility, arguments);
|
|
@@ -113534,7 +114045,7 @@
|
|
|
113534
114045
|
}
|
|
113535
114046
|
}]);
|
|
113536
114047
|
}(BaseVisibility);
|
|
113537
|
-
var defaultInstance$
|
|
114048
|
+
var defaultInstance$4 = new DefaultVisibility$4();
|
|
113538
114049
|
var TimelineVisibilityActionProcessor = /*#__PURE__*/function (_CommonVisibilityActi) {
|
|
113539
114050
|
function TimelineVisibilityActionProcessor() {
|
|
113540
114051
|
var _this;
|
|
@@ -113548,7 +114059,7 @@
|
|
|
113548
114059
|
value: function getEffectInstance() {
|
|
113549
114060
|
var effect = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "default";
|
|
113550
114061
|
var appear = arguments.length > 1 ? arguments[1] : undefined;
|
|
113551
|
-
return "default" === effect ? defaultInstance$
|
|
114062
|
+
return "default" === effect ? defaultInstance$4 : _superPropGet(TimelineVisibilityActionProcessor, "getEffectInstance", this, 3)([effect, appear]);
|
|
113552
114063
|
}
|
|
113553
114064
|
}]);
|
|
113554
114065
|
}(CommonVisibilityActionProcessor);
|
|
@@ -113613,7 +114124,7 @@
|
|
|
113613
114124
|
registerTimelineVisibilityAction();
|
|
113614
114125
|
}
|
|
113615
114126
|
|
|
113616
|
-
var DefaultVisibility$
|
|
114127
|
+
var DefaultVisibility$3 = /*#__PURE__*/function (_BaseVisibility) {
|
|
113617
114128
|
function DefaultVisibility() {
|
|
113618
114129
|
_classCallCheck(this, DefaultVisibility);
|
|
113619
114130
|
return _callSuper(this, DefaultVisibility, arguments);
|
|
@@ -113640,7 +114151,7 @@
|
|
|
113640
114151
|
}
|
|
113641
114152
|
}]);
|
|
113642
114153
|
}(BaseVisibility);
|
|
113643
|
-
var defaultInstance$
|
|
114154
|
+
var defaultInstance$3 = new DefaultVisibility$3();
|
|
113644
114155
|
var UnitVisibilityActionProcessor = /*#__PURE__*/function (_CommonVisibilityActi) {
|
|
113645
114156
|
function UnitVisibilityActionProcessor() {
|
|
113646
114157
|
var _this;
|
|
@@ -113654,7 +114165,7 @@
|
|
|
113654
114165
|
value: function getEffectInstance() {
|
|
113655
114166
|
var effect = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "default";
|
|
113656
114167
|
var appear = arguments.length > 1 ? arguments[1] : undefined;
|
|
113657
|
-
return "default" === effect ? defaultInstance$
|
|
114168
|
+
return "default" === effect ? defaultInstance$3 : _superPropGet(UnitVisibilityActionProcessor, "getEffectInstance", this, 3)([effect, appear]);
|
|
113658
114169
|
}
|
|
113659
114170
|
}]);
|
|
113660
114171
|
}(CommonVisibilityActionProcessor);
|
|
@@ -113734,7 +114245,7 @@
|
|
|
113734
114245
|
});
|
|
113735
114246
|
}
|
|
113736
114247
|
|
|
113737
|
-
var DEFAULT_SCENE_DURATION =
|
|
114248
|
+
var DEFAULT_SCENE_DURATION = 5e3;
|
|
113738
114249
|
var DEFAULT_ANIMATION_DURATION = 1e3;
|
|
113739
114250
|
var defaultConfig = {
|
|
113740
114251
|
layout: {
|
|
@@ -116535,7 +117046,7 @@
|
|
|
116535
117046
|
StoryFactory.registerCharacter(SinglePieCharacter.type, SinglePieCharacter);
|
|
116536
117047
|
}
|
|
116537
117048
|
|
|
116538
|
-
var DefaultVisibility = /*#__PURE__*/function (_BaseVisibility) {
|
|
117049
|
+
var DefaultVisibility$2 = /*#__PURE__*/function (_BaseVisibility) {
|
|
116539
117050
|
function DefaultVisibility() {
|
|
116540
117051
|
_classCallCheck(this, DefaultVisibility);
|
|
116541
117052
|
return _callSuper(this, DefaultVisibility, arguments);
|
|
@@ -116573,7 +117084,7 @@
|
|
|
116573
117084
|
}
|
|
116574
117085
|
}]);
|
|
116575
117086
|
}(BaseVisibility);
|
|
116576
|
-
var defaultInstance = new DefaultVisibility();
|
|
117087
|
+
var defaultInstance$2 = new DefaultVisibility$2();
|
|
116577
117088
|
var SinglePieVisibilityActionProcessor = /*#__PURE__*/function (_CommonVisibilityActi) {
|
|
116578
117089
|
function SinglePieVisibilityActionProcessor() {
|
|
116579
117090
|
var _this;
|
|
@@ -116585,7 +117096,7 @@
|
|
|
116585
117096
|
return _createClass(SinglePieVisibilityActionProcessor, [{
|
|
116586
117097
|
key: "getEffectInstance",
|
|
116587
117098
|
value: function getEffectInstance(effect, appear) {
|
|
116588
|
-
return "angle" === effect ? defaultInstance : _superPropGet(SinglePieVisibilityActionProcessor, "getEffectInstance", this, 3)([effect, appear]);
|
|
117099
|
+
return "angle" === effect ? defaultInstance$2 : _superPropGet(SinglePieVisibilityActionProcessor, "getEffectInstance", this, 3)([effect, appear]);
|
|
116589
117100
|
}
|
|
116590
117101
|
}]);
|
|
116591
117102
|
}(CommonVisibilityActionProcessor);
|
|
@@ -116703,6 +117214,311 @@
|
|
|
116703
117214
|
registerDynamicLinePlayAction(), registerDynamicLineVisibilityAction();
|
|
116704
117215
|
}
|
|
116705
117216
|
|
|
117217
|
+
var PopTipComponent$1 = /*#__PURE__*/function (_BaseComponentWithTex) {
|
|
117218
|
+
function PopTipComponent(attributes, options) {
|
|
117219
|
+
_classCallCheck(this, PopTipComponent);
|
|
117220
|
+
return _callSuper(this, PopTipComponent, [(null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, PopTipComponent.defaultAttributes, attributes)]);
|
|
117221
|
+
}
|
|
117222
|
+
_inherits(PopTipComponent, _BaseComponentWithTex);
|
|
117223
|
+
return _createClass(PopTipComponent, [{
|
|
117224
|
+
key: "render",
|
|
117225
|
+
value: function render() {
|
|
117226
|
+
_superPropGet(PopTipComponent, "render", this, 3)([]), this.renderPopTip();
|
|
117227
|
+
}
|
|
117228
|
+
}, {
|
|
117229
|
+
key: "renderPopTip",
|
|
117230
|
+
value: function renderPopTip() {
|
|
117231
|
+
var _this$attribute = this.attribute,
|
|
117232
|
+
graphic = _this$attribute.graphic,
|
|
117233
|
+
padding = _this$attribute.padding,
|
|
117234
|
+
width = _this$attribute.width,
|
|
117235
|
+
height = _this$attribute.height,
|
|
117236
|
+
attrs = Object.assign({}, graphic);
|
|
117237
|
+
attrs.x || (attrs.x = padding.left), attrs.y || (attrs.y = padding.top), attrs.width || (attrs.width = width - padding.left - padding.right), attrs.height || (attrs.height = height - padding.top - padding.bottom);
|
|
117238
|
+
var attribute = Object.assign(Object.assign({}, attrs), {
|
|
117239
|
+
scaleX: 1,
|
|
117240
|
+
scaleY: 1,
|
|
117241
|
+
angle: 0,
|
|
117242
|
+
postMatrix: null
|
|
117243
|
+
});
|
|
117244
|
+
if (this.vrComponent) this.vrComponent.setAttributes(attribute);else {
|
|
117245
|
+
var poptip = new PopTip(attribute);
|
|
117246
|
+
this.vrComponent = poptip, this.addChild(poptip);
|
|
117247
|
+
}
|
|
117248
|
+
}
|
|
117249
|
+
}]);
|
|
117250
|
+
}(BaseComponentWithText);
|
|
117251
|
+
PopTipComponent$1.defaultAttributes = {
|
|
117252
|
+
visible: !0,
|
|
117253
|
+
textStyle: {},
|
|
117254
|
+
width: 100,
|
|
117255
|
+
height: 100,
|
|
117256
|
+
padding: {
|
|
117257
|
+
top: 0,
|
|
117258
|
+
bottom: 0,
|
|
117259
|
+
left: 0,
|
|
117260
|
+
right: 0
|
|
117261
|
+
},
|
|
117262
|
+
graphic: {
|
|
117263
|
+
panel: {
|
|
117264
|
+
visible: !0
|
|
117265
|
+
}
|
|
117266
|
+
}
|
|
117267
|
+
};
|
|
117268
|
+
|
|
117269
|
+
var POPTIP = "PopTip";
|
|
117270
|
+
|
|
117271
|
+
var PopTipRuntime = /*#__PURE__*/function (_BaseRuntime) {
|
|
117272
|
+
function PopTipRuntime() {
|
|
117273
|
+
var _this;
|
|
117274
|
+
_classCallCheck(this, PopTipRuntime);
|
|
117275
|
+
_this = _callSuper(this, PopTipRuntime, arguments), _this.type = POPTIP;
|
|
117276
|
+
return _this;
|
|
117277
|
+
}
|
|
117278
|
+
_inherits(PopTipRuntime, _BaseRuntime);
|
|
117279
|
+
return _createClass(PopTipRuntime);
|
|
117280
|
+
}(BaseRuntime);
|
|
117281
|
+
|
|
117282
|
+
var PopTipCharacter = /*#__PURE__*/function (_CharacterComponent) {
|
|
117283
|
+
function PopTipCharacter() {
|
|
117284
|
+
_classCallCheck(this, PopTipCharacter);
|
|
117285
|
+
return _callSuper(this, PopTipCharacter, arguments);
|
|
117286
|
+
}
|
|
117287
|
+
_inherits(PopTipCharacter, _CharacterComponent);
|
|
117288
|
+
return _createClass(PopTipCharacter, [{
|
|
117289
|
+
key: "createAndAddGraphic",
|
|
117290
|
+
value: function createAndAddGraphic(attribute) {
|
|
117291
|
+
this._graphic = new PopTipComponent$1(attribute), this.canvas.addGraphic(this._graphic);
|
|
117292
|
+
}
|
|
117293
|
+
}, {
|
|
117294
|
+
key: "_initRuntime",
|
|
117295
|
+
value: function _initRuntime() {
|
|
117296
|
+
var _this = this;
|
|
117297
|
+
PopTipCharacter.RunTime.forEach(function (R) {
|
|
117298
|
+
_this._runtime.push(new R(_this));
|
|
117299
|
+
});
|
|
117300
|
+
}
|
|
117301
|
+
}, {
|
|
117302
|
+
key: "getDefaultAttribute",
|
|
117303
|
+
value: function getDefaultAttribute() {
|
|
117304
|
+
return Object.assign(Object.assign({}, _superPropGet(PopTipCharacter, "getDefaultAttribute", this, 3)([])), {
|
|
117305
|
+
width: 100,
|
|
117306
|
+
height: 100
|
|
117307
|
+
});
|
|
117308
|
+
}
|
|
117309
|
+
}, {
|
|
117310
|
+
key: "_clearGraphic",
|
|
117311
|
+
value: function _clearGraphic() {
|
|
117312
|
+
_superPropGet(PopTipCharacter, "_clearGraphic", this, 3)([]);
|
|
117313
|
+
}
|
|
117314
|
+
}, {
|
|
117315
|
+
key: "show",
|
|
117316
|
+
value: function show() {
|
|
117317
|
+
this._graphic.setAttribute("visibleAll", !0);
|
|
117318
|
+
}
|
|
117319
|
+
}, {
|
|
117320
|
+
key: "hide",
|
|
117321
|
+
value: function hide() {
|
|
117322
|
+
this._graphic.setAttribute("visibleAll", !1);
|
|
117323
|
+
}
|
|
117324
|
+
}]);
|
|
117325
|
+
}(CharacterComponent);
|
|
117326
|
+
PopTipCharacter.type = POPTIP, PopTipCharacter.RunTime = [PopTipRuntime];
|
|
117327
|
+
|
|
117328
|
+
function registerPopTip() {
|
|
117329
|
+
StoryFactory.registerCharacter(PopTipCharacter.type, PopTipCharacter);
|
|
117330
|
+
}
|
|
117331
|
+
|
|
117332
|
+
var DefaultVisibility$1 = /*#__PURE__*/function (_BaseVisibility) {
|
|
117333
|
+
function DefaultVisibility() {
|
|
117334
|
+
_classCallCheck(this, DefaultVisibility);
|
|
117335
|
+
return _callSuper(this, DefaultVisibility, arguments);
|
|
117336
|
+
}
|
|
117337
|
+
_inherits(DefaultVisibility, _BaseVisibility);
|
|
117338
|
+
return _createClass(DefaultVisibility, [{
|
|
117339
|
+
key: "_setInitAttributes",
|
|
117340
|
+
value: function _setInitAttributes(graphic, params, appear) {}
|
|
117341
|
+
}, {
|
|
117342
|
+
key: "_run",
|
|
117343
|
+
value: function _run(graphic, params, appear) {
|
|
117344
|
+
return appear && graphic && graphic.appearAnimate ? graphic.appearAnimate(params) : !appear && graphic && graphic.disappearAnimate && graphic.disappearAnimate(params), !0;
|
|
117345
|
+
}
|
|
117346
|
+
}]);
|
|
117347
|
+
}(BaseVisibility);
|
|
117348
|
+
var defaultInstance$1 = new DefaultVisibility$1();
|
|
117349
|
+
var PoptipVisibilityActionProcessor = /*#__PURE__*/function (_CommonVisibilityActi) {
|
|
117350
|
+
function PoptipVisibilityActionProcessor() {
|
|
117351
|
+
var _this;
|
|
117352
|
+
_classCallCheck(this, PoptipVisibilityActionProcessor);
|
|
117353
|
+
_this = _callSuper(this, PoptipVisibilityActionProcessor), _this.name = "appearOrDisAppear";
|
|
117354
|
+
return _this;
|
|
117355
|
+
}
|
|
117356
|
+
_inherits(PoptipVisibilityActionProcessor, _CommonVisibilityActi);
|
|
117357
|
+
return _createClass(PoptipVisibilityActionProcessor, [{
|
|
117358
|
+
key: "getEffectInstance",
|
|
117359
|
+
value: function getEffectInstance(effect, appear) {
|
|
117360
|
+
return "default" === effect ? defaultInstance$1 : _superPropGet(PoptipVisibilityActionProcessor, "getEffectInstance", this, 3)([effect, appear]);
|
|
117361
|
+
}
|
|
117362
|
+
}]);
|
|
117363
|
+
}(CommonVisibilityActionProcessor);
|
|
117364
|
+
function registerPopTipVisibilityAction() {
|
|
117365
|
+
globalProcessorRegistry.registerProcessor(POPTIP, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ACTION_TYPE.APPEAR, new PoptipVisibilityActionProcessor()), ACTION_TYPE.DISAPPEAR, new PoptipVisibilityActionProcessor()), ACTION_TYPE.STYLE, new CommonStyleActionProcessor()), ACTION_TYPE.MOVETO, new CommonMoveToActionProcessor()), ACTION_TYPE.SCALETO, new CommonScaleToActionProcessor()), ACTION_TYPE.BOUNCE, new CommonBounceActionProcessor()));
|
|
117366
|
+
}
|
|
117367
|
+
|
|
117368
|
+
function registerPopTipAction() {
|
|
117369
|
+
registerPopTipVisibilityAction();
|
|
117370
|
+
}
|
|
117371
|
+
|
|
117372
|
+
var PopTipComponent = /*#__PURE__*/function (_BaseComponentWithTex) {
|
|
117373
|
+
function PopTipComponent(attributes, options) {
|
|
117374
|
+
_classCallCheck(this, PopTipComponent);
|
|
117375
|
+
return _callSuper(this, PopTipComponent, [(null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, PopTipComponent.defaultAttributes, attributes)]);
|
|
117376
|
+
}
|
|
117377
|
+
_inherits(PopTipComponent, _BaseComponentWithTex);
|
|
117378
|
+
return _createClass(PopTipComponent, [{
|
|
117379
|
+
key: "render",
|
|
117380
|
+
value: function render() {
|
|
117381
|
+
_superPropGet(PopTipComponent, "render", this, 3)([]), this.renderPopTip();
|
|
117382
|
+
}
|
|
117383
|
+
}, {
|
|
117384
|
+
key: "renderPopTip",
|
|
117385
|
+
value: function renderPopTip() {
|
|
117386
|
+
var _this$attribute = this.attribute,
|
|
117387
|
+
graphic = _this$attribute.graphic,
|
|
117388
|
+
padding = _this$attribute.padding,
|
|
117389
|
+
width = _this$attribute.width,
|
|
117390
|
+
height = _this$attribute.height,
|
|
117391
|
+
attrs = Object.assign({}, graphic);
|
|
117392
|
+
attrs.x || (attrs.x = padding.left), attrs.y || (attrs.y = padding.top), attrs.width || (attrs.width = width - padding.left - padding.right), attrs.height || (attrs.height = height - padding.top - padding.bottom);
|
|
117393
|
+
var attribute = Object.assign(Object.assign({}, attrs), {
|
|
117394
|
+
scaleX: 1,
|
|
117395
|
+
scaleY: 1,
|
|
117396
|
+
angle: 0,
|
|
117397
|
+
postMatrix: null
|
|
117398
|
+
});
|
|
117399
|
+
if (this.vrComponent) this.vrComponent.setAttributes(attribute);else {
|
|
117400
|
+
var labelItem = new StoryLabelItem(attribute);
|
|
117401
|
+
this.vrComponent = labelItem, this.addChild(labelItem);
|
|
117402
|
+
}
|
|
117403
|
+
}
|
|
117404
|
+
}]);
|
|
117405
|
+
}(BaseComponentWithText);
|
|
117406
|
+
PopTipComponent.defaultAttributes = {
|
|
117407
|
+
visible: !0,
|
|
117408
|
+
textStyle: {},
|
|
117409
|
+
width: 100,
|
|
117410
|
+
height: 100,
|
|
117411
|
+
padding: {
|
|
117412
|
+
top: 0,
|
|
117413
|
+
bottom: 0,
|
|
117414
|
+
left: 0,
|
|
117415
|
+
right: 0
|
|
117416
|
+
}
|
|
117417
|
+
};
|
|
117418
|
+
|
|
117419
|
+
var LABEL_ITEM = "LabelItem";
|
|
117420
|
+
|
|
117421
|
+
var LabelItemRuntime = /*#__PURE__*/function (_BaseRuntime) {
|
|
117422
|
+
function LabelItemRuntime() {
|
|
117423
|
+
var _this;
|
|
117424
|
+
_classCallCheck(this, LabelItemRuntime);
|
|
117425
|
+
_this = _callSuper(this, LabelItemRuntime, arguments), _this.type = LABEL_ITEM;
|
|
117426
|
+
return _this;
|
|
117427
|
+
}
|
|
117428
|
+
_inherits(LabelItemRuntime, _BaseRuntime);
|
|
117429
|
+
return _createClass(LabelItemRuntime);
|
|
117430
|
+
}(BaseRuntime);
|
|
117431
|
+
|
|
117432
|
+
var LabelItemCharacter = /*#__PURE__*/function (_CharacterComponent) {
|
|
117433
|
+
function LabelItemCharacter() {
|
|
117434
|
+
_classCallCheck(this, LabelItemCharacter);
|
|
117435
|
+
return _callSuper(this, LabelItemCharacter, arguments);
|
|
117436
|
+
}
|
|
117437
|
+
_inherits(LabelItemCharacter, _CharacterComponent);
|
|
117438
|
+
return _createClass(LabelItemCharacter, [{
|
|
117439
|
+
key: "createAndAddGraphic",
|
|
117440
|
+
value: function createAndAddGraphic(attribute) {
|
|
117441
|
+
this._graphic = new PopTipComponent(attribute), this.canvas.addGraphic(this._graphic);
|
|
117442
|
+
}
|
|
117443
|
+
}, {
|
|
117444
|
+
key: "_initRuntime",
|
|
117445
|
+
value: function _initRuntime() {
|
|
117446
|
+
var _this = this;
|
|
117447
|
+
LabelItemCharacter.RunTime.forEach(function (R) {
|
|
117448
|
+
_this._runtime.push(new R(_this));
|
|
117449
|
+
});
|
|
117450
|
+
}
|
|
117451
|
+
}, {
|
|
117452
|
+
key: "getDefaultAttribute",
|
|
117453
|
+
value: function getDefaultAttribute() {
|
|
117454
|
+
return Object.assign(Object.assign({}, _superPropGet(LabelItemCharacter, "getDefaultAttribute", this, 3)([])), {
|
|
117455
|
+
width: 100,
|
|
117456
|
+
height: 100
|
|
117457
|
+
});
|
|
117458
|
+
}
|
|
117459
|
+
}, {
|
|
117460
|
+
key: "_clearGraphic",
|
|
117461
|
+
value: function _clearGraphic() {
|
|
117462
|
+
_superPropGet(LabelItemCharacter, "_clearGraphic", this, 3)([]);
|
|
117463
|
+
}
|
|
117464
|
+
}, {
|
|
117465
|
+
key: "show",
|
|
117466
|
+
value: function show() {
|
|
117467
|
+
this._graphic.setAttribute("visibleAll", !0);
|
|
117468
|
+
}
|
|
117469
|
+
}, {
|
|
117470
|
+
key: "hide",
|
|
117471
|
+
value: function hide() {
|
|
117472
|
+
this._graphic.setAttribute("visibleAll", !1);
|
|
117473
|
+
}
|
|
117474
|
+
}]);
|
|
117475
|
+
}(CharacterComponent);
|
|
117476
|
+
LabelItemCharacter.type = LABEL_ITEM, LabelItemCharacter.RunTime = [LabelItemRuntime];
|
|
117477
|
+
|
|
117478
|
+
function registerLabelItem() {
|
|
117479
|
+
StoryFactory.registerCharacter(LabelItemCharacter.type, LabelItemCharacter);
|
|
117480
|
+
}
|
|
117481
|
+
|
|
117482
|
+
var DefaultVisibility = /*#__PURE__*/function (_BaseVisibility) {
|
|
117483
|
+
function DefaultVisibility() {
|
|
117484
|
+
_classCallCheck(this, DefaultVisibility);
|
|
117485
|
+
return _callSuper(this, DefaultVisibility, arguments);
|
|
117486
|
+
}
|
|
117487
|
+
_inherits(DefaultVisibility, _BaseVisibility);
|
|
117488
|
+
return _createClass(DefaultVisibility, [{
|
|
117489
|
+
key: "_setInitAttributes",
|
|
117490
|
+
value: function _setInitAttributes(graphic, params, appear) {}
|
|
117491
|
+
}, {
|
|
117492
|
+
key: "_run",
|
|
117493
|
+
value: function _run(graphic, params, appear) {
|
|
117494
|
+
return appear && graphic && graphic.appearAnimate ? graphic.appearAnimate(params) : !appear && graphic && graphic.disappearAnimate && graphic.disappearAnimate(params), !0;
|
|
117495
|
+
}
|
|
117496
|
+
}]);
|
|
117497
|
+
}(BaseVisibility);
|
|
117498
|
+
var defaultInstance = new DefaultVisibility();
|
|
117499
|
+
var LabelItemVisibilityActionProcessor = /*#__PURE__*/function (_CommonVisibilityActi) {
|
|
117500
|
+
function LabelItemVisibilityActionProcessor() {
|
|
117501
|
+
var _this;
|
|
117502
|
+
_classCallCheck(this, LabelItemVisibilityActionProcessor);
|
|
117503
|
+
_this = _callSuper(this, LabelItemVisibilityActionProcessor), _this.name = "appearOrDisAppear";
|
|
117504
|
+
return _this;
|
|
117505
|
+
}
|
|
117506
|
+
_inherits(LabelItemVisibilityActionProcessor, _CommonVisibilityActi);
|
|
117507
|
+
return _createClass(LabelItemVisibilityActionProcessor, [{
|
|
117508
|
+
key: "getEffectInstance",
|
|
117509
|
+
value: function getEffectInstance(effect, appear) {
|
|
117510
|
+
return "default" === effect ? defaultInstance : _superPropGet(LabelItemVisibilityActionProcessor, "getEffectInstance", this, 3)([effect, appear]);
|
|
117511
|
+
}
|
|
117512
|
+
}]);
|
|
117513
|
+
}(CommonVisibilityActionProcessor);
|
|
117514
|
+
function registerLabelItemVisibilityAction() {
|
|
117515
|
+
globalProcessorRegistry.registerProcessor(LABEL_ITEM, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ACTION_TYPE.APPEAR, new LabelItemVisibilityActionProcessor()), ACTION_TYPE.DISAPPEAR, new LabelItemVisibilityActionProcessor()), ACTION_TYPE.STYLE, new CommonStyleActionProcessor()), ACTION_TYPE.MOVETO, new CommonMoveToActionProcessor()), ACTION_TYPE.SCALETO, new CommonScaleToActionProcessor()), ACTION_TYPE.BOUNCE, new CommonBounceActionProcessor()));
|
|
117516
|
+
}
|
|
117517
|
+
|
|
117518
|
+
function registerLabelItemAction() {
|
|
117519
|
+
registerLabelItemVisibilityAction();
|
|
117520
|
+
}
|
|
117521
|
+
|
|
116706
117522
|
function registerAll() {
|
|
116707
117523
|
registerGraphics();
|
|
116708
117524
|
registerCharacters();
|
|
@@ -116766,8 +117582,12 @@
|
|
|
116766
117582
|
exports.registerDynamicLineAction = registerDynamicLineAction;
|
|
116767
117583
|
exports.registerEasing = registerEasing;
|
|
116768
117584
|
exports.registerGraphics = registerGraphics;
|
|
117585
|
+
exports.registerLabelItem = registerLabelItem;
|
|
117586
|
+
exports.registerLabelItemAction = registerLabelItemAction;
|
|
116769
117587
|
exports.registerLottie = registerLottie;
|
|
116770
117588
|
exports.registerLottieAction = registerLottieAction;
|
|
117589
|
+
exports.registerPopTip = registerPopTip;
|
|
117590
|
+
exports.registerPopTipAction = registerPopTipAction;
|
|
116771
117591
|
exports.registerSinglePie = registerSinglePie;
|
|
116772
117592
|
exports.registerSinglePieAction = registerSinglePieAction;
|
|
116773
117593
|
exports.registerVChartAction = registerVChartAction;
|