@visactor/vrender-components 0.19.19 → 0.19.20-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { tau, halfPi as halfPi$1, AABBBounds, degreeToRadian, Point, PointService, abs, max, min, atan2, Matrix, pi2, Logger, TextMeasure, EventEmitter, isBoolean, isObject, isFunction, isString, isArray, cos, sin, pi, pointAt, isNumber, getDecimalPlaces, isNil, Color, has, normalTransform, isValidUrl, isBase64, epsilon, acos, sqrt, clampAngleByRadian, asin, transformBoundsWithMatrix, arrayEqual, Bounds, getRectIntersect, isRectIntersect, isPlainObject, merge, clamp, clampRange, normalizePadding, debounce, throttle, hexToRgb, isEmpty, isValid, rectInsideAnotherRect, radianToDegree, getAngleByPoint, polarToCartesian as polarToCartesian$1, array, isValidNumber, calculateAnchorOfBounds, isGreater, isLess, isNumberClose, normalizeAngle as normalizeAngle$1, flattenArray, cloneDeep, get, isRotateAABBIntersect, last, mixin, isEqual, interpolateString, minInArray, maxInArray, binaryFuzzySearchInNumberRange, polygonContainPoint } from '@visactor/vutils';
1
+ import { tau, halfPi as halfPi$1, AABBBounds, degreeToRadian, Point, PointService, abs, max, min, atan2, epsilon, Matrix, pi2, Logger, TextMeasure, EventEmitter, isBoolean, isObject, isFunction, isString, isArray, cos, sin, pi, pointAt, isNumber, getDecimalPlaces, isNil, Color, has, normalTransform, isValidUrl, isBase64, acos, sqrt, clampAngleByRadian, asin, transformBoundsWithMatrix, arrayEqual, Bounds, getRectIntersect, isRectIntersect, isPlainObject, merge, clamp, clampRange, normalizePadding, debounce, throttle, hexToRgb, isEmpty, isValid, rectInsideAnotherRect, radianToDegree, getAngleByPoint, polarToCartesian as polarToCartesian$1, array, isValidNumber, calculateAnchorOfBounds, isGreater, isLess, isNumberClose, normalizeAngle as normalizeAngle$1, flattenArray, cloneDeep, get, isRotateAABBIntersect, last, mixin, isEqual, interpolateString, minInArray, maxInArray, binaryFuzzySearchInNumberRange, polygonContainPoint } from '@visactor/vutils';
2
2
  import { isContinuous, isDiscrete, LinearScale } from '@visactor/vscale';
3
3
 
4
4
  class Generator {
@@ -1457,7 +1457,7 @@ function genLinearTypeSegments(path, points) {
1457
1457
  return genCurveSegments(path, points);
1458
1458
  }
1459
1459
 
1460
- function point$2(curveClass, x, y, defined, p) {
1460
+ function point$3(curveClass, x, y, defined, p) {
1461
1461
  curveClass.context.bezierCurveTo((2 * curveClass._x0 + curveClass._x1) / 3, (2 * curveClass._y0 + curveClass._y1) / 3, (curveClass._x0 + 2 * curveClass._x1) / 3, (curveClass._y0 + 2 * curveClass._y1) / 3, (curveClass._x0 + 4 * curveClass._x1 + x) / 6, (curveClass._y0 + 4 * curveClass._y1 + y) / 6, defined, curveClass.lastPoint1);
1462
1462
  }
1463
1463
  class Basis {
@@ -1474,7 +1474,7 @@ class Basis {
1474
1474
  this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0, this.startPoint && this.point(this.startPoint);
1475
1475
  }
1476
1476
  lineEnd() {
1477
- if (2 === this._point) point$2(this, 6 * this._x1 - (this._x0 + 4 * this._x1), 6 * this._y1 - (this._y0 + 4 * this._y1), !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
1477
+ if (2 === this._point) point$3(this, 6 * this._x1 - (this._x0 + 4 * this._x1), 6 * this._y1 - (this._y0 + 4 * this._y1), !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
1478
1478
  (this._line || 0 !== this._line && 1 === this._point) && this.context.closePath(), this._line = 1 - this._line;
1479
1479
  }
1480
1480
  point(p) {
@@ -1488,7 +1488,7 @@ class Basis {
1488
1488
  this._point = 2;
1489
1489
  break;
1490
1490
  default:
1491
- point$2(this, x, y, !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
1491
+ point$3(this, x, y, !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
1492
1492
  }
1493
1493
  this._x0 = this._x1, this._x1 = x, this._y0 = this._y1, this._y1 = y, this._lastDefined1 = this._lastDefined2, this._lastDefined2 = p.defined, this.lastPoint0 = this.lastPoint1, this.lastPoint1 = p;
1494
1494
  }
@@ -1526,7 +1526,7 @@ function slope2(curveClass, t) {
1526
1526
  const h = curveClass._x1 - curveClass._x0;
1527
1527
  return h ? (3 * (curveClass._y1 - curveClass._y0) / h - t) / 2 : t;
1528
1528
  }
1529
- function point$1(curveClass, t0, t1, defined, p) {
1529
+ function point$2(curveClass, t0, t1, defined, p) {
1530
1530
  const x0 = curveClass._x0,
1531
1531
  y0 = curveClass._y0,
1532
1532
  x1 = curveClass._x1,
@@ -1553,7 +1553,7 @@ class MonotoneX {
1553
1553
  this.context.lineTo(this._x1, this._y1, !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
1554
1554
  break;
1555
1555
  case 3:
1556
- point$1(this, this._t0, slope2(this, this._t0), !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
1556
+ point$2(this, this._t0, slope2(this, this._t0), !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
1557
1557
  }
1558
1558
  (this._line || 0 !== this._line && 1 === this._point) && this.context.closePath(), this._line = 1 - this._line;
1559
1559
  }
@@ -1569,10 +1569,10 @@ class MonotoneX {
1569
1569
  this._point = 2;
1570
1570
  break;
1571
1571
  case 2:
1572
- this._point = 3, point$1(this, slope2(this, t1 = slope3(this, x, y)), t1, !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
1572
+ this._point = 3, point$2(this, slope2(this, t1 = slope3(this, x, y)), t1, !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
1573
1573
  break;
1574
1574
  default:
1575
- point$1(this, this._t0, t1 = slope3(this, x, y), !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
1575
+ point$2(this, this._t0, t1 = slope3(this, x, y), !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
1576
1576
  }
1577
1577
  this._x0 = this._x1, this._x1 = x, this._y0 = this._y1, this._y1 = y, this._t0 = t1, this._lastDefined1 = this._lastDefined2, this._lastDefined2 = !1 !== p.defined, this.lastPoint0 = this.lastPoint1, this.lastPoint1 = p;
1578
1578
  }
@@ -1693,7 +1693,164 @@ function genLinearClosedTypeSegments(path, points) {
1693
1693
  return genCurveSegments(path, points);
1694
1694
  }
1695
1695
 
1696
+ function point$1(curveClass, x, y, defined, p) {
1697
+ let x1 = curveClass._x1,
1698
+ y1 = curveClass._y1,
1699
+ x2 = curveClass._x2,
1700
+ y2 = curveClass._y2;
1701
+ if (curveClass._l01_a > epsilon) {
1702
+ const a = 2 * curveClass._l01_2a + 3 * curveClass._l01_a * curveClass._l12_a + curveClass._l12_2a,
1703
+ n = 3 * curveClass._l01_a * (curveClass._l01_a + curveClass._l12_a);
1704
+ x1 = (x1 * a - curveClass._x0 * curveClass._l12_2a + curveClass._x2 * curveClass._l01_2a) / n, y1 = (y1 * a - curveClass._y0 * curveClass._l12_2a + curveClass._y2 * curveClass._l01_2a) / n;
1705
+ }
1706
+ if (curveClass._l23_a > epsilon) {
1707
+ const b = 2 * curveClass._l23_2a + 3 * curveClass._l23_a * curveClass._l12_a + curveClass._l12_2a,
1708
+ m = 3 * curveClass._l23_a * (curveClass._l23_a + curveClass._l12_a);
1709
+ x2 = (x2 * b + curveClass._x1 * curveClass._l23_2a - x * curveClass._l12_2a) / m, y2 = (y2 * b + curveClass._y1 * curveClass._l23_2a - y * curveClass._l12_2a) / m;
1710
+ }
1711
+ curveClass.context.bezierCurveTo(x1, y1, x2, y2, curveClass._x2, curveClass._y2, defined, curveClass.lastPoint1);
1712
+ }
1713
+ class CatmullRom {
1714
+ constructor(context) {
1715
+ let alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
1716
+ let startPoint = arguments.length > 2 ? arguments[2] : undefined;
1717
+ this.context = context, this.startPoint = startPoint, this._alpha = alpha;
1718
+ }
1719
+ areaStart() {
1720
+ this._line = 0;
1721
+ }
1722
+ areaEnd() {
1723
+ this._line = NaN;
1724
+ }
1725
+ lineStart() {
1726
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
1727
+ }
1728
+ lineEnd() {
1729
+ switch (this._point) {
1730
+ case 2:
1731
+ this.context.lineTo(this._x2, this._y2, !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
1732
+ break;
1733
+ case 3:
1734
+ this.point({
1735
+ x: this._x2,
1736
+ y: this._y2
1737
+ });
1738
+ }
1739
+ (this._line || 0 !== this._line && 1 === this._point) && this.context.closePath(), this._line = 1 - this._line;
1740
+ }
1741
+ point(p) {
1742
+ const {
1743
+ x: x,
1744
+ y: y
1745
+ } = p;
1746
+ if (this._point) {
1747
+ const x23 = this._x2 - x,
1748
+ y23 = this._y2 - y;
1749
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
1750
+ }
1751
+ switch (this._point) {
1752
+ case 0:
1753
+ this._point = 1, this._line ? this.context.lineTo(x, y, !1 !== this._lastDefined1 && !1 !== this._lastDefined2) : this.context.moveTo(x, y);
1754
+ break;
1755
+ case 1:
1756
+ this._point = 2;
1757
+ break;
1758
+ case 2:
1759
+ this._point = 3;
1760
+ default:
1761
+ point$1(this, x, y, !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
1762
+ }
1763
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = x, this._y0 = this._y1, this._y1 = this._y2, this._y2 = y, this._lastDefined1 = this._lastDefined2, this._lastDefined2 = p.defined, this.lastPoint0 = this.lastPoint1, this.lastPoint1 = p;
1764
+ }
1765
+ tryUpdateLength() {
1766
+ return this.context.tryUpdateLength();
1767
+ }
1768
+ }
1769
+ function commonGenCatmullRomSegments(type, cons) {
1770
+ return function (points, alpha) {
1771
+ let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1772
+ const {
1773
+ direction: direction,
1774
+ startPoint: startPoint
1775
+ } = params;
1776
+ if (points.length < 2 - Number(!!startPoint)) return null;
1777
+ if (points.length < 3 - Number(!!startPoint)) return genLinearSegments(points, params);
1778
+ const segContext = genSegContext(type, direction, points),
1779
+ gatmullRom = new cons(segContext, alpha, startPoint);
1780
+ return genCurveSegments(gatmullRom, points), segContext;
1781
+ };
1782
+ }
1783
+ const genCatmullRomSegments = commonGenCatmullRomSegments("catmullRom", CatmullRom);
1784
+
1785
+ class CatmullRomClosed {
1786
+ constructor(context) {
1787
+ let alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
1788
+ let startPoint = arguments.length > 2 ? arguments[2] : undefined;
1789
+ this.context = context, this.startPoint = startPoint, this._alpha = alpha;
1790
+ }
1791
+ areaStart() {
1792
+ this._line = 0;
1793
+ }
1794
+ areaEnd() {
1795
+ this._line = NaN;
1796
+ }
1797
+ lineStart() {
1798
+ this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
1799
+ }
1800
+ lineEnd() {
1801
+ switch (this._point) {
1802
+ case 1:
1803
+ this.context.moveTo(this._x3, this._y3, this.lastPoint1), this.context.closePath();
1804
+ break;
1805
+ case 2:
1806
+ this.context.lineTo(this._x3, this._y3, !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1), this.context.closePath();
1807
+ break;
1808
+ case 3:
1809
+ this.point({
1810
+ x: this._x3,
1811
+ y: this._y3
1812
+ }), this.point({
1813
+ x: this._x4,
1814
+ y: this._y4
1815
+ }), this.point({
1816
+ x: this._x5,
1817
+ y: this._y5
1818
+ });
1819
+ }
1820
+ }
1821
+ point(p) {
1822
+ const {
1823
+ x: x,
1824
+ y: y
1825
+ } = p;
1826
+ if (this._point) {
1827
+ const x23 = this._x2 - x,
1828
+ y23 = this._y2 - y;
1829
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
1830
+ }
1831
+ switch (this._point) {
1832
+ case 0:
1833
+ this._point = 1, this._x3 = x, this._y3 = y;
1834
+ break;
1835
+ case 1:
1836
+ this._point = 2, this.context.moveTo(this._x4 = x, this._y4 = y, p);
1837
+ break;
1838
+ case 2:
1839
+ this._point = 3, this._x5 = x, this._y5 = y;
1840
+ break;
1841
+ default:
1842
+ point$1(this, x, y, !1 !== this._lastDefined1 && !1 !== this._lastDefined2);
1843
+ }
1844
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = x, this._y0 = this._y1, this._y1 = this._y2, this._y2 = y, this._lastDefined1 = this._lastDefined2, this._lastDefined2 = p.defined, this.lastPoint0 = this.lastPoint1, this.lastPoint1 = p;
1845
+ }
1846
+ tryUpdateLength() {
1847
+ return this.context.tryUpdateLength();
1848
+ }
1849
+ }
1850
+ const genCatmullRomClosedSegments = commonGenCatmullRomSegments("catmullRomClosed", CatmullRomClosed);
1851
+
1696
1852
  function calcLineCache$1(points, curveType, params) {
1853
+ var _a, _b;
1697
1854
  switch (curveType) {
1698
1855
  case "linear":
1699
1856
  default:
@@ -1710,6 +1867,10 @@ function calcLineCache$1(points, curveType, params) {
1710
1867
  return genStepSegments(points, 0, params);
1711
1868
  case "stepAfter":
1712
1869
  return genStepSegments(points, 1, params);
1870
+ case "catmullRom":
1871
+ return genCatmullRomSegments(points, null !== (_a = null == params ? void 0 : params.curveTension) && void 0 !== _a ? _a : .5, params);
1872
+ case "catmullRomClosed":
1873
+ return genCatmullRomClosedSegments(points, null !== (_b = null == params ? void 0 : params.curveTension) && void 0 !== _b ? _b : .5, params);
1713
1874
  case "linearClosed":
1714
1875
  return genLinearClosedSegments(points, params);
1715
1876
  }
@@ -2142,7 +2303,8 @@ const DefaultAreaAttribute = Object.assign(Object.assign(Object.assign({}, Defau
2142
2303
  segments: [],
2143
2304
  curveType: "linear",
2144
2305
  clipRange: 1,
2145
- closePath: !1
2306
+ closePath: !1,
2307
+ curveTension: 1
2146
2308
  });
2147
2309
  const DefaultCircleAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
2148
2310
  radius: 1,
@@ -2177,7 +2339,8 @@ const DefaultLineAttribute = Object.assign(Object.assign(Object.assign({}, Defau
2177
2339
  curveType: "linear",
2178
2340
  clipRange: 1,
2179
2341
  clipRangeByDimension: "default",
2180
- closePath: !1
2342
+ closePath: !1,
2343
+ curveTension: 1
2181
2344
  });
2182
2345
  const DefaultPathAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
2183
2346
  path: new CustomPath2D(),
@@ -5879,6 +6042,7 @@ function drawArcPath(arc, context, cx, cy, outerRadius, innerRadius, partStroke)
5879
6042
  }
5880
6043
  if (outerRadius <= epsilon) context.moveTo(cx, cy);else if (deltaAngle >= pi2 - epsilon) context.moveTo(cx + outerRadius * cos(startAngle), cy + outerRadius * sin(startAngle)), context.arc(cx, cy, outerRadius, startAngle, endAngle, !clockwise), innerRadius > epsilon && (context.moveTo(cx + innerRadius * cos(endAngle), cy + innerRadius * sin(endAngle)), context.arc(cx, cy, innerRadius, endAngle, startAngle, clockwise));else {
5881
6044
  const cornerRadius = arc.getParsedCornerRadius(),
6045
+ cornerRadiusIsArray = isArray(cornerRadius),
5882
6046
  {
5883
6047
  outerDeltaAngle: outerDeltaAngle,
5884
6048
  innerDeltaAngle: innerDeltaAngle,
@@ -5887,10 +6051,10 @@ function drawArcPath(arc, context, cx, cy, outerRadius, innerRadius, partStroke)
5887
6051
  innerEndAngle: innerEndAngle,
5888
6052
  innerStartAngle: innerStartAngle
5889
6053
  } = arc.getParsePadAngle(startAngle, endAngle),
5890
- outerCornerRadiusStart = cornerRadius,
5891
- outerCornerRadiusEnd = cornerRadius,
5892
- innerCornerRadiusEnd = cornerRadius,
5893
- innerCornerRadiusStart = cornerRadius,
6054
+ outerCornerRadiusStart = cornerRadiusIsArray ? cornerRadius[0] : cornerRadius,
6055
+ outerCornerRadiusEnd = cornerRadiusIsArray ? cornerRadius[1] : cornerRadius,
6056
+ innerCornerRadiusEnd = cornerRadiusIsArray ? cornerRadius[2] : cornerRadius,
6057
+ innerCornerRadiusStart = cornerRadiusIsArray ? cornerRadius[3] : cornerRadius,
5894
6058
  maxOuterCornerRadius = Math.max(outerCornerRadiusEnd, outerCornerRadiusStart),
5895
6059
  maxInnerCornerRadius = Math.max(innerCornerRadiusEnd, innerCornerRadiusStart);
5896
6060
  let limitedOcr = maxOuterCornerRadius,
@@ -7331,7 +7495,7 @@ function createSymbol(attributes) {
7331
7495
  return new Symbol$1(attributes);
7332
7496
  }
7333
7497
 
7334
- const LINE_UPDATE_TAG_KEY = ["segments", "points", "curveType", ...GRAPHIC_UPDATE_TAG_KEY];
7498
+ const LINE_UPDATE_TAG_KEY = ["segments", "points", "curveType", "curveTension", ...GRAPHIC_UPDATE_TAG_KEY];
7335
7499
  let Line$1 = class Line extends Graphic {
7336
7500
  constructor() {
7337
7501
  let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -8234,7 +8398,7 @@ function createPath(attributes) {
8234
8398
  return new Path(attributes);
8235
8399
  }
8236
8400
 
8237
- const AREA_UPDATE_TAG_KEY = ["segments", "points", "curveType", ...GRAPHIC_UPDATE_TAG_KEY];
8401
+ const AREA_UPDATE_TAG_KEY = ["segments", "points", "curveType", "curveTension", ...GRAPHIC_UPDATE_TAG_KEY];
8238
8402
  class Area extends Graphic {
8239
8403
  constructor(params) {
8240
8404
  super(params), this.type = "area", this.numberType = AREA_NUMBER_TYPE;
@@ -8344,8 +8508,13 @@ class Arc extends Graphic {
8344
8508
  innerRadius = arcTheme.innerRadius
8345
8509
  } = this.attribute;
8346
8510
  if (outerRadius += outerPadding, innerRadius -= innerPadding, 0 === cornerRadius || "0%" === cornerRadius) return 0;
8347
- const deltaRadius = Math.abs(outerRadius - innerRadius);
8348
- return Math.min(isNumber(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
8511
+ const deltaRadius = Math.abs(outerRadius - innerRadius),
8512
+ parseCR = cornerRadius => Math.min(isNumber(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
8513
+ if (isArray(cornerRadius)) {
8514
+ const crList = cornerRadius.map(cr => parseCR(cr) || 0);
8515
+ return 0 === crList.length ? [crList[0], crList[0], crList[0], crList[0]] : 2 === crList.length ? [crList[0], crList[1], crList[0], crList[1]] : (3 === crList.length && crList.push(0), crList);
8516
+ }
8517
+ return parseCR(cornerRadius);
8349
8518
  }
8350
8519
  getParsedAngle() {
8351
8520
  const arcTheme = getTheme(this).arc;
@@ -10425,6 +10594,7 @@ let DefaultCanvasArcRender = class extends BaseRender {
10425
10594
  outerRadius = innerRadius, innerRadius = temp;
10426
10595
  }
10427
10596
  const cornerRadius = arc.getParsedCornerRadius(),
10597
+ cornerRadiusIsArray = isArray(cornerRadius),
10428
10598
  {
10429
10599
  outerDeltaAngle: outerDeltaAngle,
10430
10600
  innerDeltaAngle: innerDeltaAngle,
@@ -10433,10 +10603,10 @@ let DefaultCanvasArcRender = class extends BaseRender {
10433
10603
  innerEndAngle: innerEndAngle,
10434
10604
  innerStartAngle: innerStartAngle
10435
10605
  } = arc.getParsePadAngle(startAngle, endAngle),
10436
- outerCornerRadiusStart = cornerRadius,
10437
- outerCornerRadiusEnd = cornerRadius,
10438
- innerCornerRadiusEnd = cornerRadius,
10439
- innerCornerRadiusStart = cornerRadius,
10606
+ outerCornerRadiusStart = cornerRadiusIsArray ? cornerRadius[0] : cornerRadius,
10607
+ outerCornerRadiusEnd = cornerRadiusIsArray ? cornerRadius[1] : cornerRadius,
10608
+ innerCornerRadiusEnd = cornerRadiusIsArray ? cornerRadius[2] : cornerRadius,
10609
+ innerCornerRadiusStart = cornerRadiusIsArray ? cornerRadius[3] : cornerRadius,
10440
10610
  maxOuterCornerRadius = Math.max(outerCornerRadiusEnd, outerCornerRadiusStart),
10441
10611
  maxInnerCornerRadius = Math.max(innerCornerRadiusEnd, innerCornerRadiusStart);
10442
10612
  let limitedOcr = maxOuterCornerRadius,
@@ -10827,7 +10997,8 @@ let DefaultCanvasLineRender = class extends BaseRender {
10827
10997
  strokeOpacity = lineAttribute.strokeOpacity,
10828
10998
  segments: segments,
10829
10999
  points: points,
10830
- closePath: closePath
11000
+ closePath: closePath,
11001
+ curveTension = lineAttribute.curveTension
10831
11002
  } = line.attribute;
10832
11003
  if (!this.valid(line, lineAttribute, fillCb, strokeCb)) return;
10833
11004
  let {
@@ -10861,7 +11032,8 @@ let DefaultCanvasLineRender = class extends BaseRender {
10861
11032
  defined: lastSeg.curves[lastSeg.curves.length - 1].defined
10862
11033
  } : index > 1 && (startPoint.x = lastSeg.endX, startPoint.y = lastSeg.endY, startPoint.defined = lastSeg.curves[lastSeg.curves.length - 1].defined);
10863
11034
  const data = calcLineCache$1(seg.points, curveType, {
10864
- startPoint: startPoint
11035
+ startPoint: startPoint,
11036
+ curveTension: curveTension
10865
11037
  });
10866
11038
  return lastSeg = data, data;
10867
11039
  }).filter(item => !!item), "linearClosed" === curveType) {
@@ -10878,7 +11050,9 @@ let DefaultCanvasLineRender = class extends BaseRender {
10878
11050
  }
10879
11051
  } else {
10880
11052
  if (!points || !points.length) return line.cache = null, void line.clearUpdateShapeTag();
10881
- line.cache = calcLineCache$1(_points, curveType);
11053
+ line.cache = calcLineCache$1(_points, curveType, {
11054
+ curveTension: curveTension
11055
+ });
10882
11056
  }
10883
11057
  line.clearUpdateShapeTag();
10884
11058
  }
@@ -11049,6 +11223,7 @@ var __decorate$G = undefined && undefined.__decorate || function (decorators, ta
11049
11223
  };
11050
11224
  };
11051
11225
  function calcLineCache(points, curveType, params) {
11226
+ var _a, _b;
11052
11227
  switch (curveType) {
11053
11228
  case "linear":
11054
11229
  default:
@@ -11065,6 +11240,10 @@ function calcLineCache(points, curveType, params) {
11065
11240
  return genStepSegments(points, 0, params);
11066
11241
  case "stepAfter":
11067
11242
  return genStepSegments(points, 1, params);
11243
+ case "catmullRom":
11244
+ return genCatmullRomSegments(points, null !== (_a = null == params ? void 0 : params.curveTension) && void 0 !== _a ? _a : .5, params);
11245
+ case "catmullRomClosed":
11246
+ return genCatmullRomClosedSegments(points, null !== (_b = null == params ? void 0 : params.curveTension) && void 0 !== _b ? _b : .5, params);
11068
11247
  case "linearClosed":
11069
11248
  return genLinearClosedSegments(points, params);
11070
11249
  }
@@ -11129,7 +11308,8 @@ let DefaultCanvasAreaRender = class extends BaseRender {
11129
11308
  stroke = areaAttribute.stroke,
11130
11309
  fillOpacity = areaAttribute.fillOpacity,
11131
11310
  z = areaAttribute.z,
11132
- strokeOpacity = areaAttribute.strokeOpacity
11311
+ strokeOpacity = areaAttribute.strokeOpacity,
11312
+ curveTension = areaAttribute.curveTension
11133
11313
  } = area.attribute,
11134
11314
  data = this.valid(area, areaAttribute, fillCb, strokeCb);
11135
11315
  if (!data) return;
@@ -11160,7 +11340,8 @@ let DefaultCanvasAreaRender = class extends BaseRender {
11160
11340
  y: lastTopSeg.endY
11161
11341
  } : index > 1 && (startPoint.x = lastTopSeg.endX, startPoint.y = lastTopSeg.endY);
11162
11342
  const data = calcLineCache(seg.points, curveType, {
11163
- startPoint: startPoint
11343
+ startPoint: startPoint,
11344
+ curveTension: curveTension
11164
11345
  });
11165
11346
  return lastTopSeg = data, data;
11166
11347
  }).filter(item => !!item);
@@ -11181,7 +11362,9 @@ let DefaultCanvasAreaRender = class extends BaseRender {
11181
11362
  y: null !== (_d = endPoint.y1) && void 0 !== _d ? _d : endPoint.y
11182
11363
  });
11183
11364
  }
11184
- bottomPoints.length > 1 && (lastBottomSeg = calcLineCache(bottomPoints, "stepBefore" === curveType ? "stepAfter" : "stepAfter" === curveType ? "stepBefore" : curveType), bottomCaches.unshift(lastBottomSeg));
11365
+ bottomPoints.length > 1 && (lastBottomSeg = calcLineCache(bottomPoints, "stepBefore" === curveType ? "stepAfter" : "stepAfter" === curveType ? "stepBefore" : curveType, {
11366
+ curveTension: curveTension
11367
+ }), bottomCaches.unshift(lastBottomSeg));
11185
11368
  }
11186
11369
  area.cacheArea = bottomCaches.map((item, index) => ({
11187
11370
  top: topCaches[index],
@@ -11196,8 +11379,12 @@ let DefaultCanvasAreaRender = class extends BaseRender {
11196
11379
  x: null !== (_e = points[i].x1) && void 0 !== _e ? _e : points[i].x,
11197
11380
  y: null !== (_f = points[i].y1) && void 0 !== _f ? _f : points[i].y
11198
11381
  });
11199
- const topCache = calcLineCache(topPoints, curveType),
11200
- bottomCache = calcLineCache(bottomPoints, "stepBefore" === curveType ? "stepAfter" : "stepAfter" === curveType ? "stepBefore" : curveType);
11382
+ const topCache = calcLineCache(topPoints, curveType, {
11383
+ curveTension: curveTension
11384
+ }),
11385
+ bottomCache = calcLineCache(bottomPoints, "stepBefore" === curveType ? "stepAfter" : "stepAfter" === curveType ? "stepBefore" : curveType, {
11386
+ curveTension: curveTension
11387
+ });
11201
11388
  area.cacheArea = {
11202
11389
  top: topCache,
11203
11390
  bottom: bottomCache
@@ -11888,6 +12075,100 @@ var __decorate$A = undefined && undefined.__decorate || function (decorators, ta
11888
12075
  decorator(target, key, paramIndex);
11889
12076
  };
11890
12077
  };
12078
+ let DefaultCanvasGroupRender = class {
12079
+ constructor(groupRenderContribitions) {
12080
+ this.groupRenderContribitions = groupRenderContribitions, this.numberType = GROUP_NUMBER_TYPE;
12081
+ }
12082
+ drawShape(group, context, x, y, drawContext, params, fillCb, strokeCb) {
12083
+ const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
12084
+ {
12085
+ fill = groupAttribute.fill,
12086
+ background: background,
12087
+ stroke = groupAttribute.stroke,
12088
+ opacity = groupAttribute.opacity,
12089
+ width = groupAttribute.width,
12090
+ height = groupAttribute.height,
12091
+ clip = groupAttribute.clip,
12092
+ fillOpacity = groupAttribute.fillOpacity,
12093
+ strokeOpacity = groupAttribute.strokeOpacity,
12094
+ cornerRadius = groupAttribute.cornerRadius,
12095
+ path = groupAttribute.path,
12096
+ lineWidth = groupAttribute.lineWidth,
12097
+ visible = groupAttribute.visible
12098
+ } = group.attribute,
12099
+ fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
12100
+ sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
12101
+ doFill = runFill(fill, background),
12102
+ doStroke = runStroke(stroke, lineWidth);
12103
+ if (!group.valid || !visible) return;
12104
+ if (!clip) {
12105
+ if (!doFill && !doStroke) return;
12106
+ if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
12107
+ }
12108
+ if (path && path.length && drawContext.drawContribution) {
12109
+ const disableFill = context.disableFill,
12110
+ disableStroke = context.disableStroke,
12111
+ disableBeginPath = context.disableBeginPath;
12112
+ context.disableFill = !0, context.disableStroke = !0, context.disableBeginPath = !0, path.forEach(g => {
12113
+ drawContext.drawContribution.getRenderContribution(g).draw(g, drawContext.renderService, drawContext, params);
12114
+ }), context.disableFill = disableFill, context.disableStroke = disableStroke, context.disableBeginPath = disableBeginPath;
12115
+ } else 0 === cornerRadius || isArray(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius));
12116
+ this._groupRenderContribitions || (this._groupRenderContribitions = this.groupRenderContribitions.getContributions() || [], this._groupRenderContribitions.push(defaultGroupBackgroundRenderContribution));
12117
+ const doFillOrStroke = {
12118
+ doFill: doFill,
12119
+ doStroke: doStroke
12120
+ };
12121
+ this._groupRenderContribitions.forEach(c => {
12122
+ c.time === BaseRenderContributionTime.beforeFillStroke && c.drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke);
12123
+ }), clip && context.clip(), context.setShadowBlendStyle && context.setShadowBlendStyle(group, group.attribute, groupAttribute), doFillOrStroke.doFill && (fillCb ? fillCb(context, group.attribute, groupAttribute) : fVisible && (context.setCommonStyle(group, group.attribute, x, y, groupAttribute), context.fill())), doFillOrStroke.doStroke && (strokeCb ? strokeCb(context, group.attribute, groupAttribute) : sVisible && (context.setStrokeStyle(group, group.attribute, x, y, groupAttribute), context.stroke())), this._groupRenderContribitions.forEach(c => {
12124
+ c.time === BaseRenderContributionTime.afterFillStroke && c.drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb);
12125
+ });
12126
+ }
12127
+ draw(group, renderService, drawContext, params) {
12128
+ const {
12129
+ context: context
12130
+ } = drawContext;
12131
+ if (!context) return;
12132
+ const {
12133
+ clip: clip,
12134
+ baseOpacity = 1
12135
+ } = group.attribute;
12136
+ clip ? context.save() : context.highPerformanceSave(), context.baseGlobalAlpha *= baseOpacity;
12137
+ const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
12138
+ lastModelMatrix = context.modelMatrix;
12139
+ if (context.camera) {
12140
+ const nextModelMatrix = mat4Allocate.allocate(),
12141
+ modelMatrix = mat4Allocate.allocate();
12142
+ getModelMatrix(modelMatrix, group, groupAttribute), multiplyMat4Mat4(nextModelMatrix, lastModelMatrix || nextModelMatrix, modelMatrix), context.modelMatrix = nextModelMatrix, mat4Allocate.free(modelMatrix), context.setTransform(1, 0, 0, 1, 0, 0, !0);
12143
+ } else context.transformFromMatrix(group.transMatrix, !0);
12144
+ context.beginPath(), params.skipDraw ? this.drawShape(group, context, 0, 0, drawContext, params, () => !1, () => !1) : this.drawShape(group, context, 0, 0, drawContext);
12145
+ const {
12146
+ scrollX = groupAttribute.scrollX,
12147
+ scrollY = groupAttribute.scrollY
12148
+ } = group.attribute;
12149
+ let p;
12150
+ (scrollX || scrollY) && context.translate(scrollX, scrollY), params && params.drawingCb && (p = params.drawingCb()), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, context.baseGlobalAlpha /= baseOpacity, p && p.then ? p.then(() => {
12151
+ clip ? context.restore() : context.highPerformanceRestore();
12152
+ }) : clip ? context.restore() : context.highPerformanceRestore();
12153
+ }
12154
+ };
12155
+ DefaultCanvasGroupRender = __decorate$A([injectable(), __param$n(0, inject(ContributionProvider)), __param$n(0, named(GroupRenderContribution)), __metadata$s("design:paramtypes", [Object])], DefaultCanvasGroupRender);
12156
+
12157
+ var __decorate$z = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12158
+ var d,
12159
+ c = arguments.length,
12160
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
12161
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
12162
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
12163
+ },
12164
+ __metadata$r = undefined && undefined.__metadata || function (k, v) {
12165
+ if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
12166
+ },
12167
+ __param$m = undefined && undefined.__param || function (paramIndex, decorator) {
12168
+ return function (target, key) {
12169
+ decorator(target, key, paramIndex);
12170
+ };
12171
+ };
11891
12172
  const repeatStr = ["", "repeat-x", "repeat-y", "repeat"];
11892
12173
  let DefaultCanvasImageRender = class extends BaseRender {
11893
12174
  constructor(imageRenderContribitions) {
@@ -11944,7 +12225,7 @@ let DefaultCanvasImageRender = class extends BaseRender {
11944
12225
  this._draw(image, imageAttribute, !1, drawContext);
11945
12226
  }
11946
12227
  };
11947
- DefaultCanvasImageRender = __decorate$A([injectable(), __param$n(0, inject(ContributionProvider)), __param$n(0, named(ImageRenderContribution)), __metadata$s("design:paramtypes", [Object])], DefaultCanvasImageRender);
12228
+ DefaultCanvasImageRender = __decorate$z([injectable(), __param$m(0, inject(ContributionProvider)), __param$m(0, named(ImageRenderContribution)), __metadata$r("design:paramtypes", [Object])], DefaultCanvasImageRender);
11948
12229
 
11949
12230
  const IncrementalDrawContribution = Symbol.for("IncrementalDrawContribution");
11950
12231
  const ArcRender = Symbol.for("ArcRender");
@@ -11962,14 +12243,14 @@ const RichTextRender = Symbol.for("RichTextRender");
11962
12243
  const ImageRender = Symbol.for("ImageRender");
11963
12244
  const DrawContribution = Symbol.for("DrawContribution");
11964
12245
 
11965
- var __decorate$z = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12246
+ var __decorate$y = undefined && undefined.__decorate || function (decorators, target, key, desc) {
11966
12247
  var d,
11967
12248
  c = arguments.length,
11968
12249
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
11969
12250
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
11970
12251
  return c > 3 && r && Object.defineProperty(target, key, r), r;
11971
12252
  },
11972
- __metadata$r = undefined && undefined.__metadata || function (k, v) {
12253
+ __metadata$q = undefined && undefined.__metadata || function (k, v) {
11973
12254
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
11974
12255
  };
11975
12256
  const DrawItemInterceptor = Symbol.for("DrawItemInterceptor");
@@ -12029,7 +12310,7 @@ let CommonDrawItemInterceptorContribution = class {
12029
12310
  return !1;
12030
12311
  }
12031
12312
  };
12032
- CommonDrawItemInterceptorContribution = __decorate$z([injectable(), __metadata$r("design:paramtypes", [])], CommonDrawItemInterceptorContribution);
12313
+ CommonDrawItemInterceptorContribution = __decorate$y([injectable(), __metadata$q("design:paramtypes", [])], CommonDrawItemInterceptorContribution);
12033
12314
  class InteractiveDrawItemInterceptorContribution {
12034
12315
  constructor() {
12035
12316
  this.order = 1;
@@ -12161,17 +12442,17 @@ class Canvas3DDrawItemInterceptor {
12161
12442
  }
12162
12443
  }
12163
12444
 
12164
- var __decorate$y = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12445
+ var __decorate$x = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12165
12446
  var d,
12166
12447
  c = arguments.length,
12167
12448
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
12168
12449
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
12169
12450
  return c > 3 && r && Object.defineProperty(target, key, r), r;
12170
12451
  },
12171
- __metadata$q = undefined && undefined.__metadata || function (k, v) {
12452
+ __metadata$p = undefined && undefined.__metadata || function (k, v) {
12172
12453
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
12173
12454
  },
12174
- __param$m = undefined && undefined.__param || function (paramIndex, decorator) {
12455
+ __param$l = undefined && undefined.__param || function (paramIndex, decorator) {
12175
12456
  return function (target, key) {
12176
12457
  decorator(target, key, paramIndex);
12177
12458
  };
@@ -12208,7 +12489,7 @@ let DefaultRenderService = class {
12208
12489
  this.prepare(updateBounds), this.prepareRenderList(), this.beforeDraw(params), this.draw(params), this.afterDraw(params), this.drawParams = null;
12209
12490
  }
12210
12491
  };
12211
- DefaultRenderService = __decorate$y([injectable(), __param$m(0, inject(DrawContribution)), __metadata$q("design:paramtypes", [Object])], DefaultRenderService);
12492
+ DefaultRenderService = __decorate$x([injectable(), __param$l(0, inject(DrawContribution)), __metadata$p("design:paramtypes", [Object])], DefaultRenderService);
12212
12493
 
12213
12494
  var renderModule$1 = new ContainerModule(bind => {
12214
12495
  bind(RenderService).to(DefaultRenderService);
@@ -12217,7 +12498,7 @@ var renderModule$1 = new ContainerModule(bind => {
12217
12498
  const PickerService = Symbol.for("PickerService");
12218
12499
  const GlobalPickerService = Symbol.for("GlobalPickerService");
12219
12500
 
12220
- var __decorate$x = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12501
+ var __decorate$w = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12221
12502
  var d,
12222
12503
  c = arguments.length,
12223
12504
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -12250,7 +12531,7 @@ let ShadowRootPickItemInterceptorContribution = class {
12250
12531
  return context.highPerformanceRestore(), result;
12251
12532
  }
12252
12533
  };
12253
- ShadowRootPickItemInterceptorContribution = __decorate$x([injectable()], ShadowRootPickItemInterceptorContribution);
12534
+ ShadowRootPickItemInterceptorContribution = __decorate$w([injectable()], ShadowRootPickItemInterceptorContribution);
12254
12535
  let InteractivePickItemInterceptorContribution = class {
12255
12536
  constructor() {
12256
12537
  this.order = 1;
@@ -12269,7 +12550,7 @@ let InteractivePickItemInterceptorContribution = class {
12269
12550
  return null;
12270
12551
  }
12271
12552
  };
12272
- InteractivePickItemInterceptorContribution = __decorate$x([injectable()], InteractivePickItemInterceptorContribution);
12553
+ InteractivePickItemInterceptorContribution = __decorate$w([injectable()], InteractivePickItemInterceptorContribution);
12273
12554
  let Canvas3DPickItemInterceptor = class {
12274
12555
  constructor() {
12275
12556
  this.order = 1;
@@ -12329,7 +12610,7 @@ let Canvas3DPickItemInterceptor = class {
12329
12610
  context.setTransformForCurrent();
12330
12611
  }
12331
12612
  };
12332
- Canvas3DPickItemInterceptor = __decorate$x([injectable()], Canvas3DPickItemInterceptor);
12613
+ Canvas3DPickItemInterceptor = __decorate$w([injectable()], Canvas3DPickItemInterceptor);
12333
12614
 
12334
12615
  var pickModule = new ContainerModule((bind, unbind, isBound) => {
12335
12616
  isBound(PickerService) || (bind(GlobalPickerService).toSelf(), bind(PickerService).toService(GlobalPickerService)), bind(Canvas3DPickItemInterceptor).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(Canvas3DPickItemInterceptor), bind(ShadowRootPickItemInterceptorContribution).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(ShadowRootPickItemInterceptorContribution), bind(InteractivePickItemInterceptorContribution).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(InteractivePickItemInterceptorContribution), bindContributionProvider(bind, PickItemInterceptor);
@@ -12342,17 +12623,17 @@ var graphicModule = new ContainerModule(bind => {
12342
12623
  const AutoEnablePlugins = Symbol.for("AutoEnablePlugins");
12343
12624
  const PluginService = Symbol.for("PluginService");
12344
12625
 
12345
- var __decorate$w = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12626
+ var __decorate$v = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12346
12627
  var d,
12347
12628
  c = arguments.length,
12348
12629
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
12349
12630
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
12350
12631
  return c > 3 && r && Object.defineProperty(target, key, r), r;
12351
12632
  },
12352
- __metadata$p = undefined && undefined.__metadata || function (k, v) {
12633
+ __metadata$o = undefined && undefined.__metadata || function (k, v) {
12353
12634
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
12354
12635
  },
12355
- __param$l = undefined && undefined.__param || function (paramIndex, decorator) {
12636
+ __param$k = undefined && undefined.__param || function (paramIndex, decorator) {
12356
12637
  return function (target, key) {
12357
12638
  decorator(target, key, paramIndex);
12358
12639
  };
@@ -12392,7 +12673,7 @@ let DefaultPluginService = class {
12392
12673
  }), this.onRegisterPlugin = [];
12393
12674
  }
12394
12675
  };
12395
- DefaultPluginService = __decorate$w([injectable(), __param$l(0, inject(ContributionProvider)), __param$l(0, named(AutoEnablePlugins)), __metadata$p("design:paramtypes", [Object])], DefaultPluginService);
12676
+ DefaultPluginService = __decorate$v([injectable(), __param$k(0, inject(ContributionProvider)), __param$k(0, named(AutoEnablePlugins)), __metadata$o("design:paramtypes", [Object])], DefaultPluginService);
12396
12677
 
12397
12678
  var pluginModule = new ContainerModule(bind => {
12398
12679
  bind(PluginService).to(DefaultPluginService), bindContributionProviderNoSingletonScope(bind, AutoEnablePlugins);
@@ -12406,14 +12687,14 @@ var textMeasureModules = new ContainerModule(bind => {
12406
12687
  bind(TextMeasureContribution).to(DefaultTextMeasureContribution).inSingletonScope(), bindContributionProvider(bind, TextMeasureContribution);
12407
12688
  });
12408
12689
 
12409
- var __decorate$v = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12690
+ var __decorate$u = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12410
12691
  var d,
12411
12692
  c = arguments.length,
12412
12693
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
12413
12694
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
12414
12695
  return c > 3 && r && Object.defineProperty(target, key, r), r;
12415
12696
  },
12416
- __metadata$o = undefined && undefined.__metadata || function (k, v) {
12697
+ __metadata$n = undefined && undefined.__metadata || function (k, v) {
12417
12698
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
12418
12699
  };
12419
12700
  let CanvasLayerHandlerContribution = class {
@@ -12483,16 +12764,16 @@ let CanvasLayerHandlerContribution = class {
12483
12764
  this.canvas.release();
12484
12765
  }
12485
12766
  };
12486
- CanvasLayerHandlerContribution = __decorate$v([injectable(), __metadata$o("design:paramtypes", [])], CanvasLayerHandlerContribution);
12767
+ CanvasLayerHandlerContribution = __decorate$u([injectable(), __metadata$n("design:paramtypes", [])], CanvasLayerHandlerContribution);
12487
12768
 
12488
- var __decorate$u = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12769
+ var __decorate$t = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12489
12770
  var d,
12490
12771
  c = arguments.length,
12491
12772
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
12492
12773
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
12493
12774
  return c > 3 && r && Object.defineProperty(target, key, r), r;
12494
12775
  },
12495
- __metadata$n = undefined && undefined.__metadata || function (k, v) {
12776
+ __metadata$m = undefined && undefined.__metadata || function (k, v) {
12496
12777
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
12497
12778
  };
12498
12779
  let EmptyLayerHandlerContribution = class {
@@ -12527,16 +12808,16 @@ let EmptyLayerHandlerContribution = class {
12527
12808
  }
12528
12809
  release() {}
12529
12810
  };
12530
- EmptyLayerHandlerContribution = __decorate$u([injectable(), __metadata$n("design:paramtypes", [])], EmptyLayerHandlerContribution);
12811
+ EmptyLayerHandlerContribution = __decorate$t([injectable(), __metadata$m("design:paramtypes", [])], EmptyLayerHandlerContribution);
12531
12812
 
12532
- var __decorate$t = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12813
+ var __decorate$s = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12533
12814
  var d,
12534
12815
  c = arguments.length,
12535
12816
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
12536
12817
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
12537
12818
  return c > 3 && r && Object.defineProperty(target, key, r), r;
12538
12819
  },
12539
- __metadata$m = undefined && undefined.__metadata || function (k, v) {
12820
+ __metadata$l = undefined && undefined.__metadata || function (k, v) {
12540
12821
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
12541
12822
  };
12542
12823
  let OffscreenLayerHandlerContribution = class {
@@ -12599,7 +12880,7 @@ let OffscreenLayerHandlerContribution = class {
12599
12880
  }
12600
12881
  merge(layerHandlers) {}
12601
12882
  };
12602
- OffscreenLayerHandlerContribution = __decorate$t([injectable(), __metadata$m("design:paramtypes", [])], OffscreenLayerHandlerContribution);
12883
+ OffscreenLayerHandlerContribution = __decorate$s([injectable(), __metadata$l("design:paramtypes", [])], OffscreenLayerHandlerContribution);
12603
12884
 
12604
12885
  var layerHandlerModules = new ContainerModule(bind => {
12605
12886
  bind(CanvasLayerHandlerContribution).toSelf(), bind(OffscreenLayerHandlerContribution).toSelf(), bind(EmptyLayerHandlerContribution).toSelf(), bind(StaticLayerHandlerContribution).toService(CanvasLayerHandlerContribution), bind(DynamicLayerHandlerContribution).toService(OffscreenLayerHandlerContribution), bind(VirtualLayerHandlerContribution).toService(EmptyLayerHandlerContribution);
@@ -12715,17 +12996,17 @@ function findNextGraphic(graphic, id, defaultZIndex) {
12715
12996
  return result;
12716
12997
  }
12717
12998
 
12718
- var __decorate$s = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12999
+ var __decorate$r = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12719
13000
  var d,
12720
13001
  c = arguments.length,
12721
13002
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
12722
13003
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
12723
13004
  return c > 3 && r && Object.defineProperty(target, key, r), r;
12724
13005
  },
12725
- __metadata$l = undefined && undefined.__metadata || function (k, v) {
13006
+ __metadata$k = undefined && undefined.__metadata || function (k, v) {
12726
13007
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
12727
13008
  },
12728
- __param$k = undefined && undefined.__param || function (paramIndex, decorator) {
13009
+ __param$j = undefined && undefined.__param || function (paramIndex, decorator) {
12729
13010
  return function (target, key) {
12730
13011
  decorator(target, key, paramIndex);
12731
13012
  };
@@ -12912,101 +13193,7 @@ let DefaultDrawContribution = class {
12912
13193
  }
12913
13194
  afterDraw(renderService, drawParams) {}
12914
13195
  };
12915
- DefaultDrawContribution = __decorate$s([injectable(), __param$k(0, multiInject(GraphicRender)), __param$k(1, inject(ContributionProvider)), __param$k(1, named(DrawItemInterceptor)), __metadata$l("design:paramtypes", [Array, Object])], DefaultDrawContribution);
12916
-
12917
- var __decorate$r = undefined && undefined.__decorate || function (decorators, target, key, desc) {
12918
- var d,
12919
- c = arguments.length,
12920
- r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
12921
- if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
12922
- return c > 3 && r && Object.defineProperty(target, key, r), r;
12923
- },
12924
- __metadata$k = undefined && undefined.__metadata || function (k, v) {
12925
- if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
12926
- },
12927
- __param$j = undefined && undefined.__param || function (paramIndex, decorator) {
12928
- return function (target, key) {
12929
- decorator(target, key, paramIndex);
12930
- };
12931
- };
12932
- let DefaultCanvasGroupRender = class {
12933
- constructor(groupRenderContribitions) {
12934
- this.groupRenderContribitions = groupRenderContribitions, this.numberType = GROUP_NUMBER_TYPE;
12935
- }
12936
- drawShape(group, context, x, y, drawContext, params, fillCb, strokeCb) {
12937
- const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
12938
- {
12939
- fill = groupAttribute.fill,
12940
- background: background,
12941
- stroke = groupAttribute.stroke,
12942
- opacity = groupAttribute.opacity,
12943
- width = groupAttribute.width,
12944
- height = groupAttribute.height,
12945
- clip = groupAttribute.clip,
12946
- fillOpacity = groupAttribute.fillOpacity,
12947
- strokeOpacity = groupAttribute.strokeOpacity,
12948
- cornerRadius = groupAttribute.cornerRadius,
12949
- path = groupAttribute.path,
12950
- lineWidth = groupAttribute.lineWidth,
12951
- visible = groupAttribute.visible
12952
- } = group.attribute,
12953
- fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
12954
- sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
12955
- doFill = runFill(fill, background),
12956
- doStroke = runStroke(stroke, lineWidth);
12957
- if (!group.valid || !visible) return;
12958
- if (!clip) {
12959
- if (!doFill && !doStroke) return;
12960
- if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
12961
- }
12962
- if (path && path.length && drawContext.drawContribution) {
12963
- const disableFill = context.disableFill,
12964
- disableStroke = context.disableStroke,
12965
- disableBeginPath = context.disableBeginPath;
12966
- context.disableFill = !0, context.disableStroke = !0, context.disableBeginPath = !0, path.forEach(g => {
12967
- drawContext.drawContribution.getRenderContribution(g).draw(g, drawContext.renderService, drawContext, params);
12968
- }), context.disableFill = disableFill, context.disableStroke = disableStroke, context.disableBeginPath = disableBeginPath;
12969
- } else 0 === cornerRadius || isArray(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius));
12970
- this._groupRenderContribitions || (this._groupRenderContribitions = this.groupRenderContribitions.getContributions() || [], this._groupRenderContribitions.push(defaultGroupBackgroundRenderContribution));
12971
- const doFillOrStroke = {
12972
- doFill: doFill,
12973
- doStroke: doStroke
12974
- };
12975
- this._groupRenderContribitions.forEach(c => {
12976
- c.time === BaseRenderContributionTime.beforeFillStroke && c.drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke);
12977
- }), clip && context.clip(), context.setShadowBlendStyle && context.setShadowBlendStyle(group, group.attribute, groupAttribute), doFillOrStroke.doFill && (fillCb ? fillCb(context, group.attribute, groupAttribute) : fVisible && (context.setCommonStyle(group, group.attribute, x, y, groupAttribute), context.fill())), doFillOrStroke.doStroke && (strokeCb ? strokeCb(context, group.attribute, groupAttribute) : sVisible && (context.setStrokeStyle(group, group.attribute, x, y, groupAttribute), context.stroke())), this._groupRenderContribitions.forEach(c => {
12978
- c.time === BaseRenderContributionTime.afterFillStroke && c.drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb);
12979
- });
12980
- }
12981
- draw(group, renderService, drawContext, params) {
12982
- const {
12983
- context: context
12984
- } = drawContext;
12985
- if (!context) return;
12986
- const {
12987
- clip: clip,
12988
- baseOpacity = 1
12989
- } = group.attribute;
12990
- clip ? context.save() : context.highPerformanceSave(), context.baseGlobalAlpha *= baseOpacity;
12991
- const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
12992
- lastModelMatrix = context.modelMatrix;
12993
- if (context.camera) {
12994
- const nextModelMatrix = mat4Allocate.allocate(),
12995
- modelMatrix = mat4Allocate.allocate();
12996
- getModelMatrix(modelMatrix, group, groupAttribute), multiplyMat4Mat4(nextModelMatrix, lastModelMatrix || nextModelMatrix, modelMatrix), context.modelMatrix = nextModelMatrix, mat4Allocate.free(modelMatrix), context.setTransform(1, 0, 0, 1, 0, 0, !0);
12997
- } else context.transformFromMatrix(group.transMatrix, !0);
12998
- context.beginPath(), params.skipDraw ? this.drawShape(group, context, 0, 0, drawContext, params, () => !1, () => !1) : this.drawShape(group, context, 0, 0, drawContext);
12999
- const {
13000
- scrollX = groupAttribute.scrollX,
13001
- scrollY = groupAttribute.scrollY
13002
- } = group.attribute;
13003
- let p;
13004
- (scrollX || scrollY) && context.translate(scrollX, scrollY), params && params.drawingCb && (p = params.drawingCb()), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, context.baseGlobalAlpha /= baseOpacity, p && p.then ? p.then(() => {
13005
- clip ? context.restore() : context.highPerformanceRestore();
13006
- }) : clip ? context.restore() : context.highPerformanceRestore();
13007
- }
13008
- };
13009
- DefaultCanvasGroupRender = __decorate$r([injectable(), __param$j(0, inject(ContributionProvider)), __param$j(0, named(GroupRenderContribution)), __metadata$k("design:paramtypes", [Object])], DefaultCanvasGroupRender);
13196
+ DefaultDrawContribution = __decorate$r([injectable(), __param$j(0, multiInject(GraphicRender)), __param$j(1, inject(ContributionProvider)), __param$j(1, named(DrawItemInterceptor)), __metadata$k("design:paramtypes", [Array, Object])], DefaultDrawContribution);
13010
13197
 
13011
13198
  var __decorate$q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13012
13199
  var d,
@@ -28820,6 +29007,219 @@ class Tooltip extends AbstractComponent {
28820
29007
  }
28821
29008
  Tooltip.defaultAttributes = defaultAttributes;
28822
29009
 
29010
+ function loadTimelineComponent() {
29011
+ registerGroup();
29012
+ registerText();
29013
+ registerSymbol();
29014
+ registerLine();
29015
+ }
29016
+
29017
+ loadTimelineComponent();
29018
+ class Timeline extends AbstractComponent {
29019
+ constructor(attributes, options) {
29020
+ super((options === null || options === void 0 ? void 0 : options.skipDefault) ? attributes : merge({}, Timeline.defaultAttributes, attributes));
29021
+ this.name = 'timeline';
29022
+ }
29023
+ render() {
29024
+ const { width, lineStyle, activeLineStyle, symbolStyle, activeSymbolStyle, labelStyle, activeLabelStyle, times, pointLayoutMode, labelSpace, clipRange, animation } = this.attribute;
29025
+ if (!(times && times.length)) {
29026
+ return;
29027
+ }
29028
+ const symbolHeight = (isArray(symbolStyle.size) ? symbolStyle.size[1] : symbolStyle.size) || 0;
29029
+ const activeSymbolHeight = (isArray(activeSymbolStyle.size) ? activeSymbolStyle.size[1] : activeSymbolStyle.size) || 0;
29030
+ const lineSymbolHeight = Math.max(lineStyle.lineWidth || 0, activeLineStyle.lineWidth || 0, symbolHeight, activeSymbolHeight);
29031
+ const lineY = lineSymbolHeight / 2;
29032
+ const lineAttr = {
29033
+ y: lineY,
29034
+ points: [
29035
+ { x: 0, y: 0 },
29036
+ { x: width, y: 0 }
29037
+ ]
29038
+ };
29039
+ this._line = this.createOrUpdateChild('line-axes', Object.assign(Object.assign({}, lineStyle), lineAttr), 'line');
29040
+ this._activeLine = this.createOrUpdateChild('active-line-axes', Object.assign(Object.assign(Object.assign({}, activeLineStyle), lineAttr), { clipRange }), 'line');
29041
+ const activeWidth = width * clipRange;
29042
+ const symbolGroup = this.createOrUpdateChild('symbol-group', {
29043
+ y: lineY
29044
+ }, 'group');
29045
+ const symbolSpace = times.length === 1
29046
+ ? width
29047
+ : pointLayoutMode === 'space-between'
29048
+ ? width / (times.length - 1)
29049
+ : width / times.length;
29050
+ const symbolStartX = pointLayoutMode === 'space-between' ? 0 : symbolSpace / 2;
29051
+ this._timesPercent = times.map((_, i) => (symbolStartX + symbolSpace * i) / width);
29052
+ times.forEach((item, i) => {
29053
+ const x = this._timesPercent[i] * width;
29054
+ symbolGroup.createOrUpdateChild(item.label, Object.assign(Object.assign({}, symbolStyle), { x }), 'symbol');
29055
+ });
29056
+ this._symbolGroup = symbolGroup;
29057
+ const labelY = lineSymbolHeight + labelSpace;
29058
+ const labelGroup = this.createOrUpdateChild('label-group', {
29059
+ y: labelY
29060
+ }, 'group');
29061
+ times.forEach((item, i) => {
29062
+ const x = this._timesPercent[i] * width;
29063
+ labelGroup.createOrUpdateChild(item.label, Object.assign(Object.assign({}, labelStyle), { x, text: item.label }), 'text');
29064
+ });
29065
+ this._labelGroup = labelGroup;
29066
+ const setActive = (group, activeStyle) => {
29067
+ group.forEachChildren((label) => {
29068
+ if (label.currentStates) {
29069
+ const currentStates = label.currentStates;
29070
+ label.clearStates();
29071
+ label.useStates(currentStates, false);
29072
+ }
29073
+ label.states = {
29074
+ active: activeStyle
29075
+ };
29076
+ if (label.attribute.x <= activeWidth) {
29077
+ label.useStates(['active'], animation);
29078
+ }
29079
+ });
29080
+ };
29081
+ setActive(labelGroup, activeLabelStyle);
29082
+ setActive(symbolGroup, activeSymbolStyle);
29083
+ }
29084
+ appearAnimate(animateConfig) {
29085
+ const { duration = 1000, easing = 'quadOut' } = animateConfig;
29086
+ const { activeLabelStyle, activeSymbolStyle } = this.attribute;
29087
+ const percent = duration / 1000;
29088
+ const lineDuration = percent * 500;
29089
+ const activeLineDuration = percent * 200;
29090
+ const perSymbolDuration = percent * 100;
29091
+ const perSymbolNormalDuration = percent * 90;
29092
+ const symbolDelay = percent * 100;
29093
+ const symbolNormalDelay = percent * 600;
29094
+ if (this._line) {
29095
+ this._line.setAttributes({ clipRange: 0 });
29096
+ this._line.animate().to({ clipRange: 1 }, lineDuration, easing);
29097
+ }
29098
+ if (this._activeLine) {
29099
+ this._activeLine.setAttributes({ opacity: 0 });
29100
+ this._activeLine
29101
+ .animate()
29102
+ .wait(500)
29103
+ .to({ opacity: 1 }, activeLineDuration, easing);
29104
+ }
29105
+ if (this._symbolGroup) {
29106
+ const size = this._symbolGroup.count - 1;
29107
+ const delay = percent * (size === 1 ? 0 : (500 - 100) / (size - 1));
29108
+ const delayNormal = percent * (size === 1 ? 0 : (400 - 160) / (size - 1));
29109
+ this._symbolGroup.forEachChildren((symbol, i) => {
29110
+ const originAttrs = Object.assign({}, symbol.attribute);
29111
+ symbol.setAttributes({ opacity: 0 });
29112
+ symbol
29113
+ .animate()
29114
+ .wait(symbolDelay + delay * i)
29115
+ .to({ opacity: 1 }, perSymbolDuration, easing);
29116
+ symbol
29117
+ .animate()
29118
+ .wait(symbolNormalDelay + delayNormal * i)
29119
+ .to(Object.assign({ scaleX: 1.8, scaleY: 1.8 }, activeSymbolStyle), perSymbolNormalDuration, easing)
29120
+ .to(Object.assign({ scaleX: 1, scaleY: 1 }, originAttrs), perSymbolNormalDuration, easing);
29121
+ });
29122
+ }
29123
+ if (this._labelGroup) {
29124
+ const size = this._labelGroup.count - 1;
29125
+ const delay = percent * (size === 1 ? 0 : (500 - 100) / (size - 1));
29126
+ const delayNormal = percent * (size === 1 ? 0 : (400 - 160) / (size - 1));
29127
+ this._labelGroup.forEachChildren((label, i) => {
29128
+ const originAttrs = Object.assign({}, label.attribute);
29129
+ label.setAttributes({ opacity: 0 });
29130
+ label
29131
+ .animate()
29132
+ .wait(symbolDelay + delay * i)
29133
+ .to({ opacity: 1 }, perSymbolDuration, easing);
29134
+ label
29135
+ .animate()
29136
+ .wait(symbolNormalDelay + delayNormal * i)
29137
+ .to(Object.assign({ dy: 10 }, activeLabelStyle), perSymbolNormalDuration, easing)
29138
+ .to(Object.assign({ dy: 0 }, originAttrs), perSymbolNormalDuration, easing);
29139
+ });
29140
+ }
29141
+ }
29142
+ goto(flag, animateConfig) {
29143
+ var _a;
29144
+ let { clipRange } = this.attribute;
29145
+ const { animation } = this.attribute;
29146
+ if (flag > 0) {
29147
+ if (clipRange >= 1) {
29148
+ return;
29149
+ }
29150
+ else if (clipRange < 0) {
29151
+ clipRange = 0;
29152
+ }
29153
+ }
29154
+ else {
29155
+ if (clipRange <= 0) {
29156
+ return;
29157
+ }
29158
+ else if (clipRange > 1) {
29159
+ clipRange = 1;
29160
+ }
29161
+ }
29162
+ if (clipRange !== this.attribute.clipRange) {
29163
+ this.setAttributes({ clipRange });
29164
+ }
29165
+ let i = 0;
29166
+ for (; i < this._timesPercent.length; i++) {
29167
+ if (clipRange < this._timesPercent[i]) {
29168
+ break;
29169
+ }
29170
+ }
29171
+ const nextClipRange = flag > 0 ? this._timesPercent[i] : this._timesPercent[i - 1] || 0;
29172
+ if (animation) {
29173
+ const { duration = 1000, easing = 'quadOut' } = animateConfig;
29174
+ const actDuration = (Math.abs(nextClipRange - clipRange) / (this._timesPercent[i] - ((_a = this._timesPercent[i - 1]) !== null && _a !== void 0 ? _a : 0))) * duration;
29175
+ this.animate().to({ clipRange: nextClipRange }, actDuration, easing);
29176
+ }
29177
+ else {
29178
+ this.setAttributes({ clipRange: nextClipRange });
29179
+ }
29180
+ }
29181
+ forward(animateConfig) {
29182
+ this.goto(1, animateConfig);
29183
+ }
29184
+ backward(animateConfig) {
29185
+ this.goto(-1, animateConfig);
29186
+ }
29187
+ }
29188
+ Timeline.defaultAttributes = {
29189
+ labelSpace: 10,
29190
+ pointLayoutMode: 'space-around',
29191
+ animation: true,
29192
+ symbolStyle: {
29193
+ fill: 'black',
29194
+ size: 12,
29195
+ symbolType: 'circle'
29196
+ },
29197
+ activeSymbolStyle: {
29198
+ fill: 'orange'
29199
+ },
29200
+ lineStyle: {
29201
+ lineDash: [2, 2],
29202
+ lineCap: 'butt',
29203
+ stroke: 'black',
29204
+ lineWidth: 2
29205
+ },
29206
+ activeLineStyle: {
29207
+ stroke: 'orange',
29208
+ lineWidth: 4
29209
+ },
29210
+ labelStyle: {
29211
+ fontSize: 12,
29212
+ fill: 'black',
29213
+ textAlign: 'center',
29214
+ textBaseline: 'top'
29215
+ },
29216
+ activeLabelStyle: {
29217
+ fontSize: 14,
29218
+ fill: 'orange'
29219
+ },
29220
+ clipRange: 0
29221
+ };
29222
+
28823
29223
  function VTag(params) {
28824
29224
  return new Tag(params ? params.attribute : {});
28825
29225
  }
@@ -29175,6 +29575,6 @@ EmptyTip.defaultAttributes = {
29175
29575
  }
29176
29576
  };
29177
29577
 
29178
- const version = "0.19.19";
29578
+ const version = "0.19.20-alpha.3";
29179
29579
 
29180
- export { AXIS_ELEMENT_NAME, AbstractComponent, ArcInfo, ArcLabel, ArcSegment, AreaLabel, 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, GroupFadeIn, GroupFadeOut, GroupTransition, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Indicator, LEGEND_ELEMENT_NAME, LabelBase, LegendEvent, LegendStateValue, LineAxis, LineAxisGrid, LineCrosshair, LineDataLabel, LineLabel, LinkPath, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Pager, PlayerEventEnum, PolygonCrosshair, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SizeContinuousLegend, Slider, SymbolLabel, Tag, Title, Tooltip, VTag, alignTextInLine, angle, angleLabelOrientAttribute, angleTo, clampRadian, contrastAccessibilityChecker, convertDomainToTickData, createTextGraphicByType, deltaXYToAngle, direction, fuzzyEqualNumber, getCircleLabelPosition, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getPolarAngleLabelPosition, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextType, getVerticalCoord, getVerticalPath, htmlAttributeTransform, initTextMeasure, isInRange, isPostiveXAxis, isRichText, isVisible, labelSmartInvert, length, loadPoptip, measureTextSize, normalize, reactAttributeTransform, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, removeRepeatPoint, richTextAttributeTransform, scale, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, ticks, traverseGroup, version };
29580
+ export { AXIS_ELEMENT_NAME, AbstractComponent, ArcInfo, ArcLabel, ArcSegment, AreaLabel, 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, GroupFadeIn, GroupFadeOut, GroupTransition, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Indicator, LEGEND_ELEMENT_NAME, LabelBase, LegendEvent, LegendStateValue, LineAxis, LineAxisGrid, LineCrosshair, LineDataLabel, LineLabel, LinkPath, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Pager, PlayerEventEnum, PolygonCrosshair, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SizeContinuousLegend, Slider, SymbolLabel, Tag, Timeline, Title, Tooltip, VTag, alignTextInLine, angle, angleLabelOrientAttribute, angleTo, clampRadian, contrastAccessibilityChecker, convertDomainToTickData, createTextGraphicByType, deltaXYToAngle, direction, fuzzyEqualNumber, getCircleLabelPosition, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getPolarAngleLabelPosition, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextType, getVerticalCoord, getVerticalPath, htmlAttributeTransform, initTextMeasure, isInRange, isPostiveXAxis, isRichText, isVisible, labelSmartInvert, length, loadPoptip, measureTextSize, normalize, reactAttributeTransform, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, removeRepeatPoint, richTextAttributeTransform, scale, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, ticks, traverseGroup, version };