@visactor/vrender-components 1.0.43 → 1.0.45
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/cjs/data-zoom/renderer.js +4 -2
- package/cjs/data-zoom/renderer.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.es.js +481 -399
- package/es/data-zoom/renderer.js +4 -2
- package/es/data-zoom/renderer.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.es.js
CHANGED
|
@@ -499,20 +499,14 @@ class ContributionProviderCache {
|
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
501
|
function bindContributionProvider(bind, id) {
|
|
502
|
-
bind(ContributionProvider).toDynamicValue(
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
} = _ref;
|
|
506
|
-
return new ContributionProviderCache(id, container);
|
|
507
|
-
}).inSingletonScope().whenTargetNamed(id);
|
|
502
|
+
bind(ContributionProvider).toDynamicValue(({
|
|
503
|
+
container: container
|
|
504
|
+
}) => new ContributionProviderCache(id, container)).inSingletonScope().whenTargetNamed(id);
|
|
508
505
|
}
|
|
509
506
|
function bindContributionProviderNoSingletonScope(bind, id) {
|
|
510
|
-
bind(ContributionProvider).toDynamicValue(
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
} = _ref2;
|
|
514
|
-
return new ContributionProviderCache(id, container);
|
|
515
|
-
}).whenTargetNamed(id);
|
|
507
|
+
bind(ContributionProvider).toDynamicValue(({
|
|
508
|
+
container: container
|
|
509
|
+
}) => new ContributionProviderCache(id, container)).whenTargetNamed(id);
|
|
516
510
|
}
|
|
517
511
|
class ContributionStore {
|
|
518
512
|
static getStore(id) {
|
|
@@ -582,10 +576,7 @@ class Hook {
|
|
|
582
576
|
}
|
|
583
577
|
|
|
584
578
|
class SyncHook extends Hook {
|
|
585
|
-
call() {
|
|
586
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
587
|
-
args[_key] = arguments[_key];
|
|
588
|
-
}
|
|
579
|
+
call(...args) {
|
|
589
580
|
this.taps.map(t => t.fn).forEach(cb => cb(...args));
|
|
590
581
|
}
|
|
591
582
|
}
|
|
@@ -900,16 +891,13 @@ let DefaultGlobal = class extends EventListenerManager {
|
|
|
900
891
|
updateDom(dom, params) {
|
|
901
892
|
return this._env || this.setEnv("browser"), this.envContribution.updateDom(dom, params);
|
|
902
893
|
}
|
|
903
|
-
getElementTop(dom) {
|
|
904
|
-
let baseWindow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
894
|
+
getElementTop(dom, baseWindow = !1) {
|
|
905
895
|
return this._env || this.setEnv("browser"), this.envContribution.getElementTop(dom, baseWindow);
|
|
906
896
|
}
|
|
907
|
-
getElementLeft(dom) {
|
|
908
|
-
let baseWindow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
897
|
+
getElementLeft(dom, baseWindow = !1) {
|
|
909
898
|
return this._env || this.setEnv("browser"), this.envContribution.getElementLeft(dom, baseWindow);
|
|
910
899
|
}
|
|
911
|
-
getElementTopLeft(dom) {
|
|
912
|
-
let baseWindow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
900
|
+
getElementTopLeft(dom, baseWindow = !1) {
|
|
913
901
|
return this._env || this.setEnv("browser"), this.envContribution.getElementTopLeft(dom, baseWindow);
|
|
914
902
|
}
|
|
915
903
|
isMacOS() {
|
|
@@ -994,7 +982,7 @@ class BoundsContext {
|
|
|
994
982
|
clear() {
|
|
995
983
|
this.bounds.clear();
|
|
996
984
|
}
|
|
997
|
-
release() {}
|
|
985
|
+
release(...params) {}
|
|
998
986
|
}
|
|
999
987
|
|
|
1000
988
|
class CurvePath {
|
|
@@ -1169,8 +1157,7 @@ function drawArc(context, x, y, coords) {
|
|
|
1169
1157
|
context.bezierCurveTo(bez[0], bez[1], bez[2], bez[3], bez[4], bez[5]);
|
|
1170
1158
|
}
|
|
1171
1159
|
}
|
|
1172
|
-
const addArcToBezierPath =
|
|
1173
|
-
let counterclockwise = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : !1;
|
|
1160
|
+
const addArcToBezierPath = (bezierPath, startAngle, endAngle, cx, cy, rx, ry, counterclockwise = !1) => {
|
|
1174
1161
|
const PI2 = 2 * Math.PI,
|
|
1175
1162
|
sAngle = (startAngle % PI2 + PI2) % PI2;
|
|
1176
1163
|
let deltaAngle,
|
|
@@ -1198,12 +1185,7 @@ const addArcToBezierPath = function (bezierPath, startAngle, endAngle, cx, cy, r
|
|
|
1198
1185
|
};
|
|
1199
1186
|
|
|
1200
1187
|
const commandFuncs = [(command, context, x, y, sx, sy, z) => context.arc(command[1] * sx + x, command[2] * sy + y, command[3] * (sx + sy) / 2, command[4], command[5], command[6], z), (command, context, x, y, sx, sy, z) => context.arcTo(command[1] * sx + x, command[2] * sy + y, command[3] * sx + x, command[4] * sy + y, command[5] * (sx + sy) / 2, z), (command, context, x, y, sx, sy, z) => context.bezierCurveTo(command[1] * sx + x, command[2] * sy + y, command[3] * sx + x, command[4] * sy + y, command[5] * sx + x, command[6] * sy + y, z), (command, context, x, y) => context.closePath(), (command, context, x, y, sx, sy) => context.ellipse(command[1] * sx + x, command[2] * sy + y, command[3] * sx, command[4] * sy, command[5], command[6], command[7], command[8]), (command, context, x, y, sx, sy, z) => context.lineTo(command[1] * sx + x, command[2] * sy + y, z), (command, context, x, y, sx, sy, z) => context.moveTo(command[1] * sx + x, command[2] * sy + y, z), (command, context, x, y, sx, sy, z) => context.quadraticCurveTo(command[1] * sx + x, command[2] * sy + y, command[3] * sx + x, command[4] * sy + y, z), (command, context, x, y, sx, sy, z) => context.rect(command[1] * sx + x, command[2] * sy + y, command[3] * sx, command[4] * sy, z)];
|
|
1201
|
-
function renderCommandList(commandList, context) {
|
|
1202
|
-
let x = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
1203
|
-
let y = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
1204
|
-
let sx = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
|
|
1205
|
-
let sy = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
|
|
1206
|
-
let z = arguments.length > 6 ? arguments[6] : undefined;
|
|
1188
|
+
function renderCommandList(commandList, context, x = 0, y = 0, sx = 1, sy = 1, z) {
|
|
1207
1189
|
for (let i = 0; i < commandList.length; i++) {
|
|
1208
1190
|
const command = commandList[i];
|
|
1209
1191
|
commandFuncs[command[0]](command, context, x, y, sx, sy, z);
|
|
@@ -1444,7 +1426,7 @@ class ReflectSegContext extends SegContext {
|
|
|
1444
1426
|
}
|
|
1445
1427
|
}
|
|
1446
1428
|
|
|
1447
|
-
function genCurveSegments(path, points) {
|
|
1429
|
+
function genCurveSegments(path, points, step = 1) {
|
|
1448
1430
|
let defined0 = !1;
|
|
1449
1431
|
for (let i = 0, n = points.length; i <= n; i++) i >= n === defined0 && ((defined0 = !defined0) ? path.lineStart() : path.lineEnd()), defined0 && path.point(points[i]);
|
|
1450
1432
|
}
|
|
@@ -1487,8 +1469,7 @@ class Linear {
|
|
|
1487
1469
|
return this.context.tryUpdateLength();
|
|
1488
1470
|
}
|
|
1489
1471
|
}
|
|
1490
|
-
function genLinearSegments(points) {
|
|
1491
|
-
let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1472
|
+
function genLinearSegments(points, params = {}) {
|
|
1492
1473
|
const {
|
|
1493
1474
|
direction: direction,
|
|
1494
1475
|
startPoint: startPoint
|
|
@@ -1498,7 +1479,7 @@ function genLinearSegments(points) {
|
|
|
1498
1479
|
return genLinearTypeSegments(new Linear(segContext, startPoint), points), segContext;
|
|
1499
1480
|
}
|
|
1500
1481
|
function genLinearTypeSegments(path, points) {
|
|
1501
|
-
return genCurveSegments(path, points);
|
|
1482
|
+
return genCurveSegments(path, points, 1);
|
|
1502
1483
|
}
|
|
1503
1484
|
|
|
1504
1485
|
function point$3(curveClass, x, y, defined, p) {
|
|
@@ -1541,10 +1522,9 @@ class Basis {
|
|
|
1541
1522
|
}
|
|
1542
1523
|
}
|
|
1543
1524
|
function genBasisTypeSegments(path, points) {
|
|
1544
|
-
return genCurveSegments(path, points);
|
|
1525
|
+
return genCurveSegments(path, points, 2);
|
|
1545
1526
|
}
|
|
1546
|
-
function genBasisSegments(points) {
|
|
1547
|
-
let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1527
|
+
function genBasisSegments(points, params = {}) {
|
|
1548
1528
|
const {
|
|
1549
1529
|
direction: direction,
|
|
1550
1530
|
startPoint: startPoint
|
|
@@ -1637,10 +1617,9 @@ class MonotoneY extends MonotoneX {
|
|
|
1637
1617
|
}
|
|
1638
1618
|
}
|
|
1639
1619
|
function genMonotoneXTypeSegments(path, points) {
|
|
1640
|
-
return genCurveSegments(path, points);
|
|
1620
|
+
return genCurveSegments(path, points, 2);
|
|
1641
1621
|
}
|
|
1642
|
-
function genMonotoneXSegments(points) {
|
|
1643
|
-
let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1622
|
+
function genMonotoneXSegments(points, params = {}) {
|
|
1644
1623
|
const {
|
|
1645
1624
|
direction: direction,
|
|
1646
1625
|
startPoint: startPoint
|
|
@@ -1651,10 +1630,9 @@ function genMonotoneXSegments(points) {
|
|
|
1651
1630
|
return genMonotoneXTypeSegments(new MonotoneX(segContext, startPoint), points), segContext;
|
|
1652
1631
|
}
|
|
1653
1632
|
function genMonotoneYTypeSegments(path, points) {
|
|
1654
|
-
return genCurveSegments(path, points);
|
|
1633
|
+
return genCurveSegments(path, points, 2);
|
|
1655
1634
|
}
|
|
1656
|
-
function genMonotoneYSegments(points) {
|
|
1657
|
-
let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1635
|
+
function genMonotoneYSegments(points, params = {}) {
|
|
1658
1636
|
const {
|
|
1659
1637
|
direction: direction,
|
|
1660
1638
|
startPoint: startPoint
|
|
@@ -1666,9 +1644,7 @@ function genMonotoneYSegments(points) {
|
|
|
1666
1644
|
}
|
|
1667
1645
|
|
|
1668
1646
|
let Step$1 = class Step {
|
|
1669
|
-
constructor(context) {
|
|
1670
|
-
let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
|
|
1671
|
-
let startPoint = arguments.length > 2 ? arguments[2] : undefined;
|
|
1647
|
+
constructor(context, t = .5, startPoint) {
|
|
1672
1648
|
this.context = context, this._t = t, this.startPoint = startPoint;
|
|
1673
1649
|
}
|
|
1674
1650
|
areaStart() {
|
|
@@ -1709,8 +1685,7 @@ class StepClosed extends Step$1 {
|
|
|
1709
1685
|
this.context.closePath();
|
|
1710
1686
|
}
|
|
1711
1687
|
}
|
|
1712
|
-
function genStepSegments(points, t) {
|
|
1713
|
-
let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1688
|
+
function genStepSegments(points, t, params = {}) {
|
|
1714
1689
|
const {
|
|
1715
1690
|
direction: direction,
|
|
1716
1691
|
startPoint: startPoint
|
|
@@ -1720,10 +1695,9 @@ function genStepSegments(points, t) {
|
|
|
1720
1695
|
return genStepTypeSegments(new Step$1(segContext, t, startPoint), points), segContext;
|
|
1721
1696
|
}
|
|
1722
1697
|
function genStepTypeSegments(path, points) {
|
|
1723
|
-
return genCurveSegments(path, points);
|
|
1698
|
+
return genCurveSegments(path, points, 1);
|
|
1724
1699
|
}
|
|
1725
|
-
function genStepClosedSegments(points, t) {
|
|
1726
|
-
let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1700
|
+
function genStepClosedSegments(points, t, params = {}) {
|
|
1727
1701
|
const {
|
|
1728
1702
|
direction: direction,
|
|
1729
1703
|
startPoint: startPoint
|
|
@@ -1738,8 +1712,7 @@ class LinearClosed extends Linear {
|
|
|
1738
1712
|
this.context.closePath();
|
|
1739
1713
|
}
|
|
1740
1714
|
}
|
|
1741
|
-
function genLinearClosedSegments(points) {
|
|
1742
|
-
let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1715
|
+
function genLinearClosedSegments(points, params = {}) {
|
|
1743
1716
|
const {
|
|
1744
1717
|
direction: direction,
|
|
1745
1718
|
startPoint: startPoint
|
|
@@ -1749,7 +1722,7 @@ function genLinearClosedSegments(points) {
|
|
|
1749
1722
|
return genLinearClosedTypeSegments(new LinearClosed(segContext, startPoint), points), segContext;
|
|
1750
1723
|
}
|
|
1751
1724
|
function genLinearClosedTypeSegments(path, points) {
|
|
1752
|
-
return genCurveSegments(path, points);
|
|
1725
|
+
return genCurveSegments(path, points, 1);
|
|
1753
1726
|
}
|
|
1754
1727
|
|
|
1755
1728
|
function point$1(curveClass, x, y, defined, p) {
|
|
@@ -1770,9 +1743,7 @@ function point$1(curveClass, x, y, defined, p) {
|
|
|
1770
1743
|
curveClass.context.bezierCurveTo(x1, y1, x2, y2, curveClass._x2, curveClass._y2, defined, curveClass.lastPoint1);
|
|
1771
1744
|
}
|
|
1772
1745
|
class CatmullRom {
|
|
1773
|
-
constructor(context) {
|
|
1774
|
-
let alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
|
|
1775
|
-
let startPoint = arguments.length > 2 ? arguments[2] : undefined;
|
|
1746
|
+
constructor(context, alpha = .5, startPoint) {
|
|
1776
1747
|
this.context = context, this.startPoint = startPoint, this._alpha = alpha;
|
|
1777
1748
|
}
|
|
1778
1749
|
areaStart() {
|
|
@@ -1826,8 +1797,7 @@ class CatmullRom {
|
|
|
1826
1797
|
}
|
|
1827
1798
|
}
|
|
1828
1799
|
function commonGenCatmullRomSegments(type, cons) {
|
|
1829
|
-
return function (points, alpha) {
|
|
1830
|
-
let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1800
|
+
return function (points, alpha, params = {}) {
|
|
1831
1801
|
const {
|
|
1832
1802
|
direction: direction,
|
|
1833
1803
|
startPoint: startPoint
|
|
@@ -1836,15 +1806,13 @@ function commonGenCatmullRomSegments(type, cons) {
|
|
|
1836
1806
|
if (points.length < 3 - Number(!!startPoint)) return genLinearSegments(points, params);
|
|
1837
1807
|
const segContext = genSegContext(type, direction, points),
|
|
1838
1808
|
gatmullRom = new cons(segContext, alpha, startPoint);
|
|
1839
|
-
return genCurveSegments(gatmullRom, points), segContext;
|
|
1809
|
+
return genCurveSegments(gatmullRom, points, 2), segContext;
|
|
1840
1810
|
};
|
|
1841
1811
|
}
|
|
1842
1812
|
const genCatmullRomSegments = commonGenCatmullRomSegments("catmullRom", CatmullRom);
|
|
1843
1813
|
|
|
1844
1814
|
class CatmullRomClosed {
|
|
1845
|
-
constructor(context) {
|
|
1846
|
-
let alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
|
|
1847
|
-
let startPoint = arguments.length > 2 ? arguments[2] : undefined;
|
|
1815
|
+
constructor(context, alpha = .5, startPoint) {
|
|
1848
1816
|
this.context = context, this.startPoint = startPoint, this._alpha = alpha;
|
|
1849
1817
|
}
|
|
1850
1818
|
areaStart() {
|
|
@@ -2154,11 +2122,7 @@ class CustomPath2D extends CurvePath {
|
|
|
2154
2122
|
cmd[1] = cmd[1] * sx + x, cmd[2] = cmd[2] * sy + y, cmd[3] = cmd[3] * (sx + sy) / 2;
|
|
2155
2123
|
}
|
|
2156
2124
|
closePathTransform() {}
|
|
2157
|
-
_runCommandStrList(commandStrList) {
|
|
2158
|
-
let l = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
2159
|
-
let t = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
2160
|
-
let sX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
2161
|
-
let sY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
|
|
2125
|
+
_runCommandStrList(commandStrList, l = 0, t = 0, sX = 1, sY = 1) {
|
|
2162
2126
|
let current,
|
|
2163
2127
|
tempX,
|
|
2164
2128
|
tempY,
|
|
@@ -2232,11 +2196,7 @@ class CustomPath2D extends CurvePath {
|
|
|
2232
2196
|
previous = current;
|
|
2233
2197
|
}
|
|
2234
2198
|
}
|
|
2235
|
-
_runCommandList(commandList) {
|
|
2236
|
-
let l = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
2237
|
-
let t = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
2238
|
-
let sX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
2239
|
-
let sY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
|
|
2199
|
+
_runCommandList(commandList, l = 0, t = 0, sX = 1, sY = 1) {
|
|
2240
2200
|
if (0 !== l || 0 !== t || 1 !== sX || 1 !== sY) for (let i = 0, len = commandList.length; i < len; ++i) {
|
|
2241
2201
|
const current = commandList[i].slice();
|
|
2242
2202
|
switch (current[0]) {
|
|
@@ -2448,6 +2408,7 @@ const DefaultStyle = Object.assign(Object.assign(Object.assign(Object.assign({
|
|
|
2448
2408
|
backgroundScale: 1,
|
|
2449
2409
|
backgroundOffsetX: 0,
|
|
2450
2410
|
backgroundOffsetY: 0,
|
|
2411
|
+
backgroundPosition: "top-left",
|
|
2451
2412
|
blur: 0,
|
|
2452
2413
|
filter: "",
|
|
2453
2414
|
cursor: null,
|
|
@@ -2620,11 +2581,16 @@ const DefaultRichTextAttribute = Object.assign(Object.assign(Object.assign({}, D
|
|
|
2620
2581
|
const DefaultImageAttribute = Object.assign(Object.assign({
|
|
2621
2582
|
repeatX: "no-repeat",
|
|
2622
2583
|
repeatY: "no-repeat",
|
|
2584
|
+
imageMode: void 0,
|
|
2623
2585
|
image: "",
|
|
2624
2586
|
width: 0,
|
|
2625
2587
|
height: 0,
|
|
2626
2588
|
maxWidth: 500,
|
|
2627
|
-
maxHeight: 500
|
|
2589
|
+
maxHeight: 500,
|
|
2590
|
+
imagePosition: "top-left",
|
|
2591
|
+
imageScale: 1,
|
|
2592
|
+
imageOffsetX: 0,
|
|
2593
|
+
imageOffsetY: 0
|
|
2628
2594
|
}, DefaultAttribute), {
|
|
2629
2595
|
fill: !0,
|
|
2630
2596
|
cornerRadius: 0,
|
|
@@ -2908,9 +2874,7 @@ function getScaledStroke(context, width, dpr) {
|
|
|
2908
2874
|
scaleY = Math.sign(d) * Math.sqrt(c * c + d * d);
|
|
2909
2875
|
return scaleX + scaleY === 0 ? 0 : (strokeWidth = strokeWidth / Math.abs(scaleX + scaleY) * 2 * dpr, strokeWidth);
|
|
2910
2876
|
}
|
|
2911
|
-
function createColor(context, c, params) {
|
|
2912
|
-
let offsetX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
2913
|
-
let offsetY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
2877
|
+
function createColor(context, c, params, offsetX = 0, offsetY = 0) {
|
|
2914
2878
|
var _a, _b, _c, _d;
|
|
2915
2879
|
if (!c || !0 === c) return "black";
|
|
2916
2880
|
let result, color;
|
|
@@ -3049,8 +3013,7 @@ function getStrByWithCanvas(desc, width, character, guessIndex, needTestLetter)
|
|
|
3049
3013
|
}
|
|
3050
3014
|
return needTestLetter && (index = testLetter(desc, index)), index;
|
|
3051
3015
|
}
|
|
3052
|
-
function testLetter(string, index) {
|
|
3053
|
-
let negativeWrongMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
3016
|
+
function testLetter(string, index, negativeWrongMatch = !1) {
|
|
3054
3017
|
let i = index;
|
|
3055
3018
|
for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i--, i <= 0) return negativeWrongMatch ? testLetter2(string, index) : index;
|
|
3056
3019
|
return i;
|
|
@@ -3060,8 +3023,7 @@ function testLetter2(string, index) {
|
|
|
3060
3023
|
for (; regLetter.test(string[i + 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i++, i >= string.length) return i;
|
|
3061
3024
|
return i + 1;
|
|
3062
3025
|
}
|
|
3063
|
-
function measureTextCanvas(text, character) {
|
|
3064
|
-
let mode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "actual";
|
|
3026
|
+
function measureTextCanvas(text, character, mode = "actual") {
|
|
3065
3027
|
var _a;
|
|
3066
3028
|
if ("" === text) return {
|
|
3067
3029
|
ascent: 0,
|
|
@@ -3134,10 +3096,9 @@ let ATextMeasure = class {
|
|
|
3134
3096
|
}
|
|
3135
3097
|
return metrics;
|
|
3136
3098
|
}
|
|
3137
|
-
estimate(text,
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
} = _ref;
|
|
3099
|
+
estimate(text, {
|
|
3100
|
+
fontSize = DefaultTextAttribute.fontSize
|
|
3101
|
+
}) {
|
|
3141
3102
|
let eCharLen = 0,
|
|
3142
3103
|
cCharLen = 0;
|
|
3143
3104
|
for (let i = 0; i < text.length; i++) text.charCodeAt(i) < 128 ? eCharLen++ : cCharLen++;
|
|
@@ -3448,8 +3409,7 @@ let ATextMeasure = class {
|
|
|
3448
3409
|
});
|
|
3449
3410
|
});
|
|
3450
3411
|
}
|
|
3451
|
-
clipTextWithSuffix(text, options, width, suffix, wordBreak, position) {
|
|
3452
|
-
let forceSuffix = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !1;
|
|
3412
|
+
clipTextWithSuffix(text, options, width, suffix, wordBreak, position, forceSuffix = !1) {
|
|
3453
3413
|
if ("" === suffix) return this.clipText(text, options, width, wordBreak);
|
|
3454
3414
|
if (0 === text.length) return {
|
|
3455
3415
|
str: "",
|
|
@@ -3895,7 +3855,7 @@ class DefaultCanvasAllocate {
|
|
|
3895
3855
|
get length() {
|
|
3896
3856
|
return this.pools.length;
|
|
3897
3857
|
}
|
|
3898
|
-
release() {
|
|
3858
|
+
release(...params) {
|
|
3899
3859
|
this.pools = [];
|
|
3900
3860
|
}
|
|
3901
3861
|
}
|
|
@@ -4095,8 +4055,7 @@ let DefaultGraphicUtil = class {
|
|
|
4095
4055
|
bindTextMeasure(tm) {
|
|
4096
4056
|
this._textMeasure && "DefaultTextMeasureContribution" !== tm.id || (this._textMeasure = tm), this._textMeasureMap.has(tm.id) || this._textMeasureMap.set(tm.id, tm);
|
|
4097
4057
|
}
|
|
4098
|
-
measureText(text, tc) {
|
|
4099
|
-
let method = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "native";
|
|
4058
|
+
measureText(text, tc, method = "native") {
|
|
4100
4059
|
var _a;
|
|
4101
4060
|
this.configure(this.global, this.global.env);
|
|
4102
4061
|
const m = this.global.measureTextMethod;
|
|
@@ -4279,8 +4238,7 @@ class Theme {
|
|
|
4279
4238
|
for (; group.parent;) if ((group = group.parent).theme) return group;
|
|
4280
4239
|
return null;
|
|
4281
4240
|
}
|
|
4282
|
-
applyTheme(group, pt) {
|
|
4283
|
-
let force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
4241
|
+
applyTheme(group, pt, force = !1) {
|
|
4284
4242
|
if (this.dirty) {
|
|
4285
4243
|
const parentGroup = this.getParentWithTheme(group);
|
|
4286
4244
|
if (parentGroup) {
|
|
@@ -4379,8 +4337,7 @@ class Node extends EventEmitter {
|
|
|
4379
4337
|
constructor() {
|
|
4380
4338
|
super(), this._uid = Generator.GenAutoIncrementId(), this._firstChild = null, this._lastChild = null, this.parent = null, this._count = 1;
|
|
4381
4339
|
}
|
|
4382
|
-
forEachChildren(cb) {
|
|
4383
|
-
let reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
4340
|
+
forEachChildren(cb, reverse = !1) {
|
|
4384
4341
|
if (reverse) {
|
|
4385
4342
|
let child = this._lastChild,
|
|
4386
4343
|
i = 0;
|
|
@@ -4397,8 +4354,7 @@ class Node extends EventEmitter {
|
|
|
4397
4354
|
}
|
|
4398
4355
|
}
|
|
4399
4356
|
}
|
|
4400
|
-
forEachChildrenAsync(cb) {
|
|
4401
|
-
let reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
4357
|
+
forEachChildrenAsync(cb, reverse = !1) {
|
|
4402
4358
|
return __awaiter$3(this, void 0, void 0, function* () {
|
|
4403
4359
|
if (reverse) {
|
|
4404
4360
|
let child = this._lastChild,
|
|
@@ -4422,13 +4378,12 @@ class Node extends EventEmitter {
|
|
|
4422
4378
|
forEach(cb) {
|
|
4423
4379
|
return this.forEachChildren(cb);
|
|
4424
4380
|
}
|
|
4425
|
-
appendChild(node) {
|
|
4426
|
-
let highPerformance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
4381
|
+
appendChild(node, highPerformance = !0) {
|
|
4427
4382
|
if (this._uid === node._uid) return null;
|
|
4428
4383
|
if (!highPerformance && node.isAncestorsOf(this)) throw new Error("【Node::appendChild】不能将父辈元素append为子元素");
|
|
4429
4384
|
return node.parent && node.parent.removeChild(node), node.parent = this, this._lastChild ? (this._lastChild._next = node, node._prev = this._lastChild, this._lastChild = node) : (this._firstChild = this._lastChild = node, node._prev = node._next = null), this._idMap || (this._idMap = new Map()), this._idMap.set(node._uid, node), this.setCount(node.count), this._structEdit = !0, node;
|
|
4430
4385
|
}
|
|
4431
|
-
appendChildArrHighPerformance(nodes) {
|
|
4386
|
+
appendChildArrHighPerformance(nodes, replace = !1) {
|
|
4432
4387
|
return console.error("暂不支持该函数"), nodes;
|
|
4433
4388
|
}
|
|
4434
4389
|
insertBefore(newNode, referenceNode) {
|
|
@@ -4496,8 +4451,7 @@ class Node extends EventEmitter {
|
|
|
4496
4451
|
replaceChild(newChild, oldChild) {
|
|
4497
4452
|
throw new Error("暂不支持");
|
|
4498
4453
|
}
|
|
4499
|
-
find(callback) {
|
|
4500
|
-
let deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
4454
|
+
find(callback, deep = !1) {
|
|
4501
4455
|
let target = null;
|
|
4502
4456
|
return this.forEachChildren((node, index) => !(node === this || !callback(node, index)) && (target = node, !0)), deep && this.forEachChildren(child => {
|
|
4503
4457
|
if (child.isContainer) {
|
|
@@ -4507,8 +4461,7 @@ class Node extends EventEmitter {
|
|
|
4507
4461
|
return !1;
|
|
4508
4462
|
}), target;
|
|
4509
4463
|
}
|
|
4510
|
-
findAll(callback) {
|
|
4511
|
-
let deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
4464
|
+
findAll(callback, deep = !1) {
|
|
4512
4465
|
let nodes = [];
|
|
4513
4466
|
return this.forEachChildren((node, index) => {
|
|
4514
4467
|
node !== this && callback(node, index) && nodes.push(node);
|
|
@@ -4537,8 +4490,7 @@ class Node extends EventEmitter {
|
|
|
4537
4490
|
getElementsByType(type) {
|
|
4538
4491
|
return this.findAll(node => node.type === type, !0);
|
|
4539
4492
|
}
|
|
4540
|
-
getChildByName(name) {
|
|
4541
|
-
let deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
4493
|
+
getChildByName(name, deep = !1) {
|
|
4542
4494
|
return this.find(node => node.name === name, deep);
|
|
4543
4495
|
}
|
|
4544
4496
|
getChildAt(idx) {
|
|
@@ -4657,10 +4609,7 @@ class Node extends EventEmitter {
|
|
|
4657
4609
|
removeAllListeners() {
|
|
4658
4610
|
return this.removeAllEventListeners();
|
|
4659
4611
|
}
|
|
4660
|
-
dispatchEvent(event) {
|
|
4661
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
4662
|
-
args[_key - 1] = arguments[_key];
|
|
4663
|
-
}
|
|
4612
|
+
dispatchEvent(event, ...args) {
|
|
4664
4613
|
return super.emit(event.type, event, ...args), !event.defaultPrevented;
|
|
4665
4614
|
}
|
|
4666
4615
|
emit(event, data) {
|
|
@@ -5055,8 +5004,7 @@ class SquareSymbol extends BaseSymbol {
|
|
|
5055
5004
|
}
|
|
5056
5005
|
var square$1 = new SquareSymbol();
|
|
5057
5006
|
|
|
5058
|
-
function trianglUpOffset(ctx, r, x, y) {
|
|
5059
|
-
let offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
5007
|
+
function trianglUpOffset(ctx, r, x, y, offset = 0) {
|
|
5060
5008
|
return ctx.moveTo(x + r + 2 * offset, r + y + offset), ctx.lineTo(x - r - 2 * offset, r + y + offset), ctx.lineTo(x, y - r - 2 * offset), ctx.closePath(), !0;
|
|
5061
5009
|
}
|
|
5062
5010
|
class TriangleUpSymbol extends BaseSymbol {
|
|
@@ -5202,8 +5150,7 @@ class TriangleLeftSymbol extends BaseSymbol {
|
|
|
5202
5150
|
}
|
|
5203
5151
|
var triangleLeft = new TriangleLeftSymbol();
|
|
5204
5152
|
|
|
5205
|
-
function trianglRightOffset(ctx, r, x, y) {
|
|
5206
|
-
let offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
5153
|
+
function trianglRightOffset(ctx, r, x, y, offset = 0) {
|
|
5207
5154
|
return ctx.moveTo(x - r - offset, r + y + 2 * offset), ctx.lineTo(r + x + 2 * offset, y), ctx.lineTo(x - r - offset, y - r - 2 * offset), ctx.closePath(), !0;
|
|
5208
5155
|
}
|
|
5209
5156
|
class TriangleRightSymbol extends BaseSymbol {
|
|
@@ -5219,8 +5166,7 @@ class TriangleRightSymbol extends BaseSymbol {
|
|
|
5219
5166
|
}
|
|
5220
5167
|
var triangleRight = new TriangleRightSymbol();
|
|
5221
5168
|
|
|
5222
|
-
function trianglDownOffset(ctx, r, x, y) {
|
|
5223
|
-
let offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
5169
|
+
function trianglDownOffset(ctx, r, x, y, offset = 0) {
|
|
5224
5170
|
return ctx.moveTo(x - r - 2 * offset, y - r - offset), ctx.lineTo(x + r + 2 * offset, y - r - offset), ctx.lineTo(x, y + r + 2 * offset), ctx.closePath(), !0;
|
|
5225
5171
|
}
|
|
5226
5172
|
class TriangleDownSymbol extends BaseSymbol {
|
|
@@ -5437,8 +5383,7 @@ var rect = new RectSymbol();
|
|
|
5437
5383
|
|
|
5438
5384
|
const tempBounds = new AABBBounds();
|
|
5439
5385
|
class CustomSymbolClass {
|
|
5440
|
-
constructor(type, path) {
|
|
5441
|
-
let isSvg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
5386
|
+
constructor(type, path, isSvg = !1) {
|
|
5442
5387
|
this.pathStr = "", this.type = type, isArray(path) ? this.svgCache = path : this.path = path, this.isSvg = isSvg;
|
|
5443
5388
|
}
|
|
5444
5389
|
drawOffset(ctx, size, x, y, offset, z, cb) {
|
|
@@ -5460,10 +5405,9 @@ class CustomSymbolClass {
|
|
|
5460
5405
|
bounds(size, bounds) {
|
|
5461
5406
|
if (size = this.parseSize(size), this.isSvg) {
|
|
5462
5407
|
if (!this.svgCache) return;
|
|
5463
|
-
return bounds.clear(), void this.svgCache.forEach(
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
} = _ref;
|
|
5408
|
+
return bounds.clear(), void this.svgCache.forEach(({
|
|
5409
|
+
path: path
|
|
5410
|
+
}) => {
|
|
5467
5411
|
tempBounds.x1 = path.bounds.x1 * size, tempBounds.y1 = path.bounds.y1 * size, tempBounds.x2 = path.bounds.x2 * size, tempBounds.y2 = path.bounds.y2 * size, bounds.union(tempBounds);
|
|
5468
5412
|
});
|
|
5469
5413
|
}
|
|
@@ -5519,8 +5463,7 @@ function findClosingIndex(xmlData, str, i, errMsg) {
|
|
|
5519
5463
|
if (-1 === closingIndex) throw new Error(errMsg);
|
|
5520
5464
|
return closingIndex + str.length - 1;
|
|
5521
5465
|
}
|
|
5522
|
-
function tagExpWithClosingIndex(xmlData, i) {
|
|
5523
|
-
let closingChar = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ">";
|
|
5466
|
+
function tagExpWithClosingIndex(xmlData, i, closingChar = ">") {
|
|
5524
5467
|
let attrBoundary,
|
|
5525
5468
|
tagExp = "";
|
|
5526
5469
|
for (let index = i; index < xmlData.length; index++) {
|
|
@@ -5538,8 +5481,7 @@ function tagExpWithClosingIndex(xmlData, i) {
|
|
|
5538
5481
|
tagExp += ch;
|
|
5539
5482
|
}
|
|
5540
5483
|
}
|
|
5541
|
-
function readTagExp(xmlData, i, removeNSPrefix) {
|
|
5542
|
-
let closingChar = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ">";
|
|
5484
|
+
function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") {
|
|
5543
5485
|
const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar);
|
|
5544
5486
|
if (!result) return;
|
|
5545
5487
|
let tagExp = result.data;
|
|
@@ -5701,8 +5643,7 @@ undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator)
|
|
|
5701
5643
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
5702
5644
|
});
|
|
5703
5645
|
};
|
|
5704
|
-
function boundStroke(bounds, halfW, miter) {
|
|
5705
|
-
let pad = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
5646
|
+
function boundStroke(bounds, halfW, miter, pad = 0) {
|
|
5706
5647
|
return bounds.expand(halfW + (pad / 2 + (miter ? miterAdjustment(miter, halfW) : 0))), bounds;
|
|
5707
5648
|
}
|
|
5708
5649
|
function miterAdjustment(miter, strokeWidth) {
|
|
@@ -5887,7 +5828,7 @@ class DefaultMatrixAllocate {
|
|
|
5887
5828
|
get length() {
|
|
5888
5829
|
return this.pools.length;
|
|
5889
5830
|
}
|
|
5890
|
-
release() {
|
|
5831
|
+
release(...params) {
|
|
5891
5832
|
this.pools = [];
|
|
5892
5833
|
}
|
|
5893
5834
|
}
|
|
@@ -5915,7 +5856,7 @@ class DefaultMat4Allocate {
|
|
|
5915
5856
|
get length() {
|
|
5916
5857
|
return this.pools.length;
|
|
5917
5858
|
}
|
|
5918
|
-
release() {
|
|
5859
|
+
release(...params) {
|
|
5919
5860
|
this.pools = [];
|
|
5920
5861
|
}
|
|
5921
5862
|
}
|
|
@@ -5950,8 +5891,7 @@ let EmptyContext2d = class {
|
|
|
5950
5891
|
getContext() {
|
|
5951
5892
|
throw new Error("不支持getContext");
|
|
5952
5893
|
}
|
|
5953
|
-
setTransformForCurrent() {
|
|
5954
|
-
let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
5894
|
+
setTransformForCurrent(force = !1) {
|
|
5955
5895
|
!force && this.applyedMatrix.equalToMatrix(this.matrix) || (this.applyedMatrix = this.cloneMatrix(this.matrix));
|
|
5956
5896
|
}
|
|
5957
5897
|
get currentMatrix() {
|
|
@@ -5972,8 +5912,7 @@ let EmptyContext2d = class {
|
|
|
5972
5912
|
highPerformanceRestore() {
|
|
5973
5913
|
this.stack.length > 0 && (matrixAllocate.free(this.matrix), this.matrix = this.stack.pop());
|
|
5974
5914
|
}
|
|
5975
|
-
rotate(rad) {
|
|
5976
|
-
let setTransform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
5915
|
+
rotate(rad, setTransform = !0) {
|
|
5977
5916
|
this.matrix.rotate(rad), setTransform && this.setTransformForCurrent();
|
|
5978
5917
|
}
|
|
5979
5918
|
save() {
|
|
@@ -5984,55 +5923,41 @@ let EmptyContext2d = class {
|
|
|
5984
5923
|
const matrix = this.cloneMatrix(this.matrix);
|
|
5985
5924
|
this.stack.push(matrix);
|
|
5986
5925
|
}
|
|
5987
|
-
scale(sx, sy) {
|
|
5988
|
-
let setTransform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
5926
|
+
scale(sx, sy, setTransform = !0) {
|
|
5989
5927
|
this.matrix.scale(sx, sy), setTransform && this.setTransformForCurrent();
|
|
5990
5928
|
}
|
|
5991
|
-
setScale(sx, sy) {
|
|
5992
|
-
let setTransform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
5929
|
+
setScale(sx, sy, setTransform = !0) {
|
|
5993
5930
|
this.matrix.setScale(sx, sy), setTransform && this.setTransformForCurrent();
|
|
5994
5931
|
}
|
|
5995
|
-
scalePoint(sx, sy, px, py) {
|
|
5996
|
-
let setTransform = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !0;
|
|
5932
|
+
scalePoint(sx, sy, px, py, setTransform = !0) {
|
|
5997
5933
|
this.translate(px, py, !1), this.scale(sx, sy, !1), this.translate(-px, -py, !1), setTransform && this.setTransformForCurrent();
|
|
5998
5934
|
}
|
|
5999
|
-
setTransform(a, b, c, d, e, f) {
|
|
6000
|
-
let setTransform = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !0;
|
|
6001
|
-
let dpr = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : this.dpr;
|
|
5935
|
+
setTransform(a, b, c, d, e, f, setTransform = !0, dpr = this.dpr) {
|
|
6002
5936
|
this.matrix.setValue(dpr * a, dpr * b, dpr * c, dpr * d, dpr * e, dpr * f), setTransform && this.setTransformForCurrent();
|
|
6003
5937
|
}
|
|
6004
|
-
setTransformFromMatrix(matrix) {
|
|
6005
|
-
let setTransform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
6006
|
-
let dpr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.dpr;
|
|
5938
|
+
setTransformFromMatrix(matrix, setTransform = !0, dpr = this.dpr) {
|
|
6007
5939
|
this.matrix.setValue(matrix.a * dpr, matrix.b * dpr, matrix.c * dpr, matrix.d * dpr, matrix.e * dpr, matrix.f * dpr), setTransform && this.setTransformForCurrent();
|
|
6008
5940
|
}
|
|
6009
|
-
resetTransform() {
|
|
6010
|
-
let setTransform = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
6011
|
-
let dpr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.dpr;
|
|
5941
|
+
resetTransform(setTransform = !0, dpr = this.dpr) {
|
|
6012
5942
|
this.setTransform(dpr, 0, 0, dpr, 0, 0), setTransform && this.setTransformForCurrent();
|
|
6013
5943
|
}
|
|
6014
|
-
transform(a, b, c, d, e, f) {
|
|
6015
|
-
let setTransform = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !0;
|
|
5944
|
+
transform(a, b, c, d, e, f, setTransform = !0) {
|
|
6016
5945
|
this.matrix.multiply(a, b, c, d, e, f), setTransform && this.setTransformForCurrent();
|
|
6017
5946
|
}
|
|
6018
5947
|
transformFromMatrix(matrix, setTransform) {
|
|
6019
5948
|
this.matrix.multiply(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f), setTransform && this.setTransformForCurrent();
|
|
6020
5949
|
}
|
|
6021
|
-
translate(x, y) {
|
|
6022
|
-
let setTransform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
5950
|
+
translate(x, y, setTransform = !0) {
|
|
6023
5951
|
this.matrix.translate(x, y), setTransform && this.setTransformForCurrent();
|
|
6024
5952
|
}
|
|
6025
|
-
rotateDegrees(deg) {
|
|
6026
|
-
let setTransform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
5953
|
+
rotateDegrees(deg, setTransform = !0) {
|
|
6027
5954
|
const rad = deg * Math.PI / 180;
|
|
6028
5955
|
this.rotate(rad, setTransform);
|
|
6029
5956
|
}
|
|
6030
|
-
rotateAbout(rad, x, y) {
|
|
6031
|
-
let setTransform = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !0;
|
|
5957
|
+
rotateAbout(rad, x, y, setTransform = !0) {
|
|
6032
5958
|
this.translate(x, y, !1), this.rotate(rad, !1), this.translate(-x, -y, !1), setTransform && this.setTransformForCurrent();
|
|
6033
5959
|
}
|
|
6034
|
-
rotateDegreesAbout(deg, x, y) {
|
|
6035
|
-
let setTransform = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !0;
|
|
5960
|
+
rotateDegreesAbout(deg, x, y, setTransform = !0) {
|
|
6036
5961
|
this.translate(x, y, !1), this.rotateDegrees(deg, !1), this.translate(-x, -y, !1), setTransform && this.setTransformForCurrent();
|
|
6037
5962
|
}
|
|
6038
5963
|
beginPath() {
|
|
@@ -6126,19 +6051,16 @@ let EmptyContext2d = class {
|
|
|
6126
6051
|
setTextStyleWithoutAlignBaseline(params, defaultParams) {}
|
|
6127
6052
|
setTextStyle(params, defaultParams) {}
|
|
6128
6053
|
draw() {}
|
|
6129
|
-
clearMatrix() {
|
|
6130
|
-
let setTransform = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
6131
|
-
let dpr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.dpr;
|
|
6054
|
+
clearMatrix(setTransform = !0, dpr = this.dpr) {
|
|
6132
6055
|
this.setTransformFromMatrix(initMatrix, setTransform, dpr);
|
|
6133
6056
|
}
|
|
6134
6057
|
setClearMatrix(a, b, c, d, e, f) {
|
|
6135
6058
|
this._clearMatrix.setValue(a, b, c, d, e, f);
|
|
6136
6059
|
}
|
|
6137
|
-
onlyTranslate() {
|
|
6138
|
-
let dpr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dpr;
|
|
6060
|
+
onlyTranslate(dpr = this.dpr) {
|
|
6139
6061
|
return this.matrix.a === dpr && 0 === this.matrix.b && 0 === this.matrix.c && this.matrix.d === dpr;
|
|
6140
6062
|
}
|
|
6141
|
-
release() {
|
|
6063
|
+
release(...params) {
|
|
6142
6064
|
this.stack.forEach(m => matrixAllocate.free(m)), this.stack.length = 0;
|
|
6143
6065
|
}
|
|
6144
6066
|
};
|
|
@@ -6149,9 +6071,7 @@ var ColorType;
|
|
|
6149
6071
|
ColorType[ColorType.Color255 = 0] = "Color255", ColorType[ColorType.Color1 = 1] = "Color1";
|
|
6150
6072
|
}(ColorType || (ColorType = {}));
|
|
6151
6073
|
class ColorStore {
|
|
6152
|
-
static Get(str) {
|
|
6153
|
-
let size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ColorType.Color1;
|
|
6154
|
-
let arr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [0, 0, 0, 1];
|
|
6074
|
+
static Get(str, size = ColorType.Color1, arr = [0, 0, 0, 1]) {
|
|
6155
6075
|
if (size === ColorType.Color1) {
|
|
6156
6076
|
const color = ColorStore.store1[str];
|
|
6157
6077
|
if (color) return arr[0] = color[0], arr[1] = color[1], arr[2] = color[2], arr[3] = color[3], arr;
|
|
@@ -6179,8 +6099,7 @@ class ColorStore {
|
|
|
6179
6099
|
}
|
|
6180
6100
|
ColorStore.store255 = {}, ColorStore.store1 = {};
|
|
6181
6101
|
|
|
6182
|
-
function colorArrayToString(color) {
|
|
6183
|
-
let alphaChannel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
6102
|
+
function colorArrayToString(color, alphaChannel = !1) {
|
|
6184
6103
|
return Array.isArray(color) && isNumber(color[0]) ? alphaChannel ? `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])},${color[3].toFixed(2)})` : `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])})` : color;
|
|
6185
6104
|
}
|
|
6186
6105
|
function interpolateColor(from, to, ratio, alphaChannel, cb) {
|
|
@@ -6364,8 +6283,7 @@ class Graphic extends Node {
|
|
|
6364
6283
|
get globalTransMatrix() {
|
|
6365
6284
|
return this.tryUpdateGlobalTransMatrix(!0);
|
|
6366
6285
|
}
|
|
6367
|
-
constructor() {
|
|
6368
|
-
let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
6286
|
+
constructor(params = {}) {
|
|
6369
6287
|
var _a;
|
|
6370
6288
|
super(), this._AABBBounds = new AABBBounds(), this._updateTag = UpdateTag.INIT, this.attribute = params, this.valid = this.isValid(), this.updateAABBBoundsStamp = 0, params.background ? this.loadImage(null !== (_a = params.background.background) && void 0 !== _a ? _a : params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic);
|
|
6371
6289
|
}
|
|
@@ -6385,8 +6303,7 @@ class Graphic extends Node {
|
|
|
6385
6303
|
set2dMode() {
|
|
6386
6304
|
this.in3dMode = !1;
|
|
6387
6305
|
}
|
|
6388
|
-
getOffsetXY(attr) {
|
|
6389
|
-
let includeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
6306
|
+
getOffsetXY(attr, includeScroll = !1) {
|
|
6390
6307
|
var _a, _b;
|
|
6391
6308
|
const {
|
|
6392
6309
|
dx = attr.dx,
|
|
@@ -6497,7 +6414,7 @@ class Graphic extends Node {
|
|
|
6497
6414
|
const b = this.AABBBounds;
|
|
6498
6415
|
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;
|
|
6499
6416
|
}
|
|
6500
|
-
tryUpdateGlobalTransMatrix() {
|
|
6417
|
+
tryUpdateGlobalTransMatrix(clearTag = !0) {
|
|
6501
6418
|
if (this._globalTransMatrix) {
|
|
6502
6419
|
if (this.parent) {
|
|
6503
6420
|
const m = this.parent.globalTransMatrix;
|
|
@@ -6509,8 +6426,7 @@ class Graphic extends Node {
|
|
|
6509
6426
|
shouldUpdateGlobalMatrix() {
|
|
6510
6427
|
return !0;
|
|
6511
6428
|
}
|
|
6512
|
-
tryUpdateLocalTransMatrix() {
|
|
6513
|
-
let clearTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
6429
|
+
tryUpdateLocalTransMatrix(clearTag = !0) {
|
|
6514
6430
|
return this._transMatrix || (this._transMatrix = new Matrix()), this.shouldUpdateLocalMatrix() && (this.doUpdateLocalMatrix(), clearTag && this.clearUpdateLocalPositionTag()), this._transMatrix;
|
|
6515
6431
|
}
|
|
6516
6432
|
shouldUpdateAABBBounds() {
|
|
@@ -6550,24 +6466,17 @@ class Graphic extends Node {
|
|
|
6550
6466
|
setWidthHeightWithoutTransform(aabbBounds) {
|
|
6551
6467
|
this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1, this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1;
|
|
6552
6468
|
}
|
|
6553
|
-
setAttributesAndPreventAnimate(params) {
|
|
6554
|
-
let forceUpdateTag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
6555
|
-
let context = arguments.length > 2 ? arguments[2] : undefined;
|
|
6556
|
-
let ignorePriority = arguments.length > 3 ? arguments[3] : undefined;
|
|
6469
|
+
setAttributesAndPreventAnimate(params, forceUpdateTag = !1, context, ignorePriority) {
|
|
6557
6470
|
this.setAttributes(params, forceUpdateTag, context), this.animates && this.animates.forEach(animate => {
|
|
6558
6471
|
(animate.priority !== 1 / 0 || ignorePriority) && Object.keys(params).forEach(key => {
|
|
6559
6472
|
animate.preventAttr(key);
|
|
6560
6473
|
});
|
|
6561
6474
|
});
|
|
6562
6475
|
}
|
|
6563
|
-
setAttributes(params) {
|
|
6564
|
-
let forceUpdateTag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
6565
|
-
let context = arguments.length > 2 ? arguments[2] : undefined;
|
|
6476
|
+
setAttributes(params, forceUpdateTag = !1, context) {
|
|
6566
6477
|
params && ((params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background ? this.loadImage(params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic), this._setAttributes(params, forceUpdateTag, context));
|
|
6567
6478
|
}
|
|
6568
|
-
_setAttributes(params) {
|
|
6569
|
-
let forceUpdateTag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
6570
|
-
let context = arguments.length > 2 ? arguments[2] : undefined;
|
|
6479
|
+
_setAttributes(params, forceUpdateTag = !1, context) {
|
|
6571
6480
|
const keys = Object.keys(params);
|
|
6572
6481
|
for (let i = 0; i < keys.length; i++) {
|
|
6573
6482
|
const key = keys[i];
|
|
@@ -6582,16 +6491,14 @@ class Graphic extends Node {
|
|
|
6582
6491
|
}, this.attribute, key, context);
|
|
6583
6492
|
params ? this._setAttributes(params, forceUpdateTag, context) : isNil(null === (_a = this.normalAttrs) || void 0 === _a ? void 0 : _a[key]) ? (this.attribute[key] = value, this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTag(key) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.addUpdateLayoutTag(), this.onAttributeUpdate(context)) : this.normalAttrs[key] = value, "background" === key ? this.loadImage(value, !0) : "shadowGraphic" === key && this.setShadowGraphic(value);
|
|
6584
6493
|
}
|
|
6585
|
-
needUpdateTags(keys) {
|
|
6586
|
-
let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : GRAPHIC_UPDATE_TAG_KEY;
|
|
6494
|
+
needUpdateTags(keys, k = GRAPHIC_UPDATE_TAG_KEY) {
|
|
6587
6495
|
for (let i = 0; i < k.length; i++) {
|
|
6588
6496
|
const attrKey = k[i];
|
|
6589
6497
|
if (-1 !== keys.indexOf(attrKey)) return !0;
|
|
6590
6498
|
}
|
|
6591
6499
|
return !1;
|
|
6592
6500
|
}
|
|
6593
|
-
needUpdateTag(key) {
|
|
6594
|
-
let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : GRAPHIC_UPDATE_TAG_KEY;
|
|
6501
|
+
needUpdateTag(key, k = GRAPHIC_UPDATE_TAG_KEY) {
|
|
6595
6502
|
for (let i = 0; i < k.length; i++) {
|
|
6596
6503
|
if (key === k[i]) return !0;
|
|
6597
6504
|
}
|
|
@@ -6747,8 +6654,7 @@ class Graphic extends Node {
|
|
|
6747
6654
|
newNormalAttrs[key] = this.getNormalAttribute(key);
|
|
6748
6655
|
}), this.normalAttrs = newNormalAttrs;
|
|
6749
6656
|
}
|
|
6750
|
-
stopStateAnimates() {
|
|
6751
|
-
let type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "end";
|
|
6657
|
+
stopStateAnimates(type = "end") {
|
|
6752
6658
|
this.animates && this.animates.forEach(animate => {
|
|
6753
6659
|
animate.stateNames && (animate.stop(type), this.animates.delete(animate.id));
|
|
6754
6660
|
});
|
|
@@ -6913,8 +6819,7 @@ class Graphic extends Node {
|
|
|
6913
6819
|
var _a;
|
|
6914
6820
|
return null !== (_a = this.attribute[name]) && void 0 !== _a ? _a : this.getDefaultAttribute(name);
|
|
6915
6821
|
}
|
|
6916
|
-
onSetStage(cb) {
|
|
6917
|
-
let immediate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
6822
|
+
onSetStage(cb, immediate = !1) {
|
|
6918
6823
|
this._onSetStage = cb, immediate && this.stage && cb(this, this.stage);
|
|
6919
6824
|
}
|
|
6920
6825
|
attachShadow(shadowRoot) {
|
|
@@ -6935,9 +6840,9 @@ class Graphic extends Node {
|
|
|
6935
6840
|
createPathProxy(path) {
|
|
6936
6841
|
return isString(path, !0) ? this.pathProxy = new CustomPath2D().fromString(path) : this.pathProxy = new CustomPath2D(), this.pathProxy;
|
|
6937
6842
|
}
|
|
6938
|
-
loadImage(image) {
|
|
6939
|
-
|
|
6940
|
-
if (!image
|
|
6843
|
+
loadImage(image, background = !1) {
|
|
6844
|
+
if (background && (null == image ? void 0 : image.background) && (image = image.background), background && (!image || backgroundNotImage(image))) return void (this.backgroundImg = !1);
|
|
6845
|
+
if (!image) return;
|
|
6941
6846
|
const url = image;
|
|
6942
6847
|
this.resources || (this.resources = new Map());
|
|
6943
6848
|
const cache = {
|
|
@@ -6966,8 +6871,7 @@ class Graphic extends Node {
|
|
|
6966
6871
|
animate.stop();
|
|
6967
6872
|
});
|
|
6968
6873
|
}
|
|
6969
|
-
stopAnimates() {
|
|
6970
|
-
let stopChildren = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
6874
|
+
stopAnimates(stopChildren = !1) {
|
|
6971
6875
|
this._stopAnimates(this.animates), this.shadowRoot && this.shadowRoot.stopAnimates(!0), this.isContainer && stopChildren && this.forEachChildren(c => {
|
|
6972
6876
|
c.stopAnimates(stopChildren);
|
|
6973
6877
|
});
|
|
@@ -6993,7 +6897,7 @@ class Graphic extends Node {
|
|
|
6993
6897
|
}
|
|
6994
6898
|
}
|
|
6995
6899
|
function backgroundNotImage(image) {
|
|
6996
|
-
return !(!image.fill && !image.stroke);
|
|
6900
|
+
return "string" == typeof image ? !(image.startsWith("<svg") || isValidUrl(image) || image.includes("/") || isBase64(image)) : !(!image.fill && !image.stroke) || !("string" != typeof image.gradient || !Array.isArray(image.stops));
|
|
6997
6901
|
}
|
|
6998
6902
|
Graphic.userSymbolMap = {}, Graphic.mixin(EventTarget);
|
|
6999
6903
|
|
|
@@ -7115,8 +7019,7 @@ class Group extends Graphic {
|
|
|
7115
7019
|
_updateChildToStage(child) {
|
|
7116
7020
|
return this.stage && child && child.setStage(this.stage, this.layer), this.addUpdateBoundTag(), child;
|
|
7117
7021
|
}
|
|
7118
|
-
appendChild(node) {
|
|
7119
|
-
let addStage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
7022
|
+
appendChild(node, addStage = !0) {
|
|
7120
7023
|
const data = super.appendChild(node);
|
|
7121
7024
|
return addStage && this.stage && data && data.setStage(this.stage, this.layer), this.addUpdateBoundTag(), data;
|
|
7122
7025
|
}
|
|
@@ -7133,8 +7036,7 @@ class Group extends Graphic {
|
|
|
7133
7036
|
const data = super.removeChild(child);
|
|
7134
7037
|
return this.getGraphicService().onRemove(child), child.stage = null, this.addUpdateBoundTag(), data;
|
|
7135
7038
|
}
|
|
7136
|
-
removeAllChild() {
|
|
7137
|
-
let deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
7039
|
+
removeAllChild(deep = !1) {
|
|
7138
7040
|
this.forEachChildren(child => {
|
|
7139
7041
|
this.getGraphicService().onRemove(child), deep && child.isContainer && child.removeAllChild(deep);
|
|
7140
7042
|
}), super.removeAllChild(), this.addUpdateBoundTag();
|
|
@@ -7154,8 +7056,7 @@ class Group extends Graphic {
|
|
|
7154
7056
|
g.isContainer && g.addUpdateGlobalPositionTag();
|
|
7155
7057
|
});
|
|
7156
7058
|
}
|
|
7157
|
-
tryUpdateGlobalTransMatrix() {
|
|
7158
|
-
let clearTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
7059
|
+
tryUpdateGlobalTransMatrix(clearTag = !0) {
|
|
7159
7060
|
if (this.shouldUpdateGlobalMatrix()) {
|
|
7160
7061
|
if (this._globalTransMatrix) {
|
|
7161
7062
|
if (this.parent) {
|
|
@@ -7229,8 +7130,7 @@ class Layer extends Group {
|
|
|
7229
7130
|
zIndex: null !== (_a = params.zIndex) && void 0 !== _a ? _a : 0
|
|
7230
7131
|
}), this.layer = this, this.subLayers = new Map(), this.theme = new Theme(), this.background = "rgba(0, 0, 0, 0)", this.afterDrawCbs = [];
|
|
7231
7132
|
}
|
|
7232
|
-
combineSubLayer() {
|
|
7233
|
-
let removeIncrementalKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
7133
|
+
combineSubLayer(removeIncrementalKey = !0) {
|
|
7234
7134
|
const subLayers = Array.from(this.subLayers.values()).sort((a, b) => a.zIndex - b.zIndex);
|
|
7235
7135
|
this.layerHandler.merge(subLayers.map(l => (l.layer.subLayers.size && l.layer.combineSubLayer(removeIncrementalKey), l.layer.getNativeHandler()))), removeIncrementalKey && subLayers.forEach(l => {
|
|
7236
7136
|
l.group && (l.group.incremental = 0);
|
|
@@ -7339,10 +7239,9 @@ let DefaultLayerService = DefaultLayerService_1 = class {
|
|
|
7339
7239
|
let layerHandler;
|
|
7340
7240
|
return layerHandler = "static" === layerMode ? container.get(StaticLayerHandlerContribution) : "dynamic" === layerMode ? container.get(DynamicLayerHandlerContribution) : container.get(VirtualLayerHandlerContribution), layerHandler;
|
|
7341
7241
|
}
|
|
7342
|
-
createLayer(stage
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
};
|
|
7242
|
+
createLayer(stage, options = {
|
|
7243
|
+
main: !1
|
|
7244
|
+
}) {
|
|
7346
7245
|
var _a;
|
|
7347
7246
|
this.tryInit();
|
|
7348
7247
|
let layerMode = this.getRecommendedLayerType(options.layerMode);
|
|
@@ -7583,8 +7482,7 @@ const InteractiveSubRenderContribution = Symbol.for("InteractiveSubRenderContrib
|
|
|
7583
7482
|
function textDrawOffsetX(textAlign, width) {
|
|
7584
7483
|
return "end" === textAlign || "right" === textAlign ? -width : "center" === textAlign ? -width / 2 : 0;
|
|
7585
7484
|
}
|
|
7586
|
-
function textLayoutOffsetY(baseline, lineHeight, fontSize) {
|
|
7587
|
-
let buf = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
7485
|
+
function textLayoutOffsetY(baseline, lineHeight, fontSize, buf = 0) {
|
|
7588
7486
|
return "middle" === baseline ? -lineHeight / 2 : "top" === baseline ? 0 : "bottom" === baseline ? buf - lineHeight : baseline && "alphabetic" !== baseline ? 0 : (fontSize || (fontSize = lineHeight), -(lineHeight - fontSize) / 2 - .79 * fontSize);
|
|
7589
7487
|
}
|
|
7590
7488
|
|
|
@@ -7798,10 +7696,9 @@ const updateBoundsOfCommonOuterBorder = (attribute, theme, aabbBounds) => {
|
|
|
7798
7696
|
|
|
7799
7697
|
const CIRCLE_UPDATE_TAG_KEY = ["radius", "startAngle", "endAngle", ...GRAPHIC_UPDATE_TAG_KEY];
|
|
7800
7698
|
class Circle extends Graphic {
|
|
7801
|
-
constructor(
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
};
|
|
7699
|
+
constructor(params = {
|
|
7700
|
+
radius: 1
|
|
7701
|
+
}) {
|
|
7805
7702
|
super(params), this.type = "circle", this.numberType = CIRCLE_NUMBER_TYPE;
|
|
7806
7703
|
}
|
|
7807
7704
|
isValid() {
|
|
@@ -7883,10 +7780,7 @@ class CanvasTextLayout {
|
|
|
7883
7780
|
} else bbox.yOffset = -bbox.height;
|
|
7884
7781
|
return bbox;
|
|
7885
7782
|
}
|
|
7886
|
-
GetLayoutByLines(lines, textAlign, textBaseline, lineHeight) {
|
|
7887
|
-
let suffix = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "";
|
|
7888
|
-
let wordBreak = arguments.length > 5 ? arguments[5] : undefined;
|
|
7889
|
-
let params = arguments.length > 6 ? arguments[6] : undefined;
|
|
7783
|
+
GetLayoutByLines(lines, textAlign, textBaseline, lineHeight, suffix = "", wordBreak, params) {
|
|
7890
7784
|
const {
|
|
7891
7785
|
lineWidth: lineWidth,
|
|
7892
7786
|
suffixPosition = "end",
|
|
@@ -8009,11 +7903,10 @@ class Text extends Graphic {
|
|
|
8009
7903
|
get isMultiLine() {
|
|
8010
7904
|
return Array.isArray(this.attribute.text) || "normal" === this.attribute.whiteSpace;
|
|
8011
7905
|
}
|
|
8012
|
-
constructor(
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
};
|
|
7906
|
+
constructor(params = {
|
|
7907
|
+
text: "",
|
|
7908
|
+
fontSize: 16
|
|
7909
|
+
}) {
|
|
8017
7910
|
super(params), this.type = "text", this.numberType = TEXT_NUMBER_TYPE, this.cache = {};
|
|
8018
7911
|
}
|
|
8019
7912
|
isValid() {
|
|
@@ -8345,12 +8238,10 @@ class Text extends Graphic {
|
|
|
8345
8238
|
var _a;
|
|
8346
8239
|
return null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
|
|
8347
8240
|
}
|
|
8348
|
-
needUpdateTags(keys) {
|
|
8349
|
-
let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : TEXT_UPDATE_TAG_KEY;
|
|
8241
|
+
needUpdateTags(keys, k = TEXT_UPDATE_TAG_KEY) {
|
|
8350
8242
|
return super.needUpdateTags(keys, k);
|
|
8351
8243
|
}
|
|
8352
|
-
needUpdateTag(key) {
|
|
8353
|
-
let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : TEXT_UPDATE_TAG_KEY;
|
|
8244
|
+
needUpdateTag(key, k = TEXT_UPDATE_TAG_KEY) {
|
|
8354
8245
|
return super.needUpdateTag(key, k);
|
|
8355
8246
|
}
|
|
8356
8247
|
_interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes) {
|
|
@@ -8553,19 +8444,15 @@ const updateBoundsOfSymbolOuterBorder = (attribute, symbolTheme, aabbBounds) =>
|
|
|
8553
8444
|
|
|
8554
8445
|
const SYMBOL_UPDATE_TAG_KEY = ["symbolType", "size", ...GRAPHIC_UPDATE_TAG_KEY];
|
|
8555
8446
|
let Symbol$1 = class Symbol extends Graphic {
|
|
8556
|
-
constructor(
|
|
8557
|
-
|
|
8558
|
-
|
|
8559
|
-
};
|
|
8447
|
+
constructor(params = {
|
|
8448
|
+
symbolType: "circle"
|
|
8449
|
+
}) {
|
|
8560
8450
|
super(params), this.type = "symbol", this.numberType = SYMBOL_NUMBER_TYPE;
|
|
8561
8451
|
}
|
|
8562
8452
|
getParsedPath() {
|
|
8563
8453
|
return this.shouldUpdateShape() && (this._parsedPath = this.doUpdateParsedPath(), this.clearUpdateShapeTag()), this._parsedPath;
|
|
8564
8454
|
}
|
|
8565
|
-
getParsedPath2D() {
|
|
8566
|
-
let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
8567
|
-
let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
8568
|
-
let size = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
8455
|
+
getParsedPath2D(x = 0, y = 0, size = 1) {
|
|
8569
8456
|
let path = null;
|
|
8570
8457
|
try {
|
|
8571
8458
|
path = new Path2D();
|
|
@@ -8652,8 +8539,7 @@ function createSymbol(attributes) {
|
|
|
8652
8539
|
|
|
8653
8540
|
const LINE_UPDATE_TAG_KEY = ["segments", "points", "curveType", "curveTension", ...GRAPHIC_UPDATE_TAG_KEY];
|
|
8654
8541
|
let Line$1 = class Line extends Graphic {
|
|
8655
|
-
constructor() {
|
|
8656
|
-
let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
8542
|
+
constructor(params = {}) {
|
|
8657
8543
|
super(params), this.type = "line", this.numberType = LINE_NUMBER_TYPE;
|
|
8658
8544
|
}
|
|
8659
8545
|
isValid() {
|
|
@@ -9105,7 +8991,7 @@ function seperateParagraph(paragraph, index) {
|
|
|
9105
8991
|
return [new Paragraph(text1, paragraph.newLine, paragraph.character, paragraph.ascentDescentMode), new Paragraph(text2, !0, paragraph.character, paragraph.ascentDescentMode)];
|
|
9106
8992
|
}
|
|
9107
8993
|
|
|
9108
|
-
const IMAGE_UPDATE_TAG_KEY = ["width", "height", "image", ...GRAPHIC_UPDATE_TAG_KEY];
|
|
8994
|
+
const IMAGE_UPDATE_TAG_KEY = ["width", "height", "image", "imageMode", "imagePosition", "imageScale", "imageOffsetX", "imageOffsetY", ...GRAPHIC_UPDATE_TAG_KEY];
|
|
9109
8995
|
class Image extends Graphic {
|
|
9110
8996
|
constructor(params) {
|
|
9111
8997
|
super(params), this.type = "image", this.numberType = IMAGE_NUMBER_TYPE, this.loadImage(this.attribute.image);
|
|
@@ -9210,6 +9096,7 @@ class Image extends Graphic {
|
|
|
9210
9096
|
}
|
|
9211
9097
|
Image.NOWORK_ANIMATE_ATTR = Object.assign({
|
|
9212
9098
|
image: 1,
|
|
9099
|
+
imageMode: 1,
|
|
9213
9100
|
repeatX: 1,
|
|
9214
9101
|
repeatY: 1
|
|
9215
9102
|
}, NOWORK_ANIMATE_ATTR);
|
|
@@ -9391,8 +9278,7 @@ class Wrapper {
|
|
|
9391
9278
|
line = new Line(this.frame.left, this[this.directionKey.width], this.y + maxAscent, maxAscent, maxDescent, this.lineBuffer, this.direction, "horizontal" === this.direction ? this.frame.isWidthMax : this.frame.isHeightMax);
|
|
9392
9279
|
this.frame.lines.push(line), this.frame.actualHeight += line.height, this.y += line.height, this.lineBuffer.length = 0, this.lineWidth = this.maxAscent = this.maxDescent = this.maxAscentForBlank = this.maxDescentForBlank = 0;
|
|
9393
9280
|
}
|
|
9394
|
-
deal(paragraph) {
|
|
9395
|
-
let singleLine = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
9281
|
+
deal(paragraph, singleLine = !1) {
|
|
9396
9282
|
paragraph instanceof RichTextIcon ? "horizontal" === this.direction && 0 === this.width || "vertical" === this.direction && 0 === this.height || this.lineWidth + paragraph[this.directionKey.width] <= this[this.directionKey.width] ? this.store(paragraph) : 0 === this.lineBuffer.length ? (this.store(paragraph), this.send()) : (this.send(), this.deal(paragraph)) : "number" != typeof this.width || this.width < 0 || (paragraph.newLine && this.send(), (0 !== paragraph.text.length || this.newLine) && ("horizontal" === this.direction && 0 === this.width || "vertical" === this.direction && 0 === this.height || this.lineWidth + paragraph[this.directionKey.width] <= this[this.directionKey.width] ? this.store(paragraph) : this.lineWidth === this[this.directionKey.width] ? (this.send(), this.deal(paragraph)) : this.cut(paragraph, singleLine)));
|
|
9397
9283
|
}
|
|
9398
9284
|
cut(paragraph, singleLine) {
|
|
@@ -10248,11 +10134,12 @@ class DefaultBaseBackgroundRenderContribution {
|
|
|
10248
10134
|
backgroundScale = graphicAttribute.backgroundScale,
|
|
10249
10135
|
backgroundOffsetX = graphicAttribute.backgroundOffsetX,
|
|
10250
10136
|
backgroundOffsetY = graphicAttribute.backgroundOffsetY,
|
|
10251
|
-
backgroundClip = graphicAttribute.backgroundClip
|
|
10137
|
+
backgroundClip = graphicAttribute.backgroundClip,
|
|
10138
|
+
backgroundPosition = graphicAttribute.backgroundPosition
|
|
10252
10139
|
} = graphic.attribute;
|
|
10253
10140
|
if (background) if (graphic.backgroundImg && graphic.resources) {
|
|
10254
|
-
const res = graphic.resources.get(background);
|
|
10255
|
-
if ("success" !== res.state || !res.data) return;
|
|
10141
|
+
const res = graphic.resources.get(getBackgroundImage(background));
|
|
10142
|
+
if (!res || "success" !== res.state || !res.data) return;
|
|
10256
10143
|
if (context.save(), graphic.parent && !graphic.transMatrix.onlyTranslate()) {
|
|
10257
10144
|
const groupAttribute = getTheme(graphic.parent).group,
|
|
10258
10145
|
{
|
|
@@ -10269,59 +10156,160 @@ class DefaultBaseBackgroundRenderContribution {
|
|
|
10269
10156
|
backgroundKeepAspectRatio: backgroundKeepAspectRatio,
|
|
10270
10157
|
backgroundScale: backgroundScale,
|
|
10271
10158
|
backgroundOffsetX: backgroundOffsetX,
|
|
10272
|
-
backgroundOffsetY: backgroundOffsetY
|
|
10159
|
+
backgroundOffsetY: backgroundOffsetY,
|
|
10160
|
+
backgroundPosition: backgroundPosition
|
|
10273
10161
|
}), context.restore(), graphic.transMatrix.onlyTranslate() || context.setTransformForCurrent();
|
|
10274
10162
|
} else context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.globalAlpha = backgroundOpacity * opacity, context.fillStyle = background, context.fill(), context.highPerformanceRestore();
|
|
10275
10163
|
}
|
|
10276
10164
|
doDrawImage(context, data, b, params) {
|
|
10277
|
-
|
|
10278
|
-
backgroundMode: backgroundMode,
|
|
10279
|
-
backgroundFit: backgroundFit,
|
|
10280
|
-
backgroundKeepAspectRatio: backgroundKeepAspectRatio,
|
|
10281
|
-
backgroundScale = 1,
|
|
10282
|
-
backgroundOffsetX = 0,
|
|
10283
|
-
backgroundOffsetY = 0
|
|
10284
|
-
} = params,
|
|
10285
|
-
targetW = b.width(),
|
|
10286
|
-
targetH = b.height();
|
|
10287
|
-
let w = targetW,
|
|
10288
|
-
h = targetH;
|
|
10289
|
-
if ("no-repeat" === backgroundMode) {
|
|
10290
|
-
if (backgroundFit) {
|
|
10291
|
-
if (backgroundKeepAspectRatio) {
|
|
10292
|
-
const maxScale = Math.max(targetW / data.width, targetH / data.height);
|
|
10293
|
-
context.drawImage(data, b.x1 + backgroundOffsetX, b.y1 + backgroundOffsetY, data.width * maxScale * backgroundScale, data.height * maxScale * backgroundScale);
|
|
10294
|
-
} else context.drawImage(data, b.x1, b.y1, b.width(), b.height());
|
|
10295
|
-
} else {
|
|
10296
|
-
const resW = data.width * backgroundScale,
|
|
10297
|
-
resH = data.height * backgroundScale;
|
|
10298
|
-
context.drawImage(data, b.x1 + backgroundOffsetX, b.y1 + backgroundOffsetY, resW, resH);
|
|
10299
|
-
}
|
|
10300
|
-
} else {
|
|
10301
|
-
if (backgroundFit && "repeat" !== backgroundMode && (data.width || data.height)) {
|
|
10302
|
-
const resW = data.width,
|
|
10303
|
-
resH = data.height;
|
|
10304
|
-
if ("repeat-x" === backgroundMode) {
|
|
10305
|
-
w = resW * (targetH / resH), h = targetH;
|
|
10306
|
-
} else if ("repeat-y" === backgroundMode) {
|
|
10307
|
-
h = resH * (targetW / resW), w = targetW;
|
|
10308
|
-
}
|
|
10309
|
-
const dpr = context.dpr,
|
|
10310
|
-
canvas = canvasAllocate.allocate({
|
|
10311
|
-
width: w,
|
|
10312
|
-
height: h,
|
|
10313
|
-
dpr: dpr
|
|
10314
|
-
}),
|
|
10315
|
-
ctx = canvas.getContext("2d");
|
|
10316
|
-
ctx && (ctx.inuse = !0, ctx.clearMatrix(), ctx.setTransformForCurrent(!0), ctx.clearRect(0, 0, w, h), ctx.drawImage(data, 0, 0, w, h), data = canvas.nativeCanvas), canvasAllocate.free(canvas);
|
|
10317
|
-
}
|
|
10318
|
-
const dpr = context.dpr,
|
|
10319
|
-
pattern = context.createPattern(data, backgroundMode);
|
|
10320
|
-
pattern.setTransform && pattern.setTransform(new DOMMatrix([1 / dpr, 0, 0, 1 / dpr, 0, 0])), context.fillStyle = pattern, context.translate(b.x1, b.y1), context.fillRect(0, 0, targetW, targetH), context.translate(-b.x1, -b.y1);
|
|
10321
|
-
}
|
|
10165
|
+
drawBackgroundImage(context, data, b, params);
|
|
10322
10166
|
}
|
|
10323
10167
|
}
|
|
10324
10168
|
const defaultBaseBackgroundRenderContribution = new DefaultBaseBackgroundRenderContribution();
|
|
10169
|
+
const verticalPositionKeywords = new Set(["top", "center", "bottom"]);
|
|
10170
|
+
function getBackgroundImage(background) {
|
|
10171
|
+
var _a;
|
|
10172
|
+
return null !== (_a = null == background ? void 0 : background.background) && void 0 !== _a ? _a : background;
|
|
10173
|
+
}
|
|
10174
|
+
function resolveBackgroundSizing({
|
|
10175
|
+
backgroundFit: backgroundFit,
|
|
10176
|
+
backgroundKeepAspectRatio: backgroundKeepAspectRatio
|
|
10177
|
+
}) {
|
|
10178
|
+
return backgroundFit ? backgroundKeepAspectRatio ? "cover" : "fill" : "auto";
|
|
10179
|
+
}
|
|
10180
|
+
const NO_REPEAT_SIZING_MAP = {
|
|
10181
|
+
"no-repeat-cover": "cover",
|
|
10182
|
+
"no-repeat-contain": "contain",
|
|
10183
|
+
"no-repeat-fill": "fill",
|
|
10184
|
+
"no-repeat-auto": "auto"
|
|
10185
|
+
};
|
|
10186
|
+
function resolveBackgroundDrawMode({
|
|
10187
|
+
backgroundMode: backgroundMode,
|
|
10188
|
+
backgroundFit: backgroundFit,
|
|
10189
|
+
backgroundKeepAspectRatio: backgroundKeepAspectRatio
|
|
10190
|
+
}) {
|
|
10191
|
+
const sizing = NO_REPEAT_SIZING_MAP[backgroundMode];
|
|
10192
|
+
return sizing ? {
|
|
10193
|
+
backgroundRepeatMode: "no-repeat",
|
|
10194
|
+
backgroundSizing: sizing
|
|
10195
|
+
} : {
|
|
10196
|
+
backgroundRepeatMode: backgroundMode,
|
|
10197
|
+
backgroundSizing: resolveBackgroundSizing({
|
|
10198
|
+
backgroundFit: backgroundFit,
|
|
10199
|
+
backgroundKeepAspectRatio: backgroundKeepAspectRatio
|
|
10200
|
+
})
|
|
10201
|
+
};
|
|
10202
|
+
}
|
|
10203
|
+
function isPercentageValue(value) {
|
|
10204
|
+
return /^-?\d+(\.\d+)?%$/.test(value);
|
|
10205
|
+
}
|
|
10206
|
+
function parsePositionToken(value, remainSpace, startKeyword, centerKeyword, endKeyword) {
|
|
10207
|
+
if ("number" == typeof value && Number.isFinite(value)) return value;
|
|
10208
|
+
const normalizedValue = `${null != value ? value : ""}`.trim().toLowerCase();
|
|
10209
|
+
if (!normalizedValue || normalizedValue === startKeyword) return 0;
|
|
10210
|
+
if (normalizedValue === centerKeyword) return remainSpace / 2;
|
|
10211
|
+
if (normalizedValue === endKeyword) return remainSpace;
|
|
10212
|
+
if (isPercentageValue(normalizedValue)) return remainSpace * parseFloat(normalizedValue) / 100;
|
|
10213
|
+
const parsedValue = Number(normalizedValue);
|
|
10214
|
+
return Number.isFinite(parsedValue) ? parsedValue : 0;
|
|
10215
|
+
}
|
|
10216
|
+
function normalizeBackgroundPosition(position) {
|
|
10217
|
+
var _a, _b;
|
|
10218
|
+
if (Array.isArray(position)) return [null !== (_a = position[0]) && void 0 !== _a ? _a : "left", null !== (_b = position[1]) && void 0 !== _b ? _b : "top"];
|
|
10219
|
+
const tokens = `${null != position ? position : "top-left"}`.trim().toLowerCase().replace(/-/g, " ").split(/\s+/).filter(Boolean);
|
|
10220
|
+
if (0 === tokens.length) return ["left", "top"];
|
|
10221
|
+
if (1 === tokens.length) {
|
|
10222
|
+
const token = tokens[0];
|
|
10223
|
+
return "center" === token ? ["center", "center"] : verticalPositionKeywords.has(token) ? ["center", token] : [token, "center"];
|
|
10224
|
+
}
|
|
10225
|
+
let horizontal, vertical;
|
|
10226
|
+
const genericTokens = [];
|
|
10227
|
+
for (let i = 0; i < 2; i++) {
|
|
10228
|
+
const token = tokens[i];
|
|
10229
|
+
"left" !== token && "right" !== token ? "top" !== token && "bottom" !== token ? genericTokens.push(token) : vertical = token : horizontal = token;
|
|
10230
|
+
}
|
|
10231
|
+
return null == horizontal && genericTokens.length && (horizontal = genericTokens.shift()), null == vertical && genericTokens.length && (vertical = genericTokens.shift()), [null != horizontal ? horizontal : "left", null != vertical ? vertical : "top"];
|
|
10232
|
+
}
|
|
10233
|
+
function resolveBackgroundPosition(position, remainWidth, remainHeight) {
|
|
10234
|
+
const [horizontalPosition, verticalPosition] = normalizeBackgroundPosition(position);
|
|
10235
|
+
return {
|
|
10236
|
+
x: parsePositionToken(horizontalPosition, remainWidth, "left", "center", "right"),
|
|
10237
|
+
y: parsePositionToken(verticalPosition, remainHeight, "top", "center", "bottom")
|
|
10238
|
+
};
|
|
10239
|
+
}
|
|
10240
|
+
function pickRenderableDimension(...values) {
|
|
10241
|
+
for (const value of values) if ("number" == typeof value && Number.isFinite(value) && value > 0) return value;
|
|
10242
|
+
return null;
|
|
10243
|
+
}
|
|
10244
|
+
function resolveRenderableImageSize(data) {
|
|
10245
|
+
if (!data) return null;
|
|
10246
|
+
const width = pickRenderableDimension(data.naturalWidth, data.videoWidth, data.width),
|
|
10247
|
+
height = pickRenderableDimension(data.naturalHeight, data.videoHeight, data.height);
|
|
10248
|
+
return null == width || null == height ? null : {
|
|
10249
|
+
width: width,
|
|
10250
|
+
height: height
|
|
10251
|
+
};
|
|
10252
|
+
}
|
|
10253
|
+
function drawBackgroundImage(context, data, b, params) {
|
|
10254
|
+
var _a, _b;
|
|
10255
|
+
const {
|
|
10256
|
+
backgroundMode: backgroundMode,
|
|
10257
|
+
backgroundFit: backgroundFit,
|
|
10258
|
+
backgroundKeepAspectRatio: backgroundKeepAspectRatio,
|
|
10259
|
+
backgroundScale = 1,
|
|
10260
|
+
backgroundOffsetX = 0,
|
|
10261
|
+
backgroundOffsetY = 0,
|
|
10262
|
+
backgroundPosition = "top-left"
|
|
10263
|
+
} = params,
|
|
10264
|
+
targetW = b.width(),
|
|
10265
|
+
targetH = b.height(),
|
|
10266
|
+
sourceSize = resolveRenderableImageSize(data),
|
|
10267
|
+
{
|
|
10268
|
+
backgroundRepeatMode: backgroundRepeatMode,
|
|
10269
|
+
backgroundSizing: resolvedBackgroundSizing
|
|
10270
|
+
} = resolveBackgroundDrawMode({
|
|
10271
|
+
backgroundMode: backgroundMode,
|
|
10272
|
+
backgroundFit: backgroundFit,
|
|
10273
|
+
backgroundKeepAspectRatio: backgroundKeepAspectRatio
|
|
10274
|
+
});
|
|
10275
|
+
let w = targetW,
|
|
10276
|
+
h = targetH;
|
|
10277
|
+
if (targetW <= 0 || targetH <= 0) return;
|
|
10278
|
+
if ("no-repeat" === backgroundRepeatMode) {
|
|
10279
|
+
let drawWidth = null !== (_a = null == sourceSize ? void 0 : sourceSize.width) && void 0 !== _a ? _a : targetW,
|
|
10280
|
+
drawHeight = null !== (_b = null == sourceSize ? void 0 : sourceSize.height) && void 0 !== _b ? _b : targetH;
|
|
10281
|
+
if ("cover" !== resolvedBackgroundSizing && "contain" !== resolvedBackgroundSizing || !sourceSize) "fill" === resolvedBackgroundSizing && (drawWidth = targetW, drawHeight = targetH);else {
|
|
10282
|
+
const scale = "cover" === resolvedBackgroundSizing ? Math.max(targetW / sourceSize.width, targetH / sourceSize.height) : Math.min(targetW / sourceSize.width, targetH / sourceSize.height);
|
|
10283
|
+
drawWidth = sourceSize.width * scale, drawHeight = sourceSize.height * scale;
|
|
10284
|
+
}
|
|
10285
|
+
drawWidth *= backgroundScale, drawHeight *= backgroundScale;
|
|
10286
|
+
const {
|
|
10287
|
+
x: x,
|
|
10288
|
+
y: y
|
|
10289
|
+
} = resolveBackgroundPosition(backgroundPosition, targetW - drawWidth, targetH - drawHeight);
|
|
10290
|
+
return void context.drawImage(data, b.x1 + x + backgroundOffsetX, b.y1 + y + backgroundOffsetY, drawWidth, drawHeight);
|
|
10291
|
+
}
|
|
10292
|
+
if (backgroundFit && "repeat" !== backgroundRepeatMode && sourceSize) {
|
|
10293
|
+
const resW = sourceSize.width,
|
|
10294
|
+
resH = sourceSize.height;
|
|
10295
|
+
if ("repeat-x" === backgroundRepeatMode) {
|
|
10296
|
+
w = resW * (targetH / resH), h = targetH;
|
|
10297
|
+
} else if ("repeat-y" === backgroundRepeatMode) {
|
|
10298
|
+
h = resH * (targetW / resW), w = targetW;
|
|
10299
|
+
}
|
|
10300
|
+
const dpr = context.dpr,
|
|
10301
|
+
canvas = canvasAllocate.allocate({
|
|
10302
|
+
width: w,
|
|
10303
|
+
height: h,
|
|
10304
|
+
dpr: dpr
|
|
10305
|
+
}),
|
|
10306
|
+
ctx = canvas.getContext("2d");
|
|
10307
|
+
ctx && (ctx.inuse = !0, ctx.clearMatrix(), ctx.setTransformForCurrent(!0), ctx.clearRect(0, 0, w, h), ctx.drawImage(data, 0, 0, w, h), data = canvas.nativeCanvas), canvasAllocate.free(canvas);
|
|
10308
|
+
}
|
|
10309
|
+
const dpr = context.dpr,
|
|
10310
|
+
pattern = context.createPattern(data, backgroundRepeatMode);
|
|
10311
|
+
pattern.setTransform && pattern.setTransform(new DOMMatrix([1 / dpr, 0, 0, 1 / dpr, 0, 0])), context.fillStyle = pattern, context.translate(b.x1, b.y1), context.fillRect(0, 0, targetW, targetH), context.translate(-b.x1, -b.y1);
|
|
10312
|
+
}
|
|
10325
10313
|
let DefaultBaseInteractiveRenderContribution = class {
|
|
10326
10314
|
constructor(subRenderContribitions) {
|
|
10327
10315
|
this.subRenderContribitions = subRenderContribitions, this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
|
|
@@ -10678,35 +10666,38 @@ class DefaultGroupBackgroundRenderContribution extends DefaultBaseBackgroundRend
|
|
|
10678
10666
|
drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb) {
|
|
10679
10667
|
const {
|
|
10680
10668
|
background: background,
|
|
10669
|
+
backgroundOpacity = graphicAttribute.backgroundOpacity,
|
|
10670
|
+
opacity = graphicAttribute.opacity,
|
|
10681
10671
|
backgroundMode = graphicAttribute.backgroundMode,
|
|
10682
10672
|
backgroundFit = graphicAttribute.backgroundFit,
|
|
10683
10673
|
backgroundKeepAspectRatio = graphicAttribute.backgroundKeepAspectRatio,
|
|
10684
10674
|
backgroundScale = graphicAttribute.backgroundScale,
|
|
10685
10675
|
backgroundOffsetX = graphicAttribute.backgroundOffsetX,
|
|
10686
|
-
backgroundOffsetY = graphicAttribute.backgroundOffsetY
|
|
10676
|
+
backgroundOffsetY = graphicAttribute.backgroundOffsetY,
|
|
10677
|
+
backgroundClip = graphicAttribute.backgroundClip,
|
|
10678
|
+
backgroundPosition = graphicAttribute.backgroundPosition
|
|
10687
10679
|
} = graphic.attribute;
|
|
10688
10680
|
if (background) if (graphic.backgroundImg && graphic.resources) {
|
|
10689
|
-
const res = graphic.resources.get(background);
|
|
10690
|
-
if ("success" !== res.state || !res.data) return;
|
|
10681
|
+
const res = graphic.resources.get(getBackgroundImage(background));
|
|
10682
|
+
if (!res || "success" !== res.state || !res.data) return;
|
|
10691
10683
|
context.highPerformanceSave(), context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0);
|
|
10692
10684
|
const b = graphic.AABBBounds;
|
|
10693
|
-
this.doDrawImage(context, res.data, b, {
|
|
10685
|
+
context.globalAlpha = backgroundOpacity * opacity, backgroundClip && context.clip(), this.doDrawImage(context, res.data, b, {
|
|
10694
10686
|
backgroundMode: backgroundMode,
|
|
10695
10687
|
backgroundFit: backgroundFit,
|
|
10696
10688
|
backgroundKeepAspectRatio: backgroundKeepAspectRatio,
|
|
10697
10689
|
backgroundScale: backgroundScale,
|
|
10698
10690
|
backgroundOffsetX: backgroundOffsetX,
|
|
10699
|
-
backgroundOffsetY: backgroundOffsetY
|
|
10691
|
+
backgroundOffsetY: backgroundOffsetY,
|
|
10692
|
+
backgroundPosition: backgroundPosition
|
|
10700
10693
|
}), context.highPerformanceRestore(), context.setTransformForCurrent();
|
|
10701
|
-
} else context.highPerformanceSave(), context.fillStyle = background, context.fill(), context.highPerformanceRestore();
|
|
10694
|
+
} else context.highPerformanceSave(), context.globalAlpha = backgroundOpacity * opacity, context.fillStyle = background, context.fill(), context.highPerformanceRestore();
|
|
10702
10695
|
}
|
|
10703
10696
|
}
|
|
10704
10697
|
const defaultGroupBackgroundRenderContribution = new DefaultGroupBackgroundRenderContribution();
|
|
10705
10698
|
|
|
10706
10699
|
const halfPi = pi / 2;
|
|
10707
|
-
function createRectPath(path, x, y, width, height, rectCornerRadius) {
|
|
10708
|
-
let roundCorner = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !0;
|
|
10709
|
-
let edgeCb = arguments.length > 7 ? arguments[7] : undefined;
|
|
10700
|
+
function createRectPath(path, x, y, width, height, rectCornerRadius, roundCorner = !0, edgeCb) {
|
|
10710
10701
|
let cornerRadius;
|
|
10711
10702
|
if (Array.isArray(roundCorner) && (edgeCb = roundCorner, roundCorner = !0), width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
|
|
10712
10703
|
const cornerRadiusArr = rectCornerRadius;
|
|
@@ -11047,8 +11038,7 @@ class BaseRender {
|
|
|
11047
11038
|
doStroke: doStroke
|
|
11048
11039
|
};
|
|
11049
11040
|
}
|
|
11050
|
-
transform(graphic, graphicAttribute, context) {
|
|
11051
|
-
let use3dMatrixIn3dMode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
|
|
11041
|
+
transform(graphic, graphicAttribute, context, use3dMatrixIn3dMode = !1) {
|
|
11052
11042
|
const {
|
|
11053
11043
|
x = graphicAttribute.x,
|
|
11054
11044
|
y = graphicAttribute.y,
|
|
@@ -12171,7 +12161,7 @@ class DefaultBoundsAllocate {
|
|
|
12171
12161
|
get length() {
|
|
12172
12162
|
return this.pools.length;
|
|
12173
12163
|
}
|
|
12174
|
-
release() {
|
|
12164
|
+
release(...params) {
|
|
12175
12165
|
this.pools = [];
|
|
12176
12166
|
}
|
|
12177
12167
|
}
|
|
@@ -12184,9 +12174,17 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
|
|
|
12184
12174
|
drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb) {
|
|
12185
12175
|
var _a, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
12186
12176
|
const {
|
|
12177
|
+
backgroundOpacity = graphicAttribute.backgroundOpacity,
|
|
12178
|
+
opacity = graphicAttribute.opacity,
|
|
12187
12179
|
backgroundMode = graphicAttribute.backgroundMode,
|
|
12188
12180
|
backgroundFit = graphicAttribute.backgroundFit,
|
|
12189
|
-
backgroundKeepAspectRatio = graphicAttribute.backgroundKeepAspectRatio
|
|
12181
|
+
backgroundKeepAspectRatio = graphicAttribute.backgroundKeepAspectRatio,
|
|
12182
|
+
backgroundScale = graphicAttribute.backgroundScale,
|
|
12183
|
+
backgroundOffsetX = graphicAttribute.backgroundOffsetX,
|
|
12184
|
+
backgroundOffsetY = graphicAttribute.backgroundOffsetY,
|
|
12185
|
+
backgroundPosition = graphicAttribute.backgroundPosition,
|
|
12186
|
+
backgroundClip = graphicAttribute.backgroundClip,
|
|
12187
|
+
backgroundCornerRadius = graphicAttribute.backgroundCornerRadius
|
|
12190
12188
|
} = graphic.attribute;
|
|
12191
12189
|
let matrix,
|
|
12192
12190
|
{
|
|
@@ -12198,18 +12196,18 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
|
|
|
12198
12196
|
};
|
|
12199
12197
|
let b;
|
|
12200
12198
|
"richtext" === graphic.type && (matrix = context.currentMatrix.clone(), context.restore(), context.save(), context.setTransformForCurrent());
|
|
12201
|
-
const
|
|
12199
|
+
const backgroundConfig = isObject(background) && background.background ? background : null,
|
|
12202
12200
|
onlyTranslate = graphic.transMatrix.onlyTranslate();
|
|
12203
|
-
if (
|
|
12201
|
+
if (backgroundConfig) {
|
|
12204
12202
|
const _b = graphic.AABBBounds,
|
|
12205
|
-
x = (null !== (_a =
|
|
12206
|
-
y = (null !== (_d =
|
|
12207
|
-
w = null !== (_f =
|
|
12208
|
-
h = null !== (_g =
|
|
12209
|
-
if (b = boundsAllocate.allocate(x, y, x + w, y + h), background =
|
|
12203
|
+
x = (null !== (_a = backgroundConfig.x) && void 0 !== _a ? _a : _b.x1) + (null !== (_c = backgroundConfig.dx) && void 0 !== _c ? _c : 0),
|
|
12204
|
+
y = (null !== (_d = backgroundConfig.y) && void 0 !== _d ? _d : _b.y1) + (null !== (_e = backgroundConfig.dy) && void 0 !== _e ? _e : 0),
|
|
12205
|
+
w = null !== (_f = backgroundConfig.width) && void 0 !== _f ? _f : _b.width(),
|
|
12206
|
+
h = null !== (_g = backgroundConfig.height) && void 0 !== _g ? _g : _b.height();
|
|
12207
|
+
if (b = boundsAllocate.allocate(x, y, x + w, y + h), background = backgroundConfig.background, !onlyTranslate) {
|
|
12210
12208
|
const w = b.width(),
|
|
12211
12209
|
h = b.height();
|
|
12212
|
-
b.set((null !== (_h =
|
|
12210
|
+
b.set((null !== (_h = backgroundConfig.x) && void 0 !== _h ? _h : 0) + (null !== (_j = backgroundConfig.dx) && void 0 !== _j ? _j : 0), (null !== (_k = backgroundConfig.y) && void 0 !== _k ? _k : 0) + (null !== (_l = backgroundConfig.dy) && void 0 !== _l ? _l : 0), w, h);
|
|
12213
12211
|
}
|
|
12214
12212
|
} else b = graphic.AABBBounds, onlyTranslate || (b = getTextBounds(Object.assign(Object.assign({}, graphic.attribute), {
|
|
12215
12213
|
angle: 0,
|
|
@@ -12222,20 +12220,18 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
|
|
|
12222
12220
|
})).clone());
|
|
12223
12221
|
if (graphic.backgroundImg && graphic.resources) {
|
|
12224
12222
|
const res = graphic.resources.get(background);
|
|
12225
|
-
if ("success" !== res.state || !res.data) return void restore();
|
|
12226
|
-
context.highPerformanceSave(), onlyTranslate && context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), context.
|
|
12223
|
+
if (!res || "success" !== res.state || !res.data) return void restore();
|
|
12224
|
+
context.highPerformanceSave(), onlyTranslate && context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), context.globalAlpha = backgroundOpacity * opacity, backgroundClip && (context.beginPath(), backgroundCornerRadius ? createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius, !0) : context.rect(b.x1, b.y1, b.width(), b.height()), context.clip()), this.doDrawImage(context, res.data, b, {
|
|
12227
12225
|
backgroundMode: backgroundMode,
|
|
12228
12226
|
backgroundFit: backgroundFit,
|
|
12229
|
-
backgroundKeepAspectRatio: backgroundKeepAspectRatio
|
|
12227
|
+
backgroundKeepAspectRatio: backgroundKeepAspectRatio,
|
|
12228
|
+
backgroundScale: backgroundScale,
|
|
12229
|
+
backgroundOffsetX: backgroundOffsetX,
|
|
12230
|
+
backgroundOffsetY: backgroundOffsetY,
|
|
12231
|
+
backgroundPosition: backgroundPosition
|
|
12230
12232
|
}), context.highPerformanceRestore(), context.setTransformForCurrent();
|
|
12231
|
-
} else
|
|
12232
|
-
|
|
12233
|
-
backgroundCornerRadius: backgroundCornerRadius,
|
|
12234
|
-
backgroundOpacity = 1
|
|
12235
|
-
} = graphic.attribute;
|
|
12236
|
-
context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.globalAlpha = backgroundOpacity, 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();
|
|
12237
|
-
}
|
|
12238
|
-
shouldReCalBounds && boundsAllocate.free(b), restore();
|
|
12233
|
+
} else context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.globalAlpha = backgroundOpacity * opacity, 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();
|
|
12234
|
+
backgroundConfig && boundsAllocate.free(b), restore();
|
|
12239
12235
|
}
|
|
12240
12236
|
}
|
|
12241
12237
|
const defaultTextBackgroundRenderContribution = new DefaultTextBackgroundRenderContribution();
|
|
@@ -12397,8 +12393,7 @@ function drawPolygon(path, points, x, y) {
|
|
|
12397
12393
|
for (let i = 1; i < points.length; i++) path.lineTo(points[i].x + x, points[i].y + y);
|
|
12398
12394
|
}
|
|
12399
12395
|
}
|
|
12400
|
-
function drawRoundedPolygon(path, points, x, y, cornerRadius) {
|
|
12401
|
-
let closePath = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : !0;
|
|
12396
|
+
function drawRoundedPolygon(path, points, x, y, cornerRadius, closePath = !0) {
|
|
12402
12397
|
var _a;
|
|
12403
12398
|
if (points.length < 3) return void drawPolygon(path, points, x, y);
|
|
12404
12399
|
let startI = 0,
|
|
@@ -12663,6 +12658,92 @@ var __decorate$w = undefined && undefined.__decorate || function (decorators, ta
|
|
|
12663
12658
|
};
|
|
12664
12659
|
};
|
|
12665
12660
|
const repeatStr = ["", "repeat-x", "repeat-y", "repeat"];
|
|
12661
|
+
function resolveImageMode({
|
|
12662
|
+
repeatX = "no-repeat",
|
|
12663
|
+
repeatY = "no-repeat",
|
|
12664
|
+
imageMode: imageMode
|
|
12665
|
+
}) {
|
|
12666
|
+
const repeatMode = resolveImageRepeatMode(repeatX, repeatY);
|
|
12667
|
+
return {
|
|
12668
|
+
repeatMode: repeatMode,
|
|
12669
|
+
sizingMode: "no-repeat" === repeatMode && null != imageMode ? imageMode : "fill"
|
|
12670
|
+
};
|
|
12671
|
+
}
|
|
12672
|
+
const IMAGE_MODE_TO_BACKGROUND_MODE = {
|
|
12673
|
+
cover: "no-repeat-cover",
|
|
12674
|
+
contain: "no-repeat-contain",
|
|
12675
|
+
fill: "no-repeat-fill",
|
|
12676
|
+
auto: "no-repeat-auto"
|
|
12677
|
+
};
|
|
12678
|
+
function resolveBackgroundParamsByImageSizing(sizingMode) {
|
|
12679
|
+
return {
|
|
12680
|
+
backgroundMode: IMAGE_MODE_TO_BACKGROUND_MODE[sizingMode],
|
|
12681
|
+
backgroundFit: !1,
|
|
12682
|
+
backgroundKeepAspectRatio: !1
|
|
12683
|
+
};
|
|
12684
|
+
}
|
|
12685
|
+
function resolveImageRepeatMode(repeatX, repeatY) {
|
|
12686
|
+
let repeat = 0;
|
|
12687
|
+
return "repeat" === repeatX && (repeat |= 1), "repeat" === repeatY && (repeat |= 2), repeat ? repeatStr[repeat] : "no-repeat";
|
|
12688
|
+
}
|
|
12689
|
+
function shouldClipImageByLayout({
|
|
12690
|
+
repeatX = "no-repeat",
|
|
12691
|
+
repeatY = "no-repeat",
|
|
12692
|
+
imageMode: imageMode,
|
|
12693
|
+
imageScale = 1,
|
|
12694
|
+
imageOffsetX = 0,
|
|
12695
|
+
imageOffsetY = 0,
|
|
12696
|
+
imagePosition = "top-left"
|
|
12697
|
+
}) {
|
|
12698
|
+
const {
|
|
12699
|
+
repeatMode: repeatMode,
|
|
12700
|
+
sizingMode: sizingMode
|
|
12701
|
+
} = resolveImageMode({
|
|
12702
|
+
repeatX: repeatX,
|
|
12703
|
+
repeatY: repeatY,
|
|
12704
|
+
imageMode: imageMode
|
|
12705
|
+
});
|
|
12706
|
+
return "no-repeat" === repeatMode && ("cover" === sizingMode || "auto" === sizingMode || 1 !== imageScale || 0 !== imageOffsetX || 0 !== imageOffsetY);
|
|
12707
|
+
}
|
|
12708
|
+
function drawImageWithLayout(context, data, x, y, width, height, {
|
|
12709
|
+
repeatX = "no-repeat",
|
|
12710
|
+
repeatY = "no-repeat",
|
|
12711
|
+
imageMode: imageMode,
|
|
12712
|
+
imageScale = 1,
|
|
12713
|
+
imageOffsetX = 0,
|
|
12714
|
+
imageOffsetY = 0,
|
|
12715
|
+
imagePosition = "top-left"
|
|
12716
|
+
}) {
|
|
12717
|
+
const {
|
|
12718
|
+
repeatMode: repeatMode,
|
|
12719
|
+
sizingMode: sizingMode
|
|
12720
|
+
} = resolveImageMode({
|
|
12721
|
+
repeatX: repeatX,
|
|
12722
|
+
repeatY: repeatY,
|
|
12723
|
+
imageMode: imageMode
|
|
12724
|
+
}),
|
|
12725
|
+
imageBackgroundParams = "no-repeat" === repeatMode ? resolveBackgroundParamsByImageSizing(sizingMode) : {
|
|
12726
|
+
backgroundMode: repeatMode,
|
|
12727
|
+
backgroundFit: !1,
|
|
12728
|
+
backgroundKeepAspectRatio: !1
|
|
12729
|
+
};
|
|
12730
|
+
drawBackgroundImage(context, data, {
|
|
12731
|
+
x1: x,
|
|
12732
|
+
y1: y,
|
|
12733
|
+
x2: x + width,
|
|
12734
|
+
y2: y + height,
|
|
12735
|
+
width: () => width,
|
|
12736
|
+
height: () => height
|
|
12737
|
+
}, {
|
|
12738
|
+
backgroundMode: imageBackgroundParams.backgroundMode,
|
|
12739
|
+
backgroundFit: imageBackgroundParams.backgroundFit,
|
|
12740
|
+
backgroundKeepAspectRatio: imageBackgroundParams.backgroundKeepAspectRatio,
|
|
12741
|
+
backgroundScale: imageScale,
|
|
12742
|
+
backgroundOffsetX: imageOffsetX,
|
|
12743
|
+
backgroundOffsetY: imageOffsetY,
|
|
12744
|
+
backgroundPosition: imagePosition
|
|
12745
|
+
});
|
|
12746
|
+
}
|
|
12666
12747
|
let DefaultCanvasImageRender = class extends BaseRender {
|
|
12667
12748
|
constructor(graphicRenderContributions) {
|
|
12668
12749
|
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = IMAGE_NUMBER_TYPE, this.builtinContributions = [defaultImageRenderContribution, defaultImageBackgroundRenderContribution], this.init(graphicRenderContributions);
|
|
@@ -12677,6 +12758,11 @@ let DefaultCanvasImageRender = class extends BaseRender {
|
|
|
12677
12758
|
cornerRadius = imageAttribute.cornerRadius,
|
|
12678
12759
|
fillStrokeOrder = imageAttribute.fillStrokeOrder,
|
|
12679
12760
|
cornerType = imageAttribute.cornerType,
|
|
12761
|
+
imageMode = imageAttribute.imageMode,
|
|
12762
|
+
imageScale = imageAttribute.imageScale,
|
|
12763
|
+
imageOffsetX = imageAttribute.imageOffsetX,
|
|
12764
|
+
imageOffsetY = imageAttribute.imageOffsetY,
|
|
12765
|
+
imagePosition = imageAttribute.imagePosition,
|
|
12680
12766
|
image: url
|
|
12681
12767
|
} = image.attribute,
|
|
12682
12768
|
data = this.valid(image, imageAttribute, fillCb);
|
|
@@ -12693,22 +12779,33 @@ let DefaultCanvasImageRender = class extends BaseRender {
|
|
|
12693
12779
|
const width = image.width,
|
|
12694
12780
|
height = image.height;
|
|
12695
12781
|
context.beginPath();
|
|
12696
|
-
let
|
|
12697
|
-
0 === cornerRadius || isArray(cornerRadius) && cornerRadius.every(num => 0 === num) ? context.rect(x, y, width, height) : (createRectPath(context, x, y, width, height, cornerRadius, "bevel" !== cornerType),
|
|
12782
|
+
let needCornerClip = !1;
|
|
12783
|
+
0 === cornerRadius || isArray(cornerRadius) && cornerRadius.every(num => 0 === num) ? context.rect(x, y, width, height) : (createRectPath(context, x, y, width, height, cornerRadius, "bevel" !== cornerType), needCornerClip = !0), context.setShadowBlendStyle && context.setShadowBlendStyle(image, image.attribute, imageAttribute);
|
|
12698
12784
|
const _runFill = () => {
|
|
12699
|
-
|
|
12700
|
-
|
|
12701
|
-
|
|
12702
|
-
|
|
12703
|
-
|
|
12704
|
-
|
|
12705
|
-
|
|
12706
|
-
|
|
12785
|
+
doFill && (fillCb ? fillCb(context, image.attribute, imageAttribute) : fVisible && (context.setCommonStyle(image, image.attribute, x, y, imageAttribute), drawImageWithLayout(context, res.data, x, y, width, height, {
|
|
12786
|
+
repeatX: repeatX,
|
|
12787
|
+
repeatY: repeatY,
|
|
12788
|
+
imageMode: imageMode,
|
|
12789
|
+
imageScale: imageScale,
|
|
12790
|
+
imageOffsetX: imageOffsetX,
|
|
12791
|
+
imageOffsetY: imageOffsetY,
|
|
12792
|
+
imagePosition: imagePosition
|
|
12793
|
+
})));
|
|
12707
12794
|
},
|
|
12708
12795
|
_runStroke = () => {
|
|
12709
12796
|
doStroke && (strokeCb ? strokeCb(context, image.attribute, imageAttribute) : sVisible && (context.setStrokeStyle(image, image.attribute, originX - x, originY - y, imageAttribute), context.stroke()));
|
|
12710
|
-
}
|
|
12711
|
-
|
|
12797
|
+
},
|
|
12798
|
+
needLayoutClip = shouldClipImageByLayout({
|
|
12799
|
+
repeatX: repeatX,
|
|
12800
|
+
repeatY: repeatY,
|
|
12801
|
+
imageMode: imageMode,
|
|
12802
|
+
imageScale: imageScale,
|
|
12803
|
+
imageOffsetX: imageOffsetX,
|
|
12804
|
+
imageOffsetY: imageOffsetY,
|
|
12805
|
+
imagePosition: imagePosition
|
|
12806
|
+
}),
|
|
12807
|
+
needClip = needCornerClip || needLayoutClip;
|
|
12808
|
+
fillStrokeOrder ? (_runStroke(), needClip && (context.save(), context.clip()), this.beforeRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb), _runFill(), needClip && context.restore()) : (needClip && (context.save(), context.clip()), this.beforeRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb), _runFill(), needClip && context.restore(), _runStroke()), this.afterRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb);
|
|
12712
12809
|
}
|
|
12713
12810
|
draw(image, renderService, drawContext) {
|
|
12714
12811
|
const {
|
|
@@ -13155,7 +13252,7 @@ let DefaultPluginService = class {
|
|
|
13155
13252
|
unRegister(plugin) {
|
|
13156
13253
|
"onStartupFinished" === plugin.activeEvent ? this.onStartupFinishedPlugin.splice(this.onStartupFinishedPlugin.indexOf(plugin), 1) : "onRegister" === plugin.activeEvent && this.onRegisterPlugin.splice(this.onStartupFinishedPlugin.indexOf(plugin), 1), plugin.deactivate(this);
|
|
13157
13254
|
}
|
|
13158
|
-
release() {
|
|
13255
|
+
release(...params) {
|
|
13159
13256
|
this.onStartupFinishedPlugin.forEach(plugin => {
|
|
13160
13257
|
plugin.deactivate(this);
|
|
13161
13258
|
}), this.onStartupFinishedPlugin = [], this.onRegisterPlugin.forEach(plugin => {
|
|
@@ -13302,9 +13399,7 @@ function parseChildMap(graphic, defaultZIndex, reverse) {
|
|
|
13302
13399
|
zIdxArray: zIdxArray
|
|
13303
13400
|
};
|
|
13304
13401
|
}
|
|
13305
|
-
function foreach(graphic, defaultZIndex, cb) {
|
|
13306
|
-
let reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
|
|
13307
|
-
let sort3d = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
|
|
13402
|
+
function foreach(graphic, defaultZIndex, cb, reverse = !1, sort3d = !1) {
|
|
13308
13403
|
let needSort = !1;
|
|
13309
13404
|
if (sort3d) needSort = !0;else {
|
|
13310
13405
|
let lastZIndex;
|
|
@@ -13335,14 +13430,12 @@ function foreach(graphic, defaultZIndex, cb) {
|
|
|
13335
13430
|
}
|
|
13336
13431
|
} else graphic.forEachChildren(cb, reverse);
|
|
13337
13432
|
}
|
|
13338
|
-
function foreachAsync(graphic, defaultZIndex, cb) {
|
|
13339
|
-
let reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
|
|
13433
|
+
function foreachAsync(graphic, defaultZIndex, cb, reverse = !1) {
|
|
13340
13434
|
return __awaiter$2(this, void 0, void 0, function* () {
|
|
13341
13435
|
yield graphic.forEachChildrenAsync(cb, reverse);
|
|
13342
13436
|
});
|
|
13343
13437
|
}
|
|
13344
|
-
function findNextGraphic(graphic, id, defaultZIndex) {
|
|
13345
|
-
let reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
|
|
13438
|
+
function findNextGraphic(graphic, id, defaultZIndex, reverse = !1) {
|
|
13346
13439
|
let needSort = !1;
|
|
13347
13440
|
graphic.forEachChildren((item, i) => {
|
|
13348
13441
|
const {
|
|
@@ -13567,7 +13660,7 @@ let DefaultDrawContribution = class {
|
|
|
13567
13660
|
return data || this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);
|
|
13568
13661
|
}
|
|
13569
13662
|
clearScreen(renderService, context, drawContext) {
|
|
13570
|
-
var _a, _b, _c;
|
|
13663
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
13571
13664
|
const {
|
|
13572
13665
|
clear: clear,
|
|
13573
13666
|
viewBox: viewBox
|
|
@@ -13577,9 +13670,20 @@ let DefaultDrawContribution = class {
|
|
|
13577
13670
|
if (clear) {
|
|
13578
13671
|
context.clearRect(0, 0, width, height), (null === (_a = renderService.drawParams) || void 0 === _a ? void 0 : _a.stage) && renderService.drawParams.stage.hooks.afterClearRect.call(renderService.drawParams);
|
|
13579
13672
|
const stage = null === (_b = renderService.drawParams) || void 0 === _b ? void 0 : _b.stage;
|
|
13580
|
-
if (stage && (context.globalAlpha = null !== (_c = stage.attribute.opacity) && void 0 !== _c ? _c : 1), stage && stage.backgroundImg && stage.resources) {
|
|
13581
|
-
const res = stage.resources.get(clear);
|
|
13582
|
-
res && "success" === res.state && res.data
|
|
13673
|
+
if (stage && (context.globalAlpha = (null !== (_c = stage.attribute.opacity) && void 0 !== _c ? _c : 1) * (null !== (_d = stage.attribute.backgroundOpacity) && void 0 !== _d ? _d : 1)), stage && stage.backgroundImg && stage.resources) {
|
|
13674
|
+
const res = stage.resources.get(getBackgroundImage(clear));
|
|
13675
|
+
if (res && "success" === res.state && res.data) {
|
|
13676
|
+
const backgroundBounds = boundsAllocate.allocate(0, 0, 0 + width, 0 + height);
|
|
13677
|
+
drawBackgroundImage(context, res.data, backgroundBounds, {
|
|
13678
|
+
backgroundMode: null !== (_e = stage.attribute.backgroundMode) && void 0 !== _e ? _e : DefaultAttribute.backgroundMode,
|
|
13679
|
+
backgroundFit: null !== (_f = stage.attribute.backgroundFit) && void 0 !== _f ? _f : DefaultAttribute.backgroundFit,
|
|
13680
|
+
backgroundKeepAspectRatio: null !== (_g = stage.attribute.backgroundKeepAspectRatio) && void 0 !== _g ? _g : DefaultAttribute.backgroundKeepAspectRatio,
|
|
13681
|
+
backgroundScale: null !== (_h = stage.attribute.backgroundScale) && void 0 !== _h ? _h : DefaultAttribute.backgroundScale,
|
|
13682
|
+
backgroundOffsetX: null !== (_j = stage.attribute.backgroundOffsetX) && void 0 !== _j ? _j : DefaultAttribute.backgroundOffsetX,
|
|
13683
|
+
backgroundOffsetY: null !== (_k = stage.attribute.backgroundOffsetY) && void 0 !== _k ? _k : DefaultAttribute.backgroundOffsetY,
|
|
13684
|
+
backgroundPosition: null !== (_l = stage.attribute.backgroundPosition) && void 0 !== _l ? _l : DefaultAttribute.backgroundPosition
|
|
13685
|
+
}), boundsAllocate.free(backgroundBounds);
|
|
13686
|
+
}
|
|
13583
13687
|
} else context.fillStyle = createColor(context, clear, {
|
|
13584
13688
|
AABBBounds: {
|
|
13585
13689
|
x1: 0,
|
|
@@ -18974,8 +19078,7 @@ class Step {
|
|
|
18974
19078
|
getLastProps() {
|
|
18975
19079
|
return this.prev ? this.prev.props || {} : this.animate.getStartProps();
|
|
18976
19080
|
}
|
|
18977
|
-
setDuration(duration) {
|
|
18978
|
-
let updateDownstream = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
19081
|
+
setDuration(duration, updateDownstream = !0) {
|
|
18979
19082
|
this.duration = duration, updateDownstream && this.updateDownstreamStartTimes();
|
|
18980
19083
|
}
|
|
18981
19084
|
getDuration() {
|
|
@@ -18996,8 +19099,7 @@ class Step {
|
|
|
18996
19099
|
} else interpolateUpdateStore[key] ? funcs.push(interpolateUpdateStore[key]) : funcs.push(commonInterpolateUpdate);
|
|
18997
19100
|
}), this.interpolateUpdateFunctions = funcs;
|
|
18998
19101
|
}
|
|
18999
|
-
setStartTime(time) {
|
|
19000
|
-
let updateDownstream = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
19102
|
+
setStartTime(time, updateDownstream = !0) {
|
|
19001
19103
|
this._startTime = time, updateDownstream && this.updateDownstreamStartTimes();
|
|
19002
19104
|
}
|
|
19003
19105
|
getStartTime() {
|
|
@@ -19123,8 +19225,7 @@ class DefaultTimeline extends EventEmitter {
|
|
|
19123
19225
|
animate.release();
|
|
19124
19226
|
}), this.head = null, this.tail = null, this.animateMap.clear(), this._animateCount = 0, this._totalDuration = 0;
|
|
19125
19227
|
}
|
|
19126
|
-
removeAnimate(animate) {
|
|
19127
|
-
let release = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
19228
|
+
removeAnimate(animate, release = !0) {
|
|
19128
19229
|
const node = this.animateMap.get(animate);
|
|
19129
19230
|
node && (release && (animate._onRemove && animate._onRemove.forEach(cb => cb()), animate.release()), node.prev ? node.prev.next = node.next : this.head = node.next, node.next ? node.next.prev = node.prev : this.tail = node.prev, this.animateMap.delete(animate), this._animateCount--, animate.getStartTime() + animate.getDuration() >= this._totalDuration && this.recalculateTotalDuration());
|
|
19130
19231
|
}
|
|
@@ -19162,10 +19263,7 @@ const defaultTimeline = new DefaultTimeline();
|
|
|
19162
19263
|
defaultTimeline.isGlobal = !0;
|
|
19163
19264
|
|
|
19164
19265
|
class Animate {
|
|
19165
|
-
constructor() {
|
|
19166
|
-
let id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Generator.GenAutoIncrementId();
|
|
19167
|
-
let timeline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultTimeline;
|
|
19168
|
-
let slience = arguments.length > 2 ? arguments[2] : undefined;
|
|
19266
|
+
constructor(id = Generator.GenAutoIncrementId(), timeline = defaultTimeline, slience) {
|
|
19169
19267
|
this.id = id, this.status = AnimateStatus.INITIAL, this._timeline = timeline, timeline.addAnimate(this), this.slience = slience, this._startTime = 0, this._duration = 0, this._totalDuration = 0, this._loopCount = 0, this._currentLoop = 0, this._bounce = !1, this._firstStep = null, this._lastStep = null, this._startProps = {}, this._endProps = {}, this._preventAttrs = new Set(), this.currentTime = 0, this.interpolateUpdateFunction = null, this.priority = 0;
|
|
19170
19268
|
}
|
|
19171
19269
|
getStartProps() {
|
|
@@ -19188,9 +19286,7 @@ class Animate {
|
|
|
19188
19286
|
this.stop(), this.target.animates.delete(this.id);
|
|
19189
19287
|
}), this.target.onAnimateBind && !this.slience && this.target.onAnimateBind(this), this.target.animationAttribute || (this.target.animationAttribute = {}), this;
|
|
19190
19288
|
}
|
|
19191
|
-
to(props) {
|
|
19192
|
-
let duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;
|
|
19193
|
-
let easing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "linear";
|
|
19289
|
+
to(props, duration = 300, easing = "linear") {
|
|
19194
19290
|
const step = new Step(AnimateStepType.to, props, duration, easing);
|
|
19195
19291
|
return step.bind(this.target, this), this.updateStepAfterAppend(step), this;
|
|
19196
19292
|
}
|
|
@@ -19220,9 +19316,7 @@ class Animate {
|
|
|
19220
19316
|
this._endProps[key] = currentStep.props[key];
|
|
19221
19317
|
}), currentStep = currentStep.next;
|
|
19222
19318
|
}
|
|
19223
|
-
from(props) {
|
|
19224
|
-
let duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;
|
|
19225
|
-
let easing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "linear";
|
|
19319
|
+
from(props, duration = 300, easing = "linear") {
|
|
19226
19320
|
const step = new Step(AnimateStepType.from, props, duration, easing);
|
|
19227
19321
|
return this._firstStep ? (this._lastStep.append(step), this._lastStep = step) : (this._firstStep = step, this._lastStep = step), this.updateDuration(), this;
|
|
19228
19322
|
}
|
|
@@ -19422,12 +19516,10 @@ class DefaultTicker extends EventEmitter {
|
|
|
19422
19516
|
getTimelines() {
|
|
19423
19517
|
return this.timelines;
|
|
19424
19518
|
}
|
|
19425
|
-
initHandler() {
|
|
19426
|
-
let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
19519
|
+
initHandler(force = !1) {
|
|
19427
19520
|
this.setupTickHandler(force);
|
|
19428
19521
|
}
|
|
19429
|
-
setupTickHandler() {
|
|
19430
|
-
let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
19522
|
+
setupTickHandler(force = !1) {
|
|
19431
19523
|
if (!force && this.tickerHandler) return !0;
|
|
19432
19524
|
const handler = new RAFTickHandler();
|
|
19433
19525
|
return this.tickerHandler && this.tickerHandler.release(), this.tickerHandler = handler, !0;
|
|
@@ -19469,8 +19561,7 @@ class DefaultTicker extends EventEmitter {
|
|
|
19469
19561
|
}
|
|
19470
19562
|
return !1;
|
|
19471
19563
|
}
|
|
19472
|
-
start() {
|
|
19473
|
-
let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
19564
|
+
start(force = !1) {
|
|
19474
19565
|
if (this.status === STATUS$1.RUNNING) return !1;
|
|
19475
19566
|
if (!this.tickerHandler) return !1;
|
|
19476
19567
|
if (!force) {
|
|
@@ -19601,6 +19692,7 @@ function getCustomType(custom) {
|
|
|
19601
19692
|
if (custom.prototype.constructor === custom) {
|
|
19602
19693
|
const descriptor = Object.getOwnPropertyDescriptor(custom, "prototype");
|
|
19603
19694
|
if (descriptor && !descriptor.writable) return 1;
|
|
19695
|
+
if (Object.getOwnPropertyNames(custom.prototype).length > 1) return 1;
|
|
19604
19696
|
}
|
|
19605
19697
|
return 2;
|
|
19606
19698
|
}
|
|
@@ -19860,22 +19952,17 @@ class AnimateExecutor {
|
|
|
19860
19952
|
var _a, _b;
|
|
19861
19953
|
return void 0 === value ? defaultValue : "function" == typeof value && graphic ? value(null === (_b = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.data) || void 0 === _b ? void 0 : _b[0], graphic, {}) : value;
|
|
19862
19954
|
}
|
|
19863
|
-
executeItem(params, graphic) {
|
|
19864
|
-
let index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
19865
|
-
let count = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
19955
|
+
executeItem(params, graphic, index = 0, count = 1) {
|
|
19866
19956
|
return Array.isArray(params) ? params.map(param => this._executeItem(param, graphic, index, count)).filter(Boolean) : [this._executeItem(params, graphic, index, count)].filter(Boolean);
|
|
19867
19957
|
}
|
|
19868
|
-
_executeItem(params, graphic) {
|
|
19869
|
-
let index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
19870
|
-
let count = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
19958
|
+
_executeItem(params, graphic, index = 0, count = 1) {
|
|
19871
19959
|
if (!graphic) return null;
|
|
19872
19960
|
const isTimeline = ("timeSlices" in params);
|
|
19873
19961
|
let animate = null;
|
|
19874
19962
|
const parsedParams = this.parseParams(params, isTimeline);
|
|
19875
19963
|
return animate = isTimeline ? this.executeTimelineItem(parsedParams, graphic, index, count) : this.executeTypeConfigItem(parsedParams, graphic, index, count), animate && this._trackAnimation(animate), animate;
|
|
19876
19964
|
}
|
|
19877
|
-
stop(type) {
|
|
19878
|
-
let callEnd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
19965
|
+
stop(type, callEnd = !0) {
|
|
19879
19966
|
for (; this._animates.length > 0;) {
|
|
19880
19967
|
const animate = this._animates.pop();
|
|
19881
19968
|
!1 === callEnd && (animate.status = AnimateStatus.END), null == animate || animate.stop(type);
|
|
@@ -20032,8 +20119,7 @@ class GraphicStateExtension {
|
|
|
20032
20119
|
applyUnhighlightState(animationConfig, callback) {
|
|
20033
20120
|
return this._getAnimationStateManager(this).applyUnhighlightState(animationConfig, callback), this;
|
|
20034
20121
|
}
|
|
20035
|
-
stopAnimationState(state, type) {
|
|
20036
|
-
let deep = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
20122
|
+
stopAnimationState(state, type, deep = !1) {
|
|
20037
20123
|
return this._getAnimationStateManager(this).stopState(state, type), deep && this.isContainer && this.forEachChildren(child => {
|
|
20038
20124
|
child.stopAnimationState(state, type, deep);
|
|
20039
20125
|
}), this;
|
|
@@ -20042,8 +20128,7 @@ class GraphicStateExtension {
|
|
|
20042
20128
|
const stateManager = this._animationStateManager;
|
|
20043
20129
|
return stateManager && stateManager.clearState(), this;
|
|
20044
20130
|
}
|
|
20045
|
-
reApplyAnimationState(state) {
|
|
20046
|
-
let deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
20131
|
+
reApplyAnimationState(state, deep = !1) {
|
|
20047
20132
|
const stateManager = this._animationStateManager;
|
|
20048
20133
|
return stateManager && stateManager.reApplyState(state), deep && this.isContainer && this.forEachChildren(child => {
|
|
20049
20134
|
child.reApplyAnimationState(state, deep);
|
|
@@ -20055,8 +20140,7 @@ class GraphicStateExtension {
|
|
|
20055
20140
|
}
|
|
20056
20141
|
|
|
20057
20142
|
class AnimateExtension {
|
|
20058
|
-
getAttributes() {
|
|
20059
|
-
let final = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
20143
|
+
getAttributes(final = !1) {
|
|
20060
20144
|
return final && this.finalAttribute ? this.finalAttribute : this.attribute;
|
|
20061
20145
|
}
|
|
20062
20146
|
animate(params) {
|
|
@@ -20098,24 +20182,20 @@ class AnimateExtension {
|
|
|
20098
20182
|
getFinalAttribute() {
|
|
20099
20183
|
return this.finalAttribute;
|
|
20100
20184
|
}
|
|
20101
|
-
getGraphicAttribute(key) {
|
|
20102
|
-
let prev = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
20185
|
+
getGraphicAttribute(key, prev = !1) {
|
|
20103
20186
|
return !prev && this.finalAttribute ? this.finalAttribute[key] : this.attribute[key];
|
|
20104
20187
|
}
|
|
20105
|
-
pauseAnimation() {
|
|
20106
|
-
let deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
20188
|
+
pauseAnimation(deep = !1) {
|
|
20107
20189
|
this.animates && this.animates.forEach(animate => animate.pause()), deep && this.isContainer && this.forEachChildren(child => {
|
|
20108
20190
|
child.pauseAnimation(deep);
|
|
20109
20191
|
});
|
|
20110
20192
|
}
|
|
20111
|
-
resumeAnimation() {
|
|
20112
|
-
let deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
20193
|
+
resumeAnimation(deep = !1) {
|
|
20113
20194
|
this.animates && this.animates.forEach(animate => animate.resume()), deep && this.isContainer && this.forEachChildren(child => {
|
|
20114
20195
|
child.resumeAnimation(deep);
|
|
20115
20196
|
});
|
|
20116
20197
|
}
|
|
20117
|
-
stopAnimation() {
|
|
20118
|
-
let deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
20198
|
+
stopAnimation(deep = !1) {
|
|
20119
20199
|
this.animates && this.animates.forEach(animate => animate.stop()), deep && this.isContainer && this.forEachChildren(child => {
|
|
20120
20200
|
child.stopAnimation(deep);
|
|
20121
20201
|
});
|
|
@@ -25732,7 +25812,8 @@ class DataZoomRenderer {
|
|
|
25732
25812
|
visible: this._showText,
|
|
25733
25813
|
pickable: false,
|
|
25734
25814
|
childrenPickable: false,
|
|
25735
|
-
textStyle: startTextAlignStyle
|
|
25815
|
+
textStyle: startTextAlignStyle,
|
|
25816
|
+
zIndex: LAYOUT_LEVEL.handlerText
|
|
25736
25817
|
}), `data-zoom-start-text`);
|
|
25737
25818
|
this._endText = this._maybeAddLabel(this._getContainer(), merge({}, restEndTextStyle, {
|
|
25738
25819
|
text: endTextValue,
|
|
@@ -25741,7 +25822,8 @@ class DataZoomRenderer {
|
|
|
25741
25822
|
visible: this._showText,
|
|
25742
25823
|
pickable: false,
|
|
25743
25824
|
childrenPickable: false,
|
|
25744
|
-
textStyle: endTextAlignStyle
|
|
25825
|
+
textStyle: endTextAlignStyle,
|
|
25826
|
+
zIndex: LAYOUT_LEVEL.handlerText
|
|
25745
25827
|
}), `data-zoom-end-text`);
|
|
25746
25828
|
}
|
|
25747
25829
|
_maybeAddLabel(container, attributes, name) {
|
|
@@ -35009,6 +35091,6 @@ TableSeriesNumber.defaultAttributes = {
|
|
|
35009
35091
|
select: true
|
|
35010
35092
|
};
|
|
35011
35093
|
|
|
35012
|
-
const version = "1.0.
|
|
35094
|
+
const version = "1.0.45";
|
|
35013
35095
|
|
|
35014
35096
|
export { AXIS_ELEMENT_NAME, AbstractComponent, ArcInfo, ArcLabel, ArcSegment, AxisStateValue, BasePlayer, Brush, CheckBox, CircleAxis, CircleAxisGrid, CircleCrosshair, ColorContinuousLegend, ContinuousPlayer, DEFAULT_ITEM_SPACE_COL, DEFAULT_ITEM_SPACE_ROW, DEFAULT_LABEL_SPACE, DEFAULT_PAGER_SPACE, DEFAULT_SHAPE_SIZE, DEFAULT_SHAPE_SPACE, DEFAULT_STATES$1 as DEFAULT_STATES, DEFAULT_TITLE_SPACE, DEFAULT_VALUE_SPACE, DataLabel, DataZoom, DataZoomActiveTag, DirectionEnum, DiscreteLegend, DiscretePlayer, EmptyTip, GroupTransition, IDataZoomEvent, IDataZoomInteractiveEvent, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Indicator, LEGEND_ELEMENT_NAME, LabelBase, LegendEvent, LegendStateValue, LineAxis, LineAxisGrid, LineCrosshair, LineLabel, LinkPath, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Pager, PlayerEventEnum, PolygonCrosshair, PolygonSectorCrosshair, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SeriesNumberCellStateValue, SeriesNumberEvent, SizeContinuousLegend, Slider, StoryLabelItem, Switch, SymbolLabel, TableSeriesNumber, Tag, Timeline, Title, Tooltip, TopZIndex, VTag, WeatherBox, alignTextInLine, angle, angleLabelOrientAttribute, angleTo, cartesianTicks, clampRadian, computeOffsetForlimit, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, createTextGraphicByType, deltaXYToAngle, fuzzyEqualNumber, getAxisBreakSymbolAttrs, getCircleLabelPosition, getCirclePoints, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getPolarAngleLabelPosition, getPolygonPath, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextType, getVerticalCoord, getVerticalPath, hasOverlap, htmlAttributeTransform, initTextMeasure, isInRange, isPostiveXAxis, isRichText, isVisible, labelSmartInvert, length, limitShapeInBounds, linearDiscreteTicks, loadPoptip, loadScrollbar, measureTextSize, normalize, polarAngleAxisDiscreteTicks, polarTicks, reactAttributeTransform, registerArcDataLabel, registerLineDataLabel, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerRectDataLabel, registerSymbolDataLabel, removeRepeatPoint, richTextAttributeTransform, scale, scrollbarModule, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, textIntersect, ticks, traverseGroup, version };
|