@visactor/vrender-components 0.20.0-alpha.0 → 0.20.0-alpha.1

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.
Files changed (72) hide show
  1. package/cjs/axis/animate/index.d.ts +0 -1
  2. package/cjs/axis/animate/index.js +1 -1
  3. package/cjs/axis/animate/index.js.map +1 -1
  4. package/cjs/axis/grid/base.d.ts +4 -0
  5. package/cjs/axis/grid/base.js +19 -0
  6. package/cjs/axis/grid/base.js.map +1 -1
  7. package/cjs/axis/grid/circle.js +3 -16
  8. package/cjs/axis/grid/circle.js.map +1 -1
  9. package/cjs/axis/grid/line.js +3 -17
  10. package/cjs/axis/grid/line.js.map +1 -1
  11. package/cjs/brush/brush.js +1 -2
  12. package/cjs/brush/type.js +2 -1
  13. package/cjs/index.d.ts +1 -1
  14. package/cjs/index.js +1 -1
  15. package/cjs/index.js.map +1 -1
  16. package/cjs/label/arc.js +7 -1
  17. package/cjs/label/arc.js.map +1 -1
  18. package/cjs/label/base.d.ts +1 -1
  19. package/cjs/label/base.js +26 -10
  20. package/cjs/label/base.js.map +1 -1
  21. package/cjs/label/type.d.ts +1 -0
  22. package/cjs/label/type.js.map +1 -1
  23. package/cjs/legend/discrete/discrete.js +6 -4
  24. package/cjs/legend/discrete/discrete.js.map +1 -1
  25. package/cjs/player/base-player.js +3 -22
  26. package/cjs/player/base-player.js.map +1 -1
  27. package/cjs/poptip/poptip-plugin.d.ts +10 -11
  28. package/cjs/poptip/poptip-plugin.js +32 -27
  29. package/cjs/poptip/poptip-plugin.js.map +1 -1
  30. package/cjs/tooltip/tooltip.d.ts +1 -1
  31. package/cjs/tooltip/tooltip.js +4 -4
  32. package/cjs/tooltip/tooltip.js.map +1 -1
  33. package/dist/index.es.js +591 -1058
  34. package/es/axis/animate/index.d.ts +0 -1
  35. package/es/axis/animate/index.js +0 -2
  36. package/es/axis/animate/index.js.map +1 -1
  37. package/es/axis/grid/base.d.ts +4 -0
  38. package/es/axis/grid/base.js +19 -0
  39. package/es/axis/grid/base.js.map +1 -1
  40. package/es/axis/grid/circle.js +3 -16
  41. package/es/axis/grid/circle.js.map +1 -1
  42. package/es/axis/grid/line.js +3 -17
  43. package/es/axis/grid/line.js.map +1 -1
  44. package/es/brush/brush.js +1 -2
  45. package/es/brush/type.js +2 -1
  46. package/es/index.d.ts +1 -1
  47. package/es/index.js +1 -1
  48. package/es/index.js.map +1 -1
  49. package/es/label/arc.js +7 -1
  50. package/es/label/arc.js.map +1 -1
  51. package/es/label/base.d.ts +1 -1
  52. package/es/label/base.js +26 -10
  53. package/es/label/base.js.map +1 -1
  54. package/es/label/type.d.ts +1 -0
  55. package/es/label/type.js.map +1 -1
  56. package/es/legend/discrete/discrete.js +6 -4
  57. package/es/legend/discrete/discrete.js.map +1 -1
  58. package/es/player/base-player.js +2 -22
  59. package/es/player/base-player.js.map +1 -1
  60. package/es/poptip/poptip-plugin.d.ts +10 -11
  61. package/es/poptip/poptip-plugin.js +28 -26
  62. package/es/poptip/poptip-plugin.js.map +1 -1
  63. package/es/tooltip/tooltip.d.ts +1 -1
  64. package/es/tooltip/tooltip.js +4 -4
  65. package/es/tooltip/tooltip.js.map +1 -1
  66. package/package.json +6 -6
  67. package/cjs/axis/animate/group-fade.d.ts +0 -18
  68. package/cjs/axis/animate/group-fade.js +0 -72
  69. package/cjs/axis/animate/group-fade.js.map +0 -1
  70. package/es/axis/animate/group-fade.d.ts +0 -18
  71. package/es/axis/animate/group-fade.js +0 -62
  72. package/es/axis/animate/group-fade.js.map +0 -1
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, transformBoundsWithMatrix, arrayEqual, Bounds, getRectIntersect, isRectIntersect, clampAngleByRadian, asin, isPlainObject, merge, clamp, clampRange, normalizePadding, debounce, throttle, hexToRgb, crossProduct, 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, 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, transformBoundsWithMatrix, arrayEqual, Bounds, getRectIntersect, isRectIntersect, getContextFont, clampAngleByRadian, asin, isPlainObject, merge, clamp, clampRange, normalizePadding, debounce, throttle, hexToRgb, crossProduct, 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 {
@@ -779,7 +779,7 @@ class SyncHook extends Hook {
779
779
  const EnvContribution = Symbol.for("EnvContribution");
780
780
  const VGlobal = Symbol.for("VGlobal");
781
781
 
782
- var __decorate$S = undefined && undefined.__decorate || function (decorators, target, key, desc) {
782
+ var __decorate$R = undefined && undefined.__decorate || function (decorators, target, key, desc) {
783
783
  var d,
784
784
  c = arguments.length,
785
785
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -949,7 +949,7 @@ let DefaultGlobal = class {
949
949
  return this._env || this.setEnv("browser"), this.envContribution.getElementTopLeft(dom, baseWindow);
950
950
  }
951
951
  };
952
- DefaultGlobal = __decorate$S([injectable(), __param$z(0, inject(ContributionProvider)), __param$z(0, named(EnvContribution)), __metadata$G("design:paramtypes", [Object])], DefaultGlobal);
952
+ DefaultGlobal = __decorate$R([injectable(), __param$z(0, inject(ContributionProvider)), __param$z(0, named(EnvContribution)), __metadata$G("design:paramtypes", [Object])], DefaultGlobal);
953
953
 
954
954
  const circleThreshold = tau - 1e-8;
955
955
  class BoundsContext {
@@ -1844,7 +1844,7 @@ class CustomPath2D extends CurvePath {
1844
1844
  controlX = 0,
1845
1845
  controlY = 0;
1846
1846
  for (let i = 0, len = commandStrList.length; i < len; ++i) {
1847
- switch (current = commandStrList[i], 1 === sX && 1 === sY || (current = scale$2(current, sX, sY)), current[0]) {
1847
+ switch (current = commandStrList[i], 1 === sX && 1 === sY || (current = scale$1(current, sX, sY)), current[0]) {
1848
1848
  case "l":
1849
1849
  x += current[1], y += current[2], this.lineTo(x + l, y + t);
1850
1850
  break;
@@ -1988,7 +1988,7 @@ class CustomPath2D extends CurvePath {
1988
1988
  }
1989
1989
  }
1990
1990
  const temp = ["l", 0, 0, 0, 0, 0, 0, 0];
1991
- function scale$2(current, sX, sY) {
1991
+ function scale$1(current, sX, sY) {
1992
1992
  const c = temp[0] = current[0];
1993
1993
  if ("a" === c || "A" === c) temp[1] = sX * current[1], temp[2] = sY * current[2], temp[3] = current[3], temp[4] = current[4], temp[5] = current[5], temp[6] = sX * current[6], temp[7] = sY * current[7];else if ("h" === c || "H" === c) temp[1] = sX * current[1];else if ("v" === c || "V" === c) temp[1] = sY * current[1];else for (let i = 1, n = current.length; i < n; ++i) temp[i] = (i % 2 == 1 ? sX : sY) * current[i];
1994
1994
  return temp;
@@ -2216,6 +2216,7 @@ const DefaultTextAttribute = Object.assign(Object.assign(Object.assign({}, Defau
2216
2216
  keepDirIn3d: !0
2217
2217
  });
2218
2218
  const DefaultRichTextAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultTextStyle), {
2219
+ editable: !1,
2219
2220
  width: 300,
2220
2221
  height: 300,
2221
2222
  ellipsis: !0,
@@ -2297,14 +2298,7 @@ const defaultFormatting = {
2297
2298
  const regLetter = /\w|\(|\)|-/;
2298
2299
  const regPunctuation = /[.?!,;:/,。?!、;:]/;
2299
2300
  const regFirstSpace = /\S/;
2300
- function applyFillStyle(ctx, character) {
2301
- const fillStyle = character && character.fill || defaultFormatting.fill;
2302
- if (!fillStyle) return void (ctx.globalAlpha = 0);
2303
- const {
2304
- fillOpacity = 1,
2305
- opacity = 1
2306
- } = character;
2307
- ctx.globalAlpha = fillOpacity * opacity, ctx.fillStyle = fillStyle;
2301
+ const setTextStyle = (ctx, character) => {
2308
2302
  let fontSize = character.fontSize || 16;
2309
2303
  switch (character.script) {
2310
2304
  case "super":
@@ -2319,6 +2313,15 @@ function applyFillStyle(ctx, character) {
2319
2313
  fontSize: fontSize,
2320
2314
  fontFamily: character.fontFamily || "sans-serif"
2321
2315
  });
2316
+ };
2317
+ function applyFillStyle(ctx, character) {
2318
+ const fillStyle = character && character.fill || defaultFormatting.fill;
2319
+ if (!fillStyle) return void (ctx.globalAlpha = 0);
2320
+ const {
2321
+ fillOpacity = 1,
2322
+ opacity = 1
2323
+ } = character;
2324
+ ctx.globalAlpha = fillOpacity * opacity, ctx.fillStyle = fillStyle, setTextStyle(ctx, character);
2322
2325
  }
2323
2326
  function applyStrokeStyle(ctx, character) {
2324
2327
  const strokeStyle = character && character.stroke || defaultFormatting.stroke;
@@ -2327,21 +2330,7 @@ function applyStrokeStyle(ctx, character) {
2327
2330
  strokeOpacity = 1,
2328
2331
  opacity = 1
2329
2332
  } = character;
2330
- ctx.globalAlpha = strokeOpacity * opacity, ctx.lineWidth = character && "number" == typeof character.lineWidth ? character.lineWidth : 1, ctx.strokeStyle = strokeStyle;
2331
- let fontSize = character.fontSize || 16;
2332
- switch (character.script) {
2333
- case "super":
2334
- case "sub":
2335
- fontSize *= .8;
2336
- }
2337
- ctx.setTextStyle({
2338
- textAlign: "left",
2339
- textBaseline: character.textBaseline || "alphabetic",
2340
- fontStyle: character.fontStyle || "",
2341
- fontWeight: character.fontWeight || "",
2342
- fontSize: fontSize,
2343
- fontFamily: character.fontFamily || "sans-serif"
2344
- });
2333
+ ctx.globalAlpha = strokeOpacity * opacity, ctx.lineWidth = character && "number" == typeof character.lineWidth ? character.lineWidth : 1, ctx.strokeStyle = strokeStyle, setTextStyle(ctx, character);
2345
2334
  }
2346
2335
  function getStrByWithCanvas(desc, width, character, guessIndex, needTestLetter) {
2347
2336
  if (!width || width <= 0) return 0;
@@ -2380,7 +2369,7 @@ function measureTextCanvas(text, character) {
2380
2369
  return "number" != typeof measurement.actualBoundingBoxAscent || "number" != typeof measurement.actualBoundingBoxDescent ? (result.width = Math.floor(measurement.width), result.height = character.fontSize || 0, result.ascent = result.height, result.descent = 0) : (result.width = Math.floor(measurement.width), result.height = Math.floor(measurement.actualBoundingBoxAscent + measurement.actualBoundingBoxDescent), result.ascent = Math.floor(measurement.actualBoundingBoxAscent), result.descent = result.height - result.ascent), result;
2381
2370
  }
2382
2371
 
2383
- var __decorate$R = undefined && undefined.__decorate || function (decorators, target, key, desc) {
2372
+ var __decorate$Q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
2384
2373
  var d,
2385
2374
  c = arguments.length,
2386
2375
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -2654,9 +2643,9 @@ let ATextMeasure = class {
2654
2643
  return data.str = data.result, data.width += suffixWidth, data;
2655
2644
  }
2656
2645
  };
2657
- ATextMeasure = __decorate$R([injectable()], ATextMeasure);
2646
+ ATextMeasure = __decorate$Q([injectable()], ATextMeasure);
2658
2647
 
2659
- var __decorate$Q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
2648
+ var __decorate$P = undefined && undefined.__decorate || function (decorators, target, key, desc) {
2660
2649
  var d,
2661
2650
  c = arguments.length,
2662
2651
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -2665,7 +2654,7 @@ var __decorate$Q = undefined && undefined.__decorate || function (decorators, ta
2665
2654
  };
2666
2655
  const TextMeasureContribution = Symbol.for("TextMeasureContribution");
2667
2656
  let DefaultTextMeasureContribution = class extends ATextMeasure {};
2668
- DefaultTextMeasureContribution = __decorate$Q([injectable()], DefaultTextMeasureContribution);
2657
+ DefaultTextMeasureContribution = __decorate$P([injectable()], DefaultTextMeasureContribution);
2669
2658
 
2670
2659
  const container = new Container();
2671
2660
 
@@ -2726,7 +2715,7 @@ class DefaultCanvasAllocate {
2726
2715
  }
2727
2716
  const canvasAllocate = new DefaultCanvasAllocate();
2728
2717
 
2729
- var __decorate$P = undefined && undefined.__decorate || function (decorators, target, key, desc) {
2718
+ var __decorate$O = undefined && undefined.__decorate || function (decorators, target, key, desc) {
2730
2719
  var d,
2731
2720
  c = arguments.length,
2732
2721
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -2870,9 +2859,9 @@ let DefaultWindow = class {
2870
2859
  return this._handler.getTopLeft(baseWindow);
2871
2860
  }
2872
2861
  };
2873
- DefaultWindow = __decorate$P([injectable(), __metadata$F("design:paramtypes", [])], DefaultWindow);
2862
+ DefaultWindow = __decorate$O([injectable(), __metadata$F("design:paramtypes", [])], DefaultWindow);
2874
2863
 
2875
- var __decorate$O = undefined && undefined.__decorate || function (decorators, target, key, desc) {
2864
+ var __decorate$N = undefined && undefined.__decorate || function (decorators, target, key, desc) {
2876
2865
  var d,
2877
2866
  c = arguments.length,
2878
2867
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -2977,7 +2966,7 @@ let DefaultGraphicUtil = class {
2977
2966
  return c.nativeCanvas ? c.nativeCanvas : null;
2978
2967
  }
2979
2968
  };
2980
- DefaultGraphicUtil = __decorate$O([injectable(), __param$y(0, inject(ContributionProvider)), __param$y(0, named(TextMeasureContribution)), __metadata$E("design:paramtypes", [Object])], DefaultGraphicUtil);
2969
+ DefaultGraphicUtil = __decorate$N([injectable(), __param$y(0, inject(ContributionProvider)), __param$y(0, named(TextMeasureContribution)), __metadata$E("design:paramtypes", [Object])], DefaultGraphicUtil);
2981
2970
  var TransformMode;
2982
2971
  !function (TransformMode) {
2983
2972
  TransformMode[TransformMode.transform = 0] = "transform", TransformMode[TransformMode.matrix = 1] = "matrix";
@@ -3035,7 +3024,7 @@ let DefaultTransformUtil = class {
3035
3024
  return this;
3036
3025
  }
3037
3026
  };
3038
- DefaultTransformUtil = __decorate$O([injectable(), __metadata$E("design:paramtypes", [])], DefaultTransformUtil);
3027
+ DefaultTransformUtil = __decorate$N([injectable(), __metadata$E("design:paramtypes", [])], DefaultTransformUtil);
3039
3028
 
3040
3029
  const defaultThemeObj = {
3041
3030
  arc: DefaultArcAttribute,
@@ -3727,7 +3716,9 @@ class ACustomAnimate {
3727
3716
  onFirstRun() {}
3728
3717
  onStart() {}
3729
3718
  onEnd() {}
3730
- getEndProps() {}
3719
+ getEndProps() {
3720
+ return this.to;
3721
+ }
3731
3722
  getFromProps() {
3732
3723
  return this.from;
3733
3724
  }
@@ -3792,7 +3783,7 @@ class Animate {
3792
3783
  const stage = this.target.stage;
3793
3784
  stage && stage.renderNextFrame();
3794
3785
  }
3795
- return 1 === this.subAnimates.length && this.tailAnimate.duration === customAnimate.duration && this.trySetAttribute(customAnimate.getFromProps(), customAnimate.mode), this;
3786
+ return 1 === this.subAnimates.length && this.tailAnimate.totalDuration === customAnimate.duration && this.trySetAttribute(customAnimate.getFromProps(), customAnimate.mode), this;
3796
3787
  }
3797
3788
  trySetAttribute(attr) {
3798
3789
  let mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Animate.mode;
@@ -5692,7 +5683,7 @@ const DynamicLayerHandlerContribution = Symbol.for("DynamicLayerHandlerContribut
5692
5683
  const VirtualLayerHandlerContribution = Symbol.for("VirtualLayerHandlerContribution");
5693
5684
 
5694
5685
  var DefaultLayerService_1,
5695
- __decorate$N = undefined && undefined.__decorate || function (decorators, target, key, desc) {
5686
+ __decorate$M = undefined && undefined.__decorate || function (decorators, target, key, desc) {
5696
5687
  var d,
5697
5688
  c = arguments.length,
5698
5689
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -5763,7 +5754,7 @@ let DefaultLayerService = DefaultLayerService_1 = class {
5763
5754
  this.layerMap.delete(stage);
5764
5755
  }
5765
5756
  };
5766
- DefaultLayerService.idprefix = "visactor_layer", DefaultLayerService.prefix_count = 0, DefaultLayerService = DefaultLayerService_1 = __decorate$N([injectable(), __metadata$D("design:paramtypes", [])], DefaultLayerService);
5757
+ DefaultLayerService.idprefix = "visactor_layer", DefaultLayerService.prefix_count = 0, DefaultLayerService = DefaultLayerService_1 = __decorate$M([injectable(), __metadata$D("design:paramtypes", [])], DefaultLayerService);
5767
5758
 
5768
5759
  var coreModule = new ContainerModule(bind => {
5769
5760
  bind(VGlobal).to(DefaultGlobal).inSingletonScope(), bind(VWindow).to(DefaultWindow), bind(GraphicUtil).to(DefaultGraphicUtil).inSingletonScope(), bind(TransformUtil).to(DefaultTransformUtil).inSingletonScope(), bind(LayerService).to(DefaultLayerService).inSingletonScope();
@@ -5864,11 +5855,7 @@ function drawArcPath(arc, context, cx, cy, outerRadius, innerRadius, partStroke)
5864
5855
  deltaAngle = abs(endAngle - startAngle),
5865
5856
  clockwise = endAngle > startAngle;
5866
5857
  let collapsedToLine = !1;
5867
- if (outerRadius < innerRadius) {
5868
- const temp = outerRadius;
5869
- outerRadius = innerRadius, innerRadius = temp;
5870
- }
5871
- 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 {
5858
+ if (outerRadius < innerRadius && ([innerRadius, outerRadius] = [outerRadius, innerRadius]), 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 {
5872
5859
  const cornerRadius = arc.getParsedCornerRadius(),
5873
5860
  {
5874
5861
  outerDeltaAngle: outerDeltaAngle,
@@ -5956,19 +5943,6 @@ const SymbolRenderContribution = Symbol.for("SymbolRenderContribution");
5956
5943
  const TextRenderContribution = Symbol.for("TextRenderContribution");
5957
5944
  const InteractiveSubRenderContribution = Symbol.for("InteractiveSubRenderContribution");
5958
5945
 
5959
- function getContextFont(text) {
5960
- let defaultAttr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
5961
- let fontSizeScale = arguments.length > 2 ? arguments[2] : undefined;
5962
- fontSizeScale || (fontSizeScale = 1);
5963
- const {
5964
- fontStyle = defaultAttr.fontStyle,
5965
- fontVariant = defaultAttr.fontVariant,
5966
- fontWeight = defaultAttr.fontWeight,
5967
- fontSize = defaultAttr.fontSize,
5968
- fontFamily = defaultAttr.fontFamily
5969
- } = text;
5970
- return (fontStyle ? fontStyle + " " : "") + (fontVariant ? fontVariant + " " : "") + (fontWeight ? fontWeight + " " : "") + fontSize * fontSizeScale + "px " + (fontFamily || "sans-serif");
5971
- }
5972
5946
  function textDrawOffsetY(baseline, h) {
5973
5947
  return "top" === baseline ? Math.ceil(.79 * h) : "middle" === baseline ? Math.round(.3 * h) : "bottom" === baseline ? Math.round(-.21 * h) : 0;
5974
5948
  }
@@ -6017,80 +5991,7 @@ class DefaultSymbolOuterBorderBoundsContribution extends DefaultOuterBorderBound
6017
5991
  }
6018
5992
  }
6019
5993
 
6020
- function createMat4() {
6021
- return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
6022
- }
6023
- class DefaultMatrixAllocate {
6024
- constructor() {
6025
- this.pools = [];
6026
- }
6027
- allocate(a, b, c, d, e, f) {
6028
- if (!this.pools.length) return new Matrix(a, b, c, d, e, f);
6029
- const m = this.pools.pop();
6030
- return m.a = a, m.b = b, m.c = c, m.d = d, m.e = e, m.f = f, m;
6031
- }
6032
- allocateByObj(matrix) {
6033
- if (!this.pools.length) return new Matrix(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f);
6034
- const m = this.pools.pop();
6035
- return m.a = matrix.a, m.b = matrix.b, m.c = matrix.c, m.d = matrix.d, m.e = matrix.e, m.f = matrix.f, m;
6036
- }
6037
- free(d) {
6038
- this.pools.push(d);
6039
- }
6040
- get length() {
6041
- return this.pools.length;
6042
- }
6043
- release() {
6044
- this.pools = [];
6045
- }
6046
- }
6047
- class DefaultMat4Allocate {
6048
- constructor() {
6049
- this.pools = [];
6050
- }
6051
- static identity(out) {
6052
- return out[0] = 1, out[1] = 0, out[2] = 0, out[3] = 0, out[4] = 0, out[5] = 1, out[6] = 0, out[7] = 0, out[8] = 0, out[9] = 0, out[10] = 1, out[11] = 0, out[12] = 0, out[13] = 0, out[14] = 0, out[15] = 1, out;
6053
- }
6054
- allocate() {
6055
- if (!this.pools.length) return createMat4();
6056
- const m = this.pools.pop();
6057
- return DefaultMat4Allocate.identity(m), m;
6058
- }
6059
- allocateByObj(d) {
6060
- let m;
6061
- m = this.pools.length ? this.pools.pop() : createMat4();
6062
- for (let i = 0; i < m.length; i++) m[i] = d[i];
6063
- return m;
6064
- }
6065
- free(m) {
6066
- m && this.pools.push(m);
6067
- }
6068
- get length() {
6069
- return this.pools.length;
6070
- }
6071
- release() {
6072
- this.pools = [];
6073
- }
6074
- }
6075
- const matrixAllocate = new DefaultMatrixAllocate();
6076
- const mat4Allocate = new DefaultMat4Allocate();
6077
-
6078
- var __decorate$M = undefined && undefined.__decorate || function (decorators, target, key, desc) {
6079
- var d,
6080
- c = arguments.length,
6081
- r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
6082
- 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);
6083
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6084
- },
6085
- __metadata$C = undefined && undefined.__metadata || function (k, v) {
6086
- if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
6087
- },
6088
- __param$x = undefined && undefined.__param || function (paramIndex, decorator) {
6089
- return function (target, key) {
6090
- decorator(target, key, paramIndex);
6091
- };
6092
- };
6093
- function identity(out) {
5994
+ function identityMat4(out) {
6094
5995
  return out[0] = 1, out[1] = 0, out[2] = 0, out[3] = 0, out[4] = 0, out[5] = 1, out[6] = 0, out[7] = 0, out[8] = 0, out[9] = 0, out[10] = 1, out[11] = 0, out[12] = 0, out[13] = 0, out[14] = 0, out[15] = 1, out;
6095
5996
  }
6096
5997
  function rotateX(out, a, rad) {
@@ -6142,7 +6043,7 @@ function translate(out, a, v) {
6142
6043
  function mat3Tomat4(out, b) {
6143
6044
  out[0] = b.a, out[1] = b.b, out[2] = 0, out[3] = 0, out[4] = b.c, out[5] = b.d, out[6] = 0, out[7] = 0, out[8] = 0, out[9] = 0, out[10] = 1, out[11] = 0, out[12] = b.e, out[13] = b.f, out[14] = 0, out[15] = 1;
6144
6045
  }
6145
- function scale$1(out, a, v) {
6046
+ function scaleMat4(out, a, v) {
6146
6047
  const x = v[0],
6147
6048
  y = v[1],
6148
6049
  z = v[2];
@@ -6171,6 +6072,80 @@ function multiplyMat4Mat4(out, a, b) {
6171
6072
  b3 = b[3];
6172
6073
  return out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30, out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31, out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32, out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33, b0 = b[4], b1 = b[5], b2 = b[6], b3 = b[7], out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30, out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31, out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32, out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33, b0 = b[8], b1 = b[9], b2 = b[10], b3 = b[11], out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30, out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31, out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32, out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33, b0 = b[12], b1 = b[13], b2 = b[14], b3 = b[15], out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30, out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31, out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32, out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33, out;
6173
6074
  }
6075
+
6076
+ function createMat4() {
6077
+ return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
6078
+ }
6079
+ class DefaultMatrixAllocate {
6080
+ constructor() {
6081
+ this.pools = [];
6082
+ }
6083
+ allocate(a, b, c, d, e, f) {
6084
+ if (!this.pools.length) return new Matrix(a, b, c, d, e, f);
6085
+ const m = this.pools.pop();
6086
+ return m.a = a, m.b = b, m.c = c, m.d = d, m.e = e, m.f = f, m;
6087
+ }
6088
+ allocateByObj(matrix) {
6089
+ if (!this.pools.length) return new Matrix(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f);
6090
+ const m = this.pools.pop();
6091
+ return m.a = matrix.a, m.b = matrix.b, m.c = matrix.c, m.d = matrix.d, m.e = matrix.e, m.f = matrix.f, m;
6092
+ }
6093
+ free(d) {
6094
+ this.pools.push(d);
6095
+ }
6096
+ get length() {
6097
+ return this.pools.length;
6098
+ }
6099
+ release() {
6100
+ this.pools = [];
6101
+ }
6102
+ }
6103
+ class DefaultMat4Allocate {
6104
+ constructor() {
6105
+ this.pools = [];
6106
+ }
6107
+ static identity(out) {
6108
+ return identityMat4(out);
6109
+ }
6110
+ allocate() {
6111
+ if (!this.pools.length) return createMat4();
6112
+ const m = this.pools.pop();
6113
+ return DefaultMat4Allocate.identity(m), m;
6114
+ }
6115
+ allocateByObj(d) {
6116
+ let m;
6117
+ m = this.pools.length ? this.pools.pop() : createMat4();
6118
+ for (let i = 0; i < m.length; i++) m[i] = d[i];
6119
+ return m;
6120
+ }
6121
+ free(m) {
6122
+ m && this.pools.push(m);
6123
+ }
6124
+ get length() {
6125
+ return this.pools.length;
6126
+ }
6127
+ release() {
6128
+ this.pools = [];
6129
+ }
6130
+ }
6131
+ const matrixAllocate = new DefaultMatrixAllocate();
6132
+ const mat4Allocate = new DefaultMat4Allocate();
6133
+
6134
+ var __decorate$L = undefined && undefined.__decorate || function (decorators, target, key, desc) {
6135
+ var d,
6136
+ c = arguments.length,
6137
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
6138
+ 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);
6139
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6140
+ },
6141
+ __metadata$C = undefined && undefined.__metadata || function (k, v) {
6142
+ if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
6143
+ },
6144
+ __param$x = undefined && undefined.__param || function (paramIndex, decorator) {
6145
+ return function (target, key) {
6146
+ decorator(target, key, paramIndex);
6147
+ };
6148
+ };
6174
6149
  function getModelMatrix(out, graphic, theme) {
6175
6150
  var _a;
6176
6151
  const {
@@ -6203,7 +6178,7 @@ function getModelMatrix(out, graphic, theme) {
6203
6178
  } else _anchor[1] = anchor3d[1];
6204
6179
  _anchor[2] = null !== (_a = anchor3d[2]) && void 0 !== _a ? _a : 0;
6205
6180
  }
6206
- if (identity(out), translate(out, out, [x + dx, y + dy, z + dz]), translate(out, out, [_anchor[0], _anchor[1], _anchor[2]]), rotateX(out, out, beta), rotateY(out, out, alpha), translate(out, out, [-_anchor[0], -_anchor[1], _anchor[2]]), scale$1(out, out, [scaleX, scaleY, scaleZ]), angle) {
6181
+ if (identityMat4(out), translate(out, out, [x + dx, y + dy, z + dz]), translate(out, out, [_anchor[0], _anchor[1], _anchor[2]]), rotateX(out, out, beta), rotateY(out, out, alpha), translate(out, out, [-_anchor[0], -_anchor[1], _anchor[2]]), scaleMat4(out, out, [scaleX, scaleY, scaleZ]), angle) {
6207
6182
  const m = mat4Allocate.allocate(),
6208
6183
  _anchor = [0, 0];
6209
6184
  if (anchor) {
@@ -6284,7 +6259,7 @@ let DefaultGraphicService = class {
6284
6259
  x: x,
6285
6260
  y: y
6286
6261
  } = attribute;
6287
- width = null != width ? width : x1 - x, height = null != height ? height : y1 - y, aabbBounds.set(0, 0, width || 0, height || 0);
6262
+ width = null != width ? width : x1 - x, height = null != height ? height : y1 - y, (isFinite(width) || isFinite(height) || isFinite(x) || isFinite(y)) && aabbBounds.set(0, 0, width || 0, height || 0);
6288
6263
  }
6289
6264
  const tb1 = this.tempAABBBounds1,
6290
6265
  tb2 = this.tempAABBBounds2;
@@ -6299,7 +6274,8 @@ let DefaultGraphicService = class {
6299
6274
  width: width,
6300
6275
  height: height,
6301
6276
  path: path,
6302
- clip = groupTheme.clip
6277
+ clip = groupTheme.clip,
6278
+ display: display
6303
6279
  } = attribute;
6304
6280
  path && path.length ? path.forEach(g => {
6305
6281
  aabbBounds.union(g.AABBBounds);
@@ -6478,21 +6454,23 @@ let DefaultGraphicService = class {
6478
6454
  }
6479
6455
  updateLineAABBBoundsByPoints(attribute, lineTheme, aabbBounds, graphic) {
6480
6456
  const {
6481
- points = lineTheme.points
6457
+ points = lineTheme.points,
6458
+ connectedType: connectedType
6482
6459
  } = attribute,
6483
6460
  b = aabbBounds;
6484
6461
  return points.forEach(p => {
6485
- b.add(p.x, p.y);
6462
+ !1 === p.defined && "zero" !== connectedType || b.add(p.x, p.y);
6486
6463
  }), b;
6487
6464
  }
6488
6465
  updateLineAABBBoundsBySegments(attribute, lineTheme, aabbBounds, graphic) {
6489
6466
  const {
6490
- segments = lineTheme.segments
6467
+ segments = lineTheme.segments,
6468
+ connectedType: connectedType
6491
6469
  } = attribute,
6492
6470
  b = aabbBounds;
6493
6471
  return segments.forEach(s => {
6494
6472
  s.points.forEach(p => {
6495
- b.add(p.x, p.y);
6473
+ !1 === p.defined && "zero" !== connectedType || b.add(p.x, p.y);
6496
6474
  });
6497
6475
  }), b;
6498
6476
  }
@@ -6691,7 +6669,7 @@ let DefaultGraphicService = class {
6691
6669
  return !!visible || (aabbBounds.clear(), !1);
6692
6670
  }
6693
6671
  };
6694
- DefaultGraphicService = __decorate$M([injectable(), __param$x(0, inject(GraphicCreator$1)), __metadata$C("design:paramtypes", [Object])], DefaultGraphicService);
6672
+ DefaultGraphicService = __decorate$L([injectable(), __param$x(0, inject(GraphicCreator$1)), __metadata$C("design:paramtypes", [Object])], DefaultGraphicService);
6695
6673
 
6696
6674
  const result = {
6697
6675
  x: 0,
@@ -7071,83 +7049,53 @@ function getScaledStroke(context, width, dpr) {
7071
7049
  scaleY = Math.sign(d) * Math.sqrt(c * c + d * d);
7072
7050
  return scaleX + scaleY === 0 ? 0 : (strokeWidth = strokeWidth / Math.abs(scaleX + scaleY) * 2 * dpr, strokeWidth);
7073
7051
  }
7074
- function createColor(context, c, params, offsetX, offsetY) {
7052
+ function createColor(context, c, params) {
7053
+ let offsetX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
7054
+ let offsetY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
7075
7055
  if (!c || !0 === c) return "black";
7076
7056
  let result, color;
7077
7057
  if (isArray(c)) for (let i = 0; i < c.length && (color = c[i], !color); i++);else color = c;
7078
- return color = GradientParser.Parse(color), "string" == typeof color ? color : ("linear" === color.gradient ? result = createLinearGradient(context, color, params, offsetX, offsetY) : "conical" === color.gradient ? result = createConicGradient(context, color, params, offsetX, offsetY) : "radial" === color.gradient && (result = createRadialGradient(context, color, params, offsetX, offsetY)), result || "orange");
7058
+ if (color = GradientParser.Parse(color), "string" == typeof color) return color;
7059
+ if (params.AABBBounds && (!params.attribute || 0 !== params.attribute.scaleX || 0 !== params.attribute.scaleY)) {
7060
+ const bounds = params.AABBBounds;
7061
+ let w = bounds.x2 - bounds.x1,
7062
+ h = bounds.y2 - bounds.y1,
7063
+ x = bounds.x1 - offsetX,
7064
+ y = bounds.y1 - offsetY;
7065
+ if (params.attribute) {
7066
+ const {
7067
+ scaleX = 1,
7068
+ scaleY = 1
7069
+ } = params.attribute;
7070
+ w /= scaleX, h /= scaleY, x /= scaleX, y /= scaleY;
7071
+ }
7072
+ "linear" === color.gradient ? result = createLinearGradient(context, color, x, y, w, h) : "conical" === color.gradient ? result = createConicGradient(context, color, x, y, w, h) : "radial" === color.gradient && (result = createRadialGradient(context, color, x, y, w, h));
7073
+ }
7074
+ return result || "orange";
7079
7075
  }
7080
- function createLinearGradient(context, color, params) {
7081
- let offsetX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
7082
- let offsetY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
7076
+ function createLinearGradient(context, color, x, y, w, h) {
7083
7077
  var _a, _b, _c, _d;
7084
- const bounds = params.AABBBounds;
7085
- if (!bounds) return;
7086
- let w = bounds.x2 - bounds.x1,
7087
- h = bounds.y2 - bounds.y1,
7088
- x = bounds.x1 - offsetX,
7089
- y = bounds.y1 - offsetY;
7090
- if (params.attribute) {
7091
- const {
7092
- scaleX = 1,
7093
- scaleY = 1
7094
- } = params.attribute;
7095
- if (scaleX * scaleY == 0) return;
7096
- w /= scaleX, h /= scaleY, x /= scaleX, y /= scaleY;
7097
- }
7098
7078
  const canvasGradient = context.createLinearGradient(x + (null !== (_a = color.x0) && void 0 !== _a ? _a : 0) * w, y + (null !== (_b = color.y0) && void 0 !== _b ? _b : 0) * h, x + (null !== (_c = color.x1) && void 0 !== _c ? _c : 1) * w, y + (null !== (_d = color.y1) && void 0 !== _d ? _d : 0) * h);
7099
7079
  return color.stops.forEach(stop => {
7100
7080
  canvasGradient.addColorStop(stop.offset, stop.color);
7101
7081
  }), canvasGradient;
7102
7082
  }
7103
- function createRadialGradient(context, color, params) {
7104
- let offsetX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
7105
- let offsetY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
7083
+ function createRadialGradient(context, color, x, y, w, h) {
7106
7084
  var _a, _b, _c, _d, _e, _f;
7107
- const bounds = params.AABBBounds;
7108
- if (!bounds) return;
7109
- let w = bounds.x2 - bounds.x1,
7110
- h = bounds.y2 - bounds.y1,
7111
- x = bounds.x1 - offsetX,
7112
- y = bounds.y1 - offsetY;
7113
- if (params.attribute) {
7114
- const {
7115
- scaleX = 1,
7116
- scaleY = 1
7117
- } = params.attribute;
7118
- if (scaleX * scaleY == 0) return;
7119
- x /= scaleX, y /= scaleY, w /= scaleX, h /= scaleY;
7120
- }
7121
7085
  const canvasGradient = context.createRadialGradient(x + (null !== (_a = color.x0) && void 0 !== _a ? _a : .5) * w, y + (null !== (_b = color.y0) && void 0 !== _b ? _b : .5) * h, Math.max(w, h) * (null !== (_c = color.r0) && void 0 !== _c ? _c : 0), x + (null !== (_d = color.x1) && void 0 !== _d ? _d : .5) * w, y + (null !== (_e = color.y1) && void 0 !== _e ? _e : .5) * h, Math.max(w, h) * (null !== (_f = color.r1) && void 0 !== _f ? _f : .5));
7122
7086
  return color.stops.forEach(stop => {
7123
7087
  canvasGradient.addColorStop(stop.offset, stop.color);
7124
7088
  }), canvasGradient;
7125
7089
  }
7126
- function createConicGradient(context, color, params) {
7127
- let offsetX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
7128
- let offsetY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
7090
+ function createConicGradient(context, color, x, y, w, h) {
7129
7091
  var _a, _b;
7130
- const bounds = params.AABBBounds;
7131
- if (!bounds) return;
7132
- let w = bounds.x2 - bounds.x1,
7133
- h = bounds.y2 - bounds.y1,
7134
- x = bounds.x1 - offsetX,
7135
- y = bounds.y1 - offsetY;
7136
- if (params.attribute) {
7137
- const {
7138
- scaleX = 1,
7139
- scaleY = 1
7140
- } = params.attribute;
7141
- if (scaleX * scaleY == 0) return;
7142
- w /= scaleX, h /= scaleY, x /= scaleX, y /= scaleY;
7143
- }
7144
7092
  const canvasGradient = context.createConicGradient(x + (null !== (_a = color.x) && void 0 !== _a ? _a : 0) * w, y + (null !== (_b = color.y) && void 0 !== _b ? _b : 0) * h, color.startAngle, color.endAngle);
7145
7093
  return color.stops.forEach(stop => {
7146
7094
  canvasGradient.addColorStop(stop.offset, stop.color);
7147
7095
  }), canvasGradient.GetPattern(w + x, h + y, undefined);
7148
7096
  }
7149
7097
 
7150
- var __decorate$L = undefined && undefined.__decorate || function (decorators, target, key, desc) {
7098
+ var __decorate$K = undefined && undefined.__decorate || function (decorators, target, key, desc) {
7151
7099
  var d,
7152
7100
  c = arguments.length,
7153
7101
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -7231,7 +7179,7 @@ let DefaultBaseInteractiveRenderContribution = class {
7231
7179
  });
7232
7180
  }
7233
7181
  };
7234
- DefaultBaseInteractiveRenderContribution = __decorate$L([injectable(), __param$w(0, inject(ContributionProvider)), __param$w(0, named(InteractiveSubRenderContribution)), __metadata$B("design:paramtypes", [Object])], DefaultBaseInteractiveRenderContribution);
7182
+ DefaultBaseInteractiveRenderContribution = __decorate$K([injectable(), __param$w(0, inject(ContributionProvider)), __param$w(0, named(InteractiveSubRenderContribution)), __metadata$B("design:paramtypes", [Object])], DefaultBaseInteractiveRenderContribution);
7235
7183
 
7236
7184
  class DefaultBaseTextureRenderContribution {
7237
7185
  constructor() {
@@ -7526,7 +7474,7 @@ function createRectPath(path, x, y, width, height, rectCornerRadius) {
7526
7474
  return path.closePath(), path;
7527
7475
  }
7528
7476
 
7529
- var __decorate$K = undefined && undefined.__decorate || function (decorators, target, key, desc) {
7477
+ var __decorate$J = undefined && undefined.__decorate || function (decorators, target, key, desc) {
7530
7478
  var d,
7531
7479
  c = arguments.length,
7532
7480
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -7589,7 +7537,7 @@ let SplitRectBeforeRenderContribution = class {
7589
7537
  Array.isArray(stroke) && stroke.some(s => !1 === s) && (doFillOrStroke.doStroke = !1);
7590
7538
  }
7591
7539
  };
7592
- SplitRectBeforeRenderContribution = __decorate$K([injectable()], SplitRectBeforeRenderContribution);
7540
+ SplitRectBeforeRenderContribution = __decorate$J([injectable()], SplitRectBeforeRenderContribution);
7593
7541
  let SplitRectAfterRenderContribution = class {
7594
7542
  constructor() {
7595
7543
  this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
@@ -7615,7 +7563,7 @@ let SplitRectAfterRenderContribution = class {
7615
7563
  }
7616
7564
  }
7617
7565
  };
7618
- SplitRectAfterRenderContribution = __decorate$K([injectable()], SplitRectAfterRenderContribution);
7566
+ SplitRectAfterRenderContribution = __decorate$J([injectable()], SplitRectAfterRenderContribution);
7619
7567
  const defaultRectRenderContribution = new DefaultRectRenderContribution();
7620
7568
  const defaultRectTextureRenderContribution = defaultBaseTextureRenderContribution;
7621
7569
  const defaultRectBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
@@ -7754,7 +7702,7 @@ class DefaultAreaTextureRenderContribution extends DefaultBaseTextureRenderContr
7754
7702
  }
7755
7703
  }
7756
7704
 
7757
- var __decorate$J = undefined && undefined.__decorate || function (decorators, target, key, desc) {
7705
+ var __decorate$I = undefined && undefined.__decorate || function (decorators, target, key, desc) {
7758
7706
  var d,
7759
7707
  c = arguments.length,
7760
7708
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -7782,10 +7730,7 @@ let DefaultCanvasArcRender = class extends BaseRender {
7782
7730
  const deltaAngle = abs(endAngle - startAngle),
7783
7731
  clockwise = endAngle > startAngle;
7784
7732
  let collapsedToLine = !1;
7785
- if (outerRadius < innerRadius) {
7786
- const temp = outerRadius;
7787
- outerRadius = innerRadius, innerRadius = temp;
7788
- }
7733
+ outerRadius < innerRadius && ([innerRadius, outerRadius] = [outerRadius, innerRadius]);
7789
7734
  const cornerRadius = arc.getParsedCornerRadius(),
7790
7735
  {
7791
7736
  outerDeltaAngle: outerDeltaAngle,
@@ -7925,9 +7870,9 @@ let DefaultCanvasArcRender = class extends BaseRender {
7925
7870
  this._draw(arc, arcAttribute, !1, drawContext, params);
7926
7871
  }
7927
7872
  };
7928
- DefaultCanvasArcRender = __decorate$J([injectable(), __param$v(0, inject(ContributionProvider)), __param$v(0, named(ArcRenderContribution)), __metadata$A("design:paramtypes", [Object])], DefaultCanvasArcRender);
7873
+ DefaultCanvasArcRender = __decorate$I([injectable(), __param$v(0, inject(ContributionProvider)), __param$v(0, named(ArcRenderContribution)), __metadata$A("design:paramtypes", [Object])], DefaultCanvasArcRender);
7929
7874
 
7930
- var __decorate$I = undefined && undefined.__decorate || function (decorators, target, key, desc) {
7875
+ var __decorate$H = undefined && undefined.__decorate || function (decorators, target, key, desc) {
7931
7876
  var d,
7932
7877
  c = arguments.length,
7933
7878
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -7970,7 +7915,7 @@ let DefaultCanvasCircleRender = class extends BaseRender {
7970
7915
  this._draw(circle, circleAttribute, !1, drawContext, params);
7971
7916
  }
7972
7917
  };
7973
- DefaultCanvasCircleRender = __decorate$I([injectable(), __param$u(0, inject(ContributionProvider)), __param$u(0, named(CircleRenderContribution)), __metadata$z("design:paramtypes", [Object])], DefaultCanvasCircleRender);
7918
+ DefaultCanvasCircleRender = __decorate$H([injectable(), __param$u(0, inject(ContributionProvider)), __param$u(0, named(CircleRenderContribution)), __metadata$z("design:paramtypes", [Object])], DefaultCanvasCircleRender);
7974
7919
 
7975
7920
  function drawSegItem(ctx, curve, endPercent, params) {
7976
7921
  if (!curve.p1) return;
@@ -7988,16 +7933,32 @@ function drawSegItem(ctx, curve, endPercent, params) {
7988
7933
  }
7989
7934
  }
7990
7935
 
7991
- function drawSegments(path, segPath, percent, clipRangeByDimension, params) {
7936
+ function drawEachCurve(path, curve, lastCurve, defined0, offsetX, offsetY, offsetZ) {
7992
7937
  var _a;
7938
+ let p0 = curve.p0,
7939
+ newDefined0 = defined0;
7940
+ if (lastCurve && lastCurve.originP1 === lastCurve.originP2 && (p0 = lastCurve.p0), curve.defined) defined0 || (path.lineTo(p0.x + offsetX, p0.y + offsetY, offsetZ), newDefined0 = !defined0);else {
7941
+ const {
7942
+ originP1: originP1,
7943
+ originP2: originP2
7944
+ } = curve;
7945
+ let validP;
7946
+ if (originP1 && !1 !== originP1.defined ? validP = p0 : originP1 && !1 !== originP2.defined && (validP = null !== (_a = curve.p3) && void 0 !== _a ? _a : curve.p1), defined0) {
7947
+ newDefined0 = !defined0;
7948
+ const x = validP ? validP.x : curve.p0.x,
7949
+ y = validP ? validP.y : curve.p0.y;
7950
+ path.moveTo(x + offsetX, y + offsetY, offsetZ);
7951
+ } else validP && (newDefined0 = !defined0, path.lineTo(validP.x + offsetX, validP.y + offsetY, offsetZ));
7952
+ }
7953
+ return newDefined0;
7954
+ }
7955
+ function drawSegments(path, segPath, percent, clipRangeByDimension, params) {
7993
7956
  const {
7994
7957
  offsetX = 0,
7995
7958
  offsetY = 0,
7996
7959
  offsetZ = 0,
7997
7960
  mode = "none",
7998
- drawConnect = !1,
7999
- zeroX = 0,
8000
- zeroY = 0
7961
+ drawConnect = !1
8001
7962
  } = params || {};
8002
7963
  if (drawConnect && "none" === mode) return;
8003
7964
  if (!segPath) return;
@@ -8010,24 +7971,7 @@ function drawSegments(path, segPath, percent, clipRangeByDimension, params) {
8010
7971
  let lastCurve,
8011
7972
  defined0 = !0;
8012
7973
  curves.forEach((curve, i) => {
8013
- var _a;
8014
- let p0 = curve.p0;
8015
- if (curve.originP1 !== curve.originP2) {
8016
- if (lastCurve && lastCurve.originP1 === lastCurve.originP2 && (p0 = lastCurve.p0), curve.defined) defined0 || (path.lineTo(p0.x + offsetX, p0.y + offsetY, offsetZ), defined0 = !defined0);else {
8017
- const {
8018
- originP1: originP1,
8019
- originP2: originP2
8020
- } = curve;
8021
- let validP;
8022
- if (originP1 && !1 !== originP1.defined ? validP = p0 : originP1 && !1 !== originP2.defined && (validP = null !== (_a = curve.p3) && void 0 !== _a ? _a : curve.p1), defined0) {
8023
- defined0 = !defined0;
8024
- const x = validP ? validP.x : curve.p0.x,
8025
- y = validP ? validP.y : curve.p0.y;
8026
- path.moveTo(x + offsetX, y + offsetY, offsetZ);
8027
- } else validP && (defined0 = !defined0, path.lineTo(validP.x + offsetX, validP.y + offsetY, offsetZ));
8028
- }
8029
- lastCurve = curve;
8030
- } else lastCurve = curve;
7974
+ curve.originP1 !== curve.originP2 ? (defined0 = drawEachCurve(path, curve, lastCurve, defined0, offsetX, offsetY, offsetZ), lastCurve = curve) : lastCurve = curve;
8031
7975
  });
8032
7976
  } else curves.forEach(curve => {
8033
7977
  curve.defined ? (needMoveTo && path.moveTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), drawSegItem(path, curve, 1, params), needMoveTo = !1) : needMoveTo = !0;
@@ -8047,25 +7991,11 @@ function drawSegments(path, segPath, percent, clipRangeByDimension, params) {
8047
7991
  _p = (totalDrawLength - drawedLengthUntilLast) / curCurveLength;
8048
7992
  if (drawedLengthUntilLast += curCurveLength, _p < 0) break;
8049
7993
  if (drawConnect) {
8050
- let p0 = curve.p0;
8051
7994
  if (curve.originP1 === curve.originP2) {
8052
7995
  lastCurve = curve;
8053
7996
  continue;
8054
7997
  }
8055
- if (lastCurve && lastCurve.originP1 === lastCurve.originP2 && (p0 = lastCurve.p0), curve.defined) defined0 || (path.lineTo(p0.x + offsetX, p0.y + offsetY, offsetZ), defined0 = !defined0);else {
8056
- const {
8057
- originP1: originP1,
8058
- originP2: originP2
8059
- } = curve;
8060
- let validP;
8061
- if (originP1 && !1 !== originP1.defined ? validP = p0 : originP1 && !1 !== originP2.defined && (validP = null !== (_a = curve.p3) && void 0 !== _a ? _a : curve.p1), defined0) {
8062
- defined0 = !defined0;
8063
- const x = validP ? validP.x : curve.p0.x,
8064
- y = validP ? validP.y : curve.p0.y;
8065
- path.moveTo(x + offsetX, y + offsetY, offsetZ);
8066
- } else validP && (defined0 = !defined0, path.lineTo(validP.x + offsetX, validP.y + offsetY, offsetZ));
8067
- }
8068
- lastCurve = curve;
7998
+ defined0 = drawEachCurve(path, curve, lastCurve, defined0, offsetX, offsetY, offsetZ), lastCurve = curve;
8069
7999
  } else {
8070
8000
  if (!curve.defined) {
8071
8001
  needMoveTo = !0;
@@ -8109,7 +8039,7 @@ function drawIncrementalAreaSegments(path, lastSeg, segments, params) {
8109
8039
  });
8110
8040
  }
8111
8041
 
8112
- var __decorate$H = undefined && undefined.__decorate || function (decorators, target, key, desc) {
8042
+ var __decorate$G = undefined && undefined.__decorate || function (decorators, target, key, desc) {
8113
8043
  var d,
8114
8044
  c = arguments.length,
8115
8045
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -8266,7 +8196,7 @@ let DefaultCanvasLineRender = class extends BaseRender {
8266
8196
  } else this.drawSegmentItem(context, line.cache, !!fill, !!stroke, fillOpacity, strokeOpacity, line.attribute, lineAttribute, clipRange, clipRangeByDimension, x, y, line, fillCb, strokeCb);
8267
8197
  }
8268
8198
  };
8269
- DefaultCanvasLineRender = __decorate$H([injectable()], DefaultCanvasLineRender);
8199
+ DefaultCanvasLineRender = __decorate$G([injectable()], DefaultCanvasLineRender);
8270
8200
 
8271
8201
  function drawAreaSegments(path, segPath, percent, params) {
8272
8202
  var _a;
@@ -8395,7 +8325,7 @@ function drawAreaBlock(path, topList, bottomList, params) {
8395
8325
  const defaultAreaTextureRenderContribution = new DefaultAreaTextureRenderContribution();
8396
8326
  const defaultAreaBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
8397
8327
 
8398
- var __decorate$G = undefined && undefined.__decorate || function (decorators, target, key, desc) {
8328
+ var __decorate$F = undefined && undefined.__decorate || function (decorators, target, key, desc) {
8399
8329
  var d,
8400
8330
  c = arguments.length,
8401
8331
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -8601,7 +8531,7 @@ let DefaultCanvasAreaRender = class extends BaseRender {
8601
8531
  } else startP = points[0], endP = points[points.length - 1];
8602
8532
  const xTotalLength = abs(endP.x - startP.x),
8603
8533
  yTotalLength = abs(endP.y - startP.y);
8604
- direction = Number.isFinite(xTotalLength + yTotalLength) ? xTotalLength > yTotalLength ? Direction$1.ROW : Direction$1.COLUMN : Direction$1.ROW, drawAreaSegments(context.camera ? context : context.nativeContext, cache, clipRange, {
8534
+ direction = null == endP.x1 ? Direction$1.ROW : null == endP.y1 ? Direction$1.COLUMN : Number.isFinite(xTotalLength + yTotalLength) ? xTotalLength > yTotalLength ? Direction$1.ROW : Direction$1.COLUMN : Direction$1.ROW, drawAreaSegments(context.camera ? context : context.nativeContext, cache, clipRange, {
8605
8535
  offsetX: offsetX,
8606
8536
  offsetY: offsetY,
8607
8537
  offsetZ: offsetZ,
@@ -8636,12 +8566,12 @@ let DefaultCanvasAreaRender = class extends BaseRender {
8636
8566
  return !1;
8637
8567
  }
8638
8568
  };
8639
- DefaultCanvasAreaRender = __decorate$G([injectable(), __param$t(0, inject(ContributionProvider)), __param$t(0, named(AreaRenderContribution)), __metadata$y("design:paramtypes", [Object])], DefaultCanvasAreaRender);
8569
+ DefaultCanvasAreaRender = __decorate$F([injectable(), __param$t(0, inject(ContributionProvider)), __param$t(0, named(AreaRenderContribution)), __metadata$y("design:paramtypes", [Object])], DefaultCanvasAreaRender);
8640
8570
 
8641
8571
  const defaultPathTextureRenderContribution = defaultBaseTextureRenderContribution;
8642
8572
  const defaultPathBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
8643
8573
 
8644
- var __decorate$F = undefined && undefined.__decorate || function (decorators, target, key, desc) {
8574
+ var __decorate$E = undefined && undefined.__decorate || function (decorators, target, key, desc) {
8645
8575
  var d,
8646
8576
  c = arguments.length,
8647
8577
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -8687,9 +8617,9 @@ let DefaultCanvasPathRender = class extends BaseRender {
8687
8617
  this.tempTheme = pathAttribute, this._draw(path, pathAttribute, !1, drawContext, params), this.tempTheme = null;
8688
8618
  }
8689
8619
  };
8690
- DefaultCanvasPathRender = __decorate$F([injectable(), __param$s(0, inject(ContributionProvider)), __param$s(0, named(PathRenderContribution)), __metadata$x("design:paramtypes", [Object])], DefaultCanvasPathRender);
8620
+ DefaultCanvasPathRender = __decorate$E([injectable(), __param$s(0, inject(ContributionProvider)), __param$s(0, named(PathRenderContribution)), __metadata$x("design:paramtypes", [Object])], DefaultCanvasPathRender);
8691
8621
 
8692
- var __decorate$E = undefined && undefined.__decorate || function (decorators, target, key, desc) {
8622
+ var __decorate$D = undefined && undefined.__decorate || function (decorators, target, key, desc) {
8693
8623
  var d,
8694
8624
  c = arguments.length,
8695
8625
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -8750,9 +8680,9 @@ let DefaultCanvasRectRender = class extends BaseRender {
8750
8680
  this.tempTheme = rectAttribute, this._draw(rect, rectAttribute, !1, drawContext, params), this.tempTheme = null;
8751
8681
  }
8752
8682
  };
8753
- DefaultCanvasRectRender = __decorate$E([injectable(), __param$r(0, inject(ContributionProvider)), __param$r(0, named(RectRenderContribution)), __metadata$w("design:paramtypes", [Object])], DefaultCanvasRectRender);
8683
+ DefaultCanvasRectRender = __decorate$D([injectable(), __param$r(0, inject(ContributionProvider)), __param$r(0, named(RectRenderContribution)), __metadata$w("design:paramtypes", [Object])], DefaultCanvasRectRender);
8754
8684
 
8755
- var __decorate$D = undefined && undefined.__decorate || function (decorators, target, key, desc) {
8685
+ var __decorate$C = undefined && undefined.__decorate || function (decorators, target, key, desc) {
8756
8686
  var d,
8757
8687
  c = arguments.length,
8758
8688
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -8795,25 +8725,20 @@ let DefaultCanvasSymbolRender = class extends BaseRender {
8795
8725
  keepDirIn3d = symbolAttribute.keepDirIn3d
8796
8726
  } = symbol.attribute,
8797
8727
  z = null !== (_a = this.z) && void 0 !== _a ? _a : 0;
8798
- if (context.beginPath(), keepDirIn3d && context.camera && context.project) {
8799
- const p = context.project(x, y, z),
8800
- camera = context.camera;
8801
- context.camera = null, !1 === parsedPath.draw(context, isArray(size) ? [size[0] * scaleX, size[1] * scaleY] : size * scaleX, p.x, p.y, void 0, (p, a) => {
8802
- var _a, _b, _c;
8803
- if (symbol._parsedPath.svgCache) {
8804
- const obj = Object.assign({}, a);
8805
- obj.fill = null !== (_a = a.fill) && void 0 !== _a ? _a : symbol.attribute.fill, obj.opacity = null !== (_b = a.fill) && void 0 !== _b ? _b : symbol.attribute.opacity, obj.fillOpacity = symbol.attribute.fillOpacity, obj.stroke = null !== (_c = a.stroke) && void 0 !== _c ? _c : symbol.attribute.stroke, a = obj;
8806
- }
8807
- a.fill && (fillCb ? fillCb(context, symbol.attribute, symbolAttribute) : (context.setCommonStyle(symbol, a, originX - x, originY - y, symbolAttribute), context.fill())), a.stroke && (strokeCb ? strokeCb(context, symbol.attribute, symbolAttribute) : (context.setStrokeStyle(symbol, a, (originX - x) / scaleX, (originY - y) / scaleY, symbolAttribute), context.stroke()));
8808
- }) && context.closePath(), context.camera = camera;
8809
- } else !1 === parsedPath.draw(context, size, x, y, z, (p, a) => {
8728
+ context.beginPath();
8729
+ const callback = (p, a) => {
8810
8730
  var _a, _b, _c;
8811
8731
  if (symbol._parsedPath.svgCache) {
8812
8732
  const obj = Object.assign({}, a);
8813
- obj.fill = null !== (_a = a.fill) && void 0 !== _a ? _a : symbol.attribute.fill, obj.opacity = null !== (_b = a.opacity) && void 0 !== _b ? _b : symbol.attribute.opacity, obj.fillOpacity = symbol.attribute.fillOpacity, obj.stroke = null !== (_c = a.stroke) && void 0 !== _c ? _c : symbol.attribute.stroke, a = obj;
8733
+ obj.fill = null !== (_a = a.fill) && void 0 !== _a ? _a : symbol.attribute.fill, obj.opacity = null !== (_b = a.fill) && void 0 !== _b ? _b : symbol.attribute.opacity, obj.fillOpacity = symbol.attribute.fillOpacity, obj.stroke = null !== (_c = a.stroke) && void 0 !== _c ? _c : symbol.attribute.stroke, a = obj;
8814
8734
  }
8815
8735
  a.fill && (fillCb ? fillCb(context, symbol.attribute, symbolAttribute) : (context.setCommonStyle(symbol, a, originX - x, originY - y, symbolAttribute), context.fill())), a.stroke && (strokeCb ? strokeCb(context, symbol.attribute, symbolAttribute) : (context.setStrokeStyle(symbol, a, (originX - x) / scaleX, (originY - y) / scaleY, symbolAttribute), context.stroke()));
8816
- }) && context.closePath();
8736
+ };
8737
+ if (keepDirIn3d && context.camera && context.project) {
8738
+ const p = context.project(x, y, z),
8739
+ camera = context.camera;
8740
+ context.camera = null, !1 === parsedPath.draw(context, isArray(size) ? [size[0] * scaleX, size[1] * scaleY] : size * scaleX, p.x, p.y, void 0, callback) && context.closePath(), context.camera = camera;
8741
+ } else !1 === parsedPath.draw(context, size, x, y, z, callback) && context.closePath();
8817
8742
  context.setShadowBlendStyle && context.setShadowBlendStyle(symbol, symbol.attribute, symbolAttribute), this.beforeRenderStep(symbol, context, x, y, doFill, doStroke, fVisible, sVisible, symbolAttribute, drawContext, fillCb, strokeCb), doFill && !parsedPath.isSvg && (fillCb ? fillCb(context, symbol.attribute, symbolAttribute) : fVisible && (context.setCommonStyle(symbol, symbol.attribute, originX - x, originY - y, symbolAttribute), context.fill())), doStroke && !parsedPath.isSvg && (strokeCb ? strokeCb(context, symbol.attribute, symbolAttribute) : sVisible && (context.setStrokeStyle(symbol, symbol.attribute, (originX - x) / scaleX, (originY - y) / scaleY, symbolAttribute), context.stroke())), this.afterRenderStep(symbol, context, x, y, doFill, doStroke, fVisible, sVisible, symbolAttribute, drawContext, fillCb, strokeCb);
8818
8743
  }
8819
8744
  draw(symbol, renderService, drawContext, params) {
@@ -8821,7 +8746,7 @@ let DefaultCanvasSymbolRender = class extends BaseRender {
8821
8746
  this._draw(symbol, symbolAttribute, !1, drawContext, params);
8822
8747
  }
8823
8748
  };
8824
- DefaultCanvasSymbolRender = __decorate$D([injectable(), __param$q(0, inject(ContributionProvider)), __param$q(0, named(SymbolRenderContribution)), __metadata$v("design:paramtypes", [Object])], DefaultCanvasSymbolRender);
8749
+ DefaultCanvasSymbolRender = __decorate$C([injectable(), __param$q(0, inject(ContributionProvider)), __param$q(0, named(SymbolRenderContribution)), __metadata$v("design:paramtypes", [Object])], DefaultCanvasSymbolRender);
8825
8750
 
8826
8751
  class DefaultBoundsAllocate {
8827
8752
  constructor() {
@@ -8926,7 +8851,7 @@ class DefaultTextBackgroundRenderContribution extends DefaultBaseBackgroundRende
8926
8851
  }
8927
8852
  const defaultTextBackgroundRenderContribution = new DefaultTextBackgroundRenderContribution();
8928
8853
 
8929
- var __decorate$C = undefined && undefined.__decorate || function (decorators, target, key, desc) {
8854
+ var __decorate$B = undefined && undefined.__decorate || function (decorators, target, key, desc) {
8930
8855
  var d,
8931
8856
  c = arguments.length,
8932
8857
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -9106,7 +9031,7 @@ let DefaultCanvasTextRender = class extends BaseRender {
9106
9031
  }
9107
9032
  }
9108
9033
  };
9109
- DefaultCanvasTextRender = __decorate$C([injectable(), __param$p(0, inject(ContributionProvider)), __param$p(0, named(TextRenderContribution)), __metadata$u("design:paramtypes", [Object])], DefaultCanvasTextRender);
9034
+ DefaultCanvasTextRender = __decorate$B([injectable(), __param$p(0, inject(ContributionProvider)), __param$p(0, named(TextRenderContribution)), __metadata$u("design:paramtypes", [Object])], DefaultCanvasTextRender);
9110
9035
 
9111
9036
  function drawPolygon(path, points, x, y) {
9112
9037
  path.moveTo(points[0].x + x, points[0].y + y);
@@ -9162,7 +9087,7 @@ function getProportionPoint(point, segment, length, dx, dy) {
9162
9087
  const defaultPolygonTextureRenderContribution = defaultBaseTextureRenderContribution;
9163
9088
  const defaultPolygonBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
9164
9089
 
9165
- var __decorate$B = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9090
+ var __decorate$A = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9166
9091
  var d,
9167
9092
  c = arguments.length,
9168
9093
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -9205,9 +9130,9 @@ let DefaultCanvasPolygonRender = class extends BaseRender {
9205
9130
  this._draw(polygon, polygonAttribute, !1, drawContext, params);
9206
9131
  }
9207
9132
  };
9208
- DefaultCanvasPolygonRender = __decorate$B([injectable(), __param$o(0, inject(ContributionProvider)), __param$o(0, named(PolygonRenderContribution)), __metadata$t("design:paramtypes", [Object])], DefaultCanvasPolygonRender);
9133
+ DefaultCanvasPolygonRender = __decorate$A([injectable(), __param$o(0, inject(ContributionProvider)), __param$o(0, named(PolygonRenderContribution)), __metadata$t("design:paramtypes", [Object])], DefaultCanvasPolygonRender);
9209
9134
 
9210
- var __decorate$A = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9135
+ var __decorate$z = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9211
9136
  var d,
9212
9137
  c = arguments.length,
9213
9138
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -9278,7 +9203,7 @@ let DefaultCanvasImageRender = class extends BaseRender {
9278
9203
  this._draw(image, imageAttribute, !1, drawContext);
9279
9204
  }
9280
9205
  };
9281
- DefaultCanvasImageRender = __decorate$A([injectable(), __param$n(0, inject(ContributionProvider)), __param$n(0, named(ImageRenderContribution)), __metadata$s("design:paramtypes", [Object])], DefaultCanvasImageRender);
9206
+ DefaultCanvasImageRender = __decorate$z([injectable(), __param$n(0, inject(ContributionProvider)), __param$n(0, named(ImageRenderContribution)), __metadata$s("design:paramtypes", [Object])], DefaultCanvasImageRender);
9282
9207
 
9283
9208
  const IncrementalDrawContribution = Symbol.for("IncrementalDrawContribution");
9284
9209
  const ArcRender = Symbol.for("ArcRender");
@@ -9296,11 +9221,56 @@ const RichTextRender = Symbol.for("RichTextRender");
9296
9221
  const ImageRender = Symbol.for("ImageRender");
9297
9222
  const DrawContribution = Symbol.for("DrawContribution");
9298
9223
 
9299
- var __decorate$z = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9300
- var d,
9301
- c = arguments.length,
9302
- r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
9303
- 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);
9224
+ const draw3dItem = (context, graphic, callback, output) => {
9225
+ let result,
9226
+ isPie = !1,
9227
+ is3d = !1;
9228
+ if (graphic.forEachChildren(c => (isPie = c.numberType === ARC3D_NUMBER_TYPE, !isPie)), graphic.forEachChildren(c => (is3d = !!c.findFace, !is3d)), isPie) {
9229
+ const children = graphic.getChildren(),
9230
+ sortedChildren = [...children];
9231
+ sortedChildren.sort((a, b) => {
9232
+ var _a, _b, _c, _d;
9233
+ let angle1 = (null !== (_b = null !== (_a = a.attribute.startAngle) && void 0 !== _a ? _a : 0 + a.attribute.endAngle) && void 0 !== _b ? _b : 0) / 2,
9234
+ angle2 = (null !== (_d = null !== (_c = b.attribute.startAngle) && void 0 !== _c ? _c : 0 + b.attribute.endAngle) && void 0 !== _d ? _d : 0) / 2;
9235
+ for (; angle1 < 0;) angle1 += pi2;
9236
+ for (; angle2 < 0;) angle2 += pi2;
9237
+ return angle2 - angle1;
9238
+ }), sortedChildren.forEach(c => {
9239
+ c._next = null, c._prev = null;
9240
+ }), graphic.removeAllChild(), graphic.update(), sortedChildren.forEach(c => {
9241
+ graphic.appendChild(c);
9242
+ }), output.hack_pieFace = "outside", result = callback(isPie, is3d), result && result.graphic || (output.hack_pieFace = "inside", result = callback(isPie, is3d)), result && result.graphic || (output.hack_pieFace = "top", result = callback(isPie, is3d)), graphic.removeAllChild(), children.forEach(c => {
9243
+ c._next = null, c._prev = null;
9244
+ }), children.forEach(c => {
9245
+ graphic.appendChild(c);
9246
+ });
9247
+ } else if (is3d) {
9248
+ const children = graphic.getChildren(),
9249
+ zChildren = children.map(g => ({
9250
+ ave_z: g.findFace().vertices.map(v => {
9251
+ var _a;
9252
+ return context.view(v[0], v[1], null !== (_a = v[2] + g.attribute.z) && void 0 !== _a ? _a : 0)[2];
9253
+ }).reduce((a, b) => a + b, 0),
9254
+ g: g
9255
+ }));
9256
+ zChildren.sort((a, b) => b.ave_z - a.ave_z), graphic.removeAllChild(), zChildren.forEach(i => {
9257
+ i.g._next = null, i.g._prev = null;
9258
+ }), graphic.update(), zChildren.forEach(i => {
9259
+ graphic.add(i.g);
9260
+ }), result = callback(isPie, is3d), graphic.removeAllChild(), children.forEach(g => {
9261
+ g._next = null, g._prev = null;
9262
+ }), graphic.update(), children.forEach(g => {
9263
+ graphic.add(g);
9264
+ });
9265
+ } else result = callback(isPie, is3d);
9266
+ return result;
9267
+ };
9268
+
9269
+ var __decorate$y = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9270
+ var d,
9271
+ c = arguments.length,
9272
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
9273
+ 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);
9304
9274
  return c > 3 && r && Object.defineProperty(target, key, r), r;
9305
9275
  },
9306
9276
  __metadata$r = undefined && undefined.__metadata || function (k, v) {
@@ -9314,10 +9284,10 @@ class ShadowRootDrawItemInterceptorContribution {
9314
9284
  this.order = 1;
9315
9285
  }
9316
9286
  afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
9317
- return (graphic.attribute.shadowRootIdx > 0 || !graphic.attribute.shadowRootIdx) && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
9287
+ return null == graphic.attribute.shadowRootIdx && graphic.shadowRoot && graphic.shadowRoot.attribute.shadowRootIdx < 0 || (graphic.attribute.shadowRootIdx > 0 || !graphic.attribute.shadowRootIdx || graphic.shadowRoot && graphic.shadowRoot.attribute.shadowRootIdx > 0) && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
9318
9288
  }
9319
9289
  beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
9320
- return graphic.attribute.shadowRootIdx < 0 && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
9290
+ return null == graphic.attribute.shadowRootIdx && graphic.shadowRoot && graphic.shadowRoot.attribute.shadowRootIdx > 0 || (graphic.attribute.shadowRootIdx < 0 || graphic.shadowRoot && graphic.shadowRoot.attribute.shadowRootIdx < 0) && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
9321
9291
  }
9322
9292
  drawItem(graphic, renderService, drawContext, drawContribution, params) {
9323
9293
  if (!graphic.shadowRoot) return !1;
@@ -9363,7 +9333,7 @@ let CommonDrawItemInterceptorContribution = class {
9363
9333
  return !1;
9364
9334
  }
9365
9335
  };
9366
- CommonDrawItemInterceptorContribution = __decorate$z([injectable(), __metadata$r("design:paramtypes", [])], CommonDrawItemInterceptorContribution);
9336
+ CommonDrawItemInterceptorContribution = __decorate$y([injectable(), __metadata$r("design:paramtypes", [])], CommonDrawItemInterceptorContribution);
9367
9337
  class InteractiveDrawItemInterceptorContribution {
9368
9338
  constructor() {
9369
9339
  this.order = 1;
@@ -9444,58 +9414,14 @@ class Canvas3DDrawItemInterceptor {
9444
9414
  context.modelMatrix = multiplyMat4Mat4(m, lastModelMatrix, matrix);
9445
9415
  }
9446
9416
  } else context.modelMatrix = matrix;
9447
- if (context.setTransform(1, 0, 0, 1, 0, 0, !0), graphic.isContainer) {
9448
- let isPie = !1,
9449
- is3d = !1;
9450
- if (graphic.forEachChildren(c => (isPie = c.numberType === ARC3D_NUMBER_TYPE, !isPie)), graphic.forEachChildren(c => (is3d = !!c.findFace, !is3d)), isPie) {
9451
- const children = graphic.getChildren(),
9452
- sortedChildren = [...children];
9453
- sortedChildren.sort((a, b) => {
9454
- var _a, _b, _c, _d;
9455
- let angle1 = ((null !== (_a = a.attribute.startAngle) && void 0 !== _a ? _a : 0) + (null !== (_b = a.attribute.endAngle) && void 0 !== _b ? _b : 0)) / 2,
9456
- angle2 = ((null !== (_c = b.attribute.startAngle) && void 0 !== _c ? _c : 0) + (null !== (_d = b.attribute.endAngle) && void 0 !== _d ? _d : 0)) / 2;
9457
- for (; angle1 < 0;) angle1 += pi2;
9458
- for (; angle2 < 0;) angle2 += pi2;
9459
- return angle2 - angle1;
9460
- }), sortedChildren.forEach(c => {
9461
- c._next = null, c._prev = null;
9462
- }), graphic.removeAllChild(), graphic.update(), sortedChildren.forEach(c => {
9463
- graphic.appendChild(c);
9464
- });
9465
- const m = graphic.parent.globalTransMatrix;
9466
- drawContext.hack_pieFace = "outside", drawContribution.renderGroup(graphic, drawContext, m), drawContext.hack_pieFace = "inside", drawContribution.renderGroup(graphic, drawContext, m), drawContext.hack_pieFace = "top", drawContribution.renderGroup(graphic, drawContext, m), graphic.removeAllChild(), children.forEach(c => {
9467
- c._next = null, c._prev = null;
9468
- }), children.forEach(c => {
9469
- graphic.appendChild(c);
9470
- });
9471
- } else if (is3d) {
9472
- const children = graphic.getChildren(),
9473
- zChildren = children.map(g => ({
9474
- ave_z: g.findFace().vertices.map(v => {
9475
- var _a;
9476
- return context.view(v[0], v[1], null !== (_a = v[2] + g.attribute.z) && void 0 !== _a ? _a : 0)[2];
9477
- }).reduce((a, b) => a + b, 0),
9478
- g: g
9479
- }));
9480
- zChildren.sort((a, b) => b.ave_z - a.ave_z), graphic.removeAllChild(), zChildren.forEach(i => {
9481
- i.g._next = null, i.g._prev = null;
9482
- }), graphic.update(), zChildren.forEach(i => {
9483
- graphic.add(i.g);
9484
- }), drawContribution.renderGroup(graphic, drawContext, graphic.parent.globalTransMatrix, !0), graphic.removeAllChild(), children.forEach(g => {
9485
- g._next = null, g._prev = null;
9486
- }), graphic.update(), children.forEach(g => {
9487
- graphic.add(g);
9488
- });
9489
- } else drawContribution.renderGroup(graphic, drawContext, graphic.parent.globalTransMatrix);
9490
- } else drawContribution.renderItem(graphic, drawContext);
9491
- return context.camera = null, context.restore(), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, drawContext.in3dInterceptor = !1, !0;
9417
+ return context.setTransform(1, 0, 0, 1, 0, 0, !0), graphic.isContainer ? draw3dItem(context, graphic, (isPie, is3d) => drawContribution.renderGroup(graphic, drawContext, graphic.parent.globalTransMatrix, !isPie && is3d), drawContext) : drawContribution.renderItem(graphic, drawContext), context.camera = null, context.restore(), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, drawContext.in3dInterceptor = !1, !0;
9492
9418
  }
9493
9419
  initCanvasCtx(context) {
9494
9420
  context.setTransformForCurrent();
9495
9421
  }
9496
9422
  }
9497
9423
 
9498
- var __decorate$y = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9424
+ var __decorate$x = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9499
9425
  var d,
9500
9426
  c = arguments.length,
9501
9427
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -9542,7 +9468,7 @@ let DefaultRenderService = class {
9542
9468
  this.prepare(updateBounds), this.prepareRenderList(), this.beforeDraw(params), this.draw(params), this.afterDraw(params), this.drawParams = null;
9543
9469
  }
9544
9470
  };
9545
- DefaultRenderService = __decorate$y([injectable(), __param$m(0, inject(DrawContribution)), __metadata$q("design:paramtypes", [Object])], DefaultRenderService);
9471
+ DefaultRenderService = __decorate$x([injectable(), __param$m(0, inject(DrawContribution)), __metadata$q("design:paramtypes", [Object])], DefaultRenderService);
9546
9472
 
9547
9473
  var renderModule$1 = new ContainerModule(bind => {
9548
9474
  bind(RenderService).to(DefaultRenderService);
@@ -9551,7 +9477,7 @@ var renderModule$1 = new ContainerModule(bind => {
9551
9477
  const PickerService = Symbol.for("PickerService");
9552
9478
  const GlobalPickerService = Symbol.for("GlobalPickerService");
9553
9479
 
9554
- var __decorate$x = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9480
+ var __decorate$w = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9555
9481
  var d,
9556
9482
  c = arguments.length,
9557
9483
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -9584,7 +9510,7 @@ let ShadowRootPickItemInterceptorContribution = class {
9584
9510
  return context.highPerformanceRestore(), result;
9585
9511
  }
9586
9512
  };
9587
- ShadowRootPickItemInterceptorContribution = __decorate$x([injectable()], ShadowRootPickItemInterceptorContribution);
9513
+ ShadowRootPickItemInterceptorContribution = __decorate$w([injectable()], ShadowRootPickItemInterceptorContribution);
9588
9514
  let InteractivePickItemInterceptorContribution = class {
9589
9515
  constructor() {
9590
9516
  this.order = 1;
@@ -9603,7 +9529,7 @@ let InteractivePickItemInterceptorContribution = class {
9603
9529
  return null;
9604
9530
  }
9605
9531
  };
9606
- InteractivePickItemInterceptorContribution = __decorate$x([injectable()], InteractivePickItemInterceptorContribution);
9532
+ InteractivePickItemInterceptorContribution = __decorate$w([injectable()], InteractivePickItemInterceptorContribution);
9607
9533
  let Canvas3DPickItemInterceptor = class {
9608
9534
  constructor() {
9609
9535
  this.order = 1;
@@ -9614,47 +9540,7 @@ let Canvas3DPickItemInterceptor = class {
9614
9540
  stage = graphic.stage;
9615
9541
  if (!context || !stage) return null;
9616
9542
  if (pickParams.in3dInterceptor = !0, context.save(), this.initCanvasCtx(context), context.camera = stage.camera, graphic.isContainer) {
9617
- let result,
9618
- isPie = !1,
9619
- is3d = !1;
9620
- if (graphic.forEachChildren(c => (isPie = c.numberType === ARC3D_NUMBER_TYPE, !isPie)), graphic.forEachChildren(c => (is3d = !!c.findFace, !is3d)), isPie) {
9621
- const children = graphic.getChildren(),
9622
- sortedChildren = [...children];
9623
- sortedChildren.sort((a, b) => {
9624
- var _a, _b, _c, _d;
9625
- let angle1 = (null !== (_b = null !== (_a = a.attribute.startAngle) && void 0 !== _a ? _a : 0 + a.attribute.endAngle) && void 0 !== _b ? _b : 0) / 2,
9626
- angle2 = (null !== (_d = null !== (_c = b.attribute.startAngle) && void 0 !== _c ? _c : 0 + b.attribute.endAngle) && void 0 !== _d ? _d : 0) / 2;
9627
- for (; angle1 < 0;) angle1 += pi2;
9628
- for (; angle2 < 0;) angle2 += pi2;
9629
- return angle2 - angle1;
9630
- }), sortedChildren.forEach(c => {
9631
- c._next = null, c._prev = null;
9632
- }), graphic.removeAllChild(), graphic.update(), sortedChildren.forEach(c => {
9633
- graphic.appendChild(c);
9634
- }), pickParams.hack_pieFace = "outside", result = pickerService.pickGroup(graphic, point, params.parentMatrix, pickParams), result.graphic || (pickParams.hack_pieFace = "inside", result = pickerService.pickGroup(graphic, point, params.parentMatrix, pickParams)), result.graphic || (pickParams.hack_pieFace = "top", result = pickerService.pickGroup(graphic, point, params.parentMatrix, pickParams)), graphic.removeAllChild(), children.forEach(c => {
9635
- c._next = null, c._prev = null;
9636
- }), children.forEach(c => {
9637
- graphic.appendChild(c);
9638
- });
9639
- } else if (is3d) {
9640
- const children = graphic.getChildren(),
9641
- zChildren = children.map(g => ({
9642
- ave_z: g.findFace().vertices.map(v => {
9643
- var _a;
9644
- return context.view(v[0], v[1], null !== (_a = v[2] + g.attribute.z) && void 0 !== _a ? _a : 0)[2];
9645
- }).reduce((a, b) => a + b, 0),
9646
- g: g
9647
- }));
9648
- zChildren.sort((a, b) => b.ave_z - a.ave_z), graphic.removeAllChild(), zChildren.forEach(i => {
9649
- i.g._next = null, i.g._prev = null;
9650
- }), graphic.update(), zChildren.forEach(i => {
9651
- graphic.add(i.g);
9652
- }), result = pickerService.pickGroup(graphic, point, params.parentMatrix, pickParams), graphic.removeAllChild(), children.forEach(g => {
9653
- g._next = null, g._prev = null;
9654
- }), graphic.update(), children.forEach(g => {
9655
- graphic.add(g);
9656
- });
9657
- } else result = pickerService.pickGroup(graphic, point, params.parentMatrix, pickParams);
9543
+ const result = draw3dItem(context, graphic, () => pickerService.pickGroup(graphic, point, params.parentMatrix, pickParams), pickParams);
9658
9544
  return context.camera = null, pickParams.in3dInterceptor = !1, context.restore(), result;
9659
9545
  }
9660
9546
  return context.restore(), null;
@@ -9663,7 +9549,7 @@ let Canvas3DPickItemInterceptor = class {
9663
9549
  context.setTransformForCurrent();
9664
9550
  }
9665
9551
  };
9666
- Canvas3DPickItemInterceptor = __decorate$x([injectable()], Canvas3DPickItemInterceptor);
9552
+ Canvas3DPickItemInterceptor = __decorate$w([injectable()], Canvas3DPickItemInterceptor);
9667
9553
 
9668
9554
  var pickModule = new ContainerModule((bind, unbind, isBound) => {
9669
9555
  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);
@@ -9676,7 +9562,7 @@ var graphicModule = new ContainerModule(bind => {
9676
9562
  const AutoEnablePlugins = Symbol.for("AutoEnablePlugins");
9677
9563
  const PluginService = Symbol.for("PluginService");
9678
9564
 
9679
- var __decorate$w = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9565
+ var __decorate$v = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9680
9566
  var d,
9681
9567
  c = arguments.length,
9682
9568
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -9726,7 +9612,7 @@ let DefaultPluginService = class {
9726
9612
  }), this.onRegisterPlugin = [];
9727
9613
  }
9728
9614
  };
9729
- DefaultPluginService = __decorate$w([injectable(), __param$l(0, inject(ContributionProvider)), __param$l(0, named(AutoEnablePlugins)), __metadata$p("design:paramtypes", [Object])], DefaultPluginService);
9615
+ DefaultPluginService = __decorate$v([injectable(), __param$l(0, inject(ContributionProvider)), __param$l(0, named(AutoEnablePlugins)), __metadata$p("design:paramtypes", [Object])], DefaultPluginService);
9730
9616
 
9731
9617
  var pluginModule = new ContainerModule(bind => {
9732
9618
  bind(PluginService).to(DefaultPluginService), bindContributionProviderNoSingletonScope(bind, AutoEnablePlugins);
@@ -9740,7 +9626,7 @@ var textMeasureModules = new ContainerModule(bind => {
9740
9626
  bind(TextMeasureContribution).to(DefaultTextMeasureContribution).inSingletonScope(), bindContributionProvider(bind, TextMeasureContribution);
9741
9627
  });
9742
9628
 
9743
- var __decorate$v = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9629
+ var __decorate$u = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9744
9630
  var d,
9745
9631
  c = arguments.length,
9746
9632
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -9817,9 +9703,9 @@ let CanvasLayerHandlerContribution = class {
9817
9703
  this.canvas.release();
9818
9704
  }
9819
9705
  };
9820
- CanvasLayerHandlerContribution = __decorate$v([injectable(), __metadata$o("design:paramtypes", [])], CanvasLayerHandlerContribution);
9706
+ CanvasLayerHandlerContribution = __decorate$u([injectable(), __metadata$o("design:paramtypes", [])], CanvasLayerHandlerContribution);
9821
9707
 
9822
- var __decorate$u = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9708
+ var __decorate$t = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9823
9709
  var d,
9824
9710
  c = arguments.length,
9825
9711
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -9861,9 +9747,9 @@ let EmptyLayerHandlerContribution = class {
9861
9747
  }
9862
9748
  release() {}
9863
9749
  };
9864
- EmptyLayerHandlerContribution = __decorate$u([injectable(), __metadata$n("design:paramtypes", [])], EmptyLayerHandlerContribution);
9750
+ EmptyLayerHandlerContribution = __decorate$t([injectable(), __metadata$n("design:paramtypes", [])], EmptyLayerHandlerContribution);
9865
9751
 
9866
- var __decorate$t = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9752
+ var __decorate$s = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9867
9753
  var d,
9868
9754
  c = arguments.length,
9869
9755
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -9933,7 +9819,7 @@ let OffscreenLayerHandlerContribution = class {
9933
9819
  }
9934
9820
  merge(layerHandlers) {}
9935
9821
  };
9936
- OffscreenLayerHandlerContribution = __decorate$t([injectable(), __metadata$m("design:paramtypes", [])], OffscreenLayerHandlerContribution);
9822
+ OffscreenLayerHandlerContribution = __decorate$s([injectable(), __metadata$m("design:paramtypes", [])], OffscreenLayerHandlerContribution);
9937
9823
 
9938
9824
  var layerHandlerModules = new ContainerModule(bind => {
9939
9825
  bind(CanvasLayerHandlerContribution).toSelf(), bind(OffscreenLayerHandlerContribution).toSelf(), bind(EmptyLayerHandlerContribution).toSelf(), bind(StaticLayerHandlerContribution).toService(CanvasLayerHandlerContribution), bind(DynamicLayerHandlerContribution).toService(OffscreenLayerHandlerContribution), bind(VirtualLayerHandlerContribution).toService(EmptyLayerHandlerContribution);
@@ -9968,11 +9854,22 @@ var __awaiter$2 = undefined && undefined.__awaiter || function (thisArg, _argume
9968
9854
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9969
9855
  });
9970
9856
  };
9857
+ function parseChildMap(graphic, defaultZIndex, reverse) {
9858
+ const childMap = {},
9859
+ zIdxArray = [];
9860
+ return graphic.forEachChildren(item => {
9861
+ const {
9862
+ zIndex = defaultZIndex
9863
+ } = item.attribute;
9864
+ childMap[zIndex] ? childMap[zIndex].push(item) : (childMap[zIndex] = [item], zIdxArray.push(zIndex));
9865
+ }, reverse), zIdxArray.sort((a, b) => reverse ? b - a : a - b), {
9866
+ childMap: childMap,
9867
+ zIdxArray: zIdxArray
9868
+ };
9869
+ }
9971
9870
  function foreach(graphic, defaultZIndex, cb) {
9972
9871
  let reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
9973
9872
  let sort3d = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
9974
- const childMap = {},
9975
- zIdxArray = [];
9976
9873
  let needSort = !1;
9977
9874
  if (sort3d) needSort = !0;else {
9978
9875
  let lastZIndex;
@@ -9985,16 +9882,13 @@ function foreach(graphic, defaultZIndex, cb) {
9985
9882
  }, reverse);
9986
9883
  }
9987
9884
  if (needSort) {
9988
- graphic.forEachChildren(item => {
9989
- const {
9990
- zIndex = defaultZIndex
9991
- } = item.attribute;
9992
- childMap[zIndex] ? childMap[zIndex].push(item) : (childMap[zIndex] = [item], zIdxArray.push(zIndex));
9993
- }, reverse), zIdxArray.sort((a, b) => reverse ? b - a : a - b);
9885
+ const {
9886
+ childMap: childMap,
9887
+ zIdxArray: zIdxArray
9888
+ } = parseChildMap(graphic, defaultZIndex, reverse);
9994
9889
  let skip = !1;
9995
9890
  for (let i = 0; i < zIdxArray.length && !skip; i++) {
9996
- const idx = zIdxArray[i],
9997
- children = childMap[idx];
9891
+ const children = childMap[zIdxArray[i]];
9998
9892
  sort3d && children.sort((a, b) => {
9999
9893
  var _a, _b;
10000
9894
  return (reverse ? -1 : 1) * ((null !== (_a = b.attribute.z) && void 0 !== _a ? _a : 0) - (null !== (_b = a.attribute.z) && void 0 !== _b ? _b : 0));
@@ -10014,8 +9908,6 @@ function foreachAsync(graphic, defaultZIndex, cb) {
10014
9908
  }
10015
9909
  function findNextGraphic(graphic, id, defaultZIndex) {
10016
9910
  let reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
10017
- const childMap = {},
10018
- zIdxArray = [];
10019
9911
  let needSort = !1;
10020
9912
  graphic.forEachChildren((item, i) => {
10021
9913
  const {
@@ -10027,16 +9919,13 @@ function findNextGraphic(graphic, id, defaultZIndex) {
10027
9919
  let result = null,
10028
9920
  next = !1;
10029
9921
  if (needSort) {
10030
- graphic.forEachChildren(item => {
10031
- const {
10032
- zIndex = defaultZIndex
10033
- } = item.attribute;
10034
- childMap[zIndex] ? childMap[zIndex].push(item) : (childMap[zIndex] = [item], zIdxArray.push(zIndex));
10035
- }, reverse), zIdxArray.sort((a, b) => reverse ? b - a : a - b);
9922
+ const {
9923
+ childMap: childMap,
9924
+ zIdxArray: zIdxArray
9925
+ } = parseChildMap(graphic, defaultZIndex, reverse);
10036
9926
  let skip = !1;
10037
9927
  for (let i = 0; i < zIdxArray.length && !skip; i++) {
10038
- const idx = zIdxArray[i],
10039
- children = childMap[idx];
9928
+ const children = childMap[zIdxArray[i]];
10040
9929
  for (let i = 0; i < children.length; i++) {
10041
9930
  if (next) {
10042
9931
  skip = !0, result = children[i];
@@ -10049,7 +9938,7 @@ function findNextGraphic(graphic, id, defaultZIndex) {
10049
9938
  return result;
10050
9939
  }
10051
9940
 
10052
- var __decorate$s = undefined && undefined.__decorate || function (decorators, target, key, desc) {
9941
+ var __decorate$r = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10053
9942
  var d,
10054
9943
  c = arguments.length,
10055
9944
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -10246,9 +10135,9 @@ let DefaultDrawContribution = class {
10246
10135
  }
10247
10136
  afterDraw(renderService, drawParams) {}
10248
10137
  };
10249
- 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);
10138
+ DefaultDrawContribution = __decorate$r([injectable(), __param$k(0, multiInject(GraphicRender)), __param$k(1, inject(ContributionProvider)), __param$k(1, named(DrawItemInterceptor)), __metadata$l("design:paramtypes", [Array, Object])], DefaultDrawContribution);
10250
10139
 
10251
- var __decorate$r = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10140
+ var __decorate$q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10252
10141
  var d,
10253
10142
  c = arguments.length,
10254
10143
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -10340,9 +10229,9 @@ let DefaultCanvasGroupRender = class {
10340
10229
  }) : clip ? context.restore() : context.highPerformanceRestore();
10341
10230
  }
10342
10231
  };
10343
- DefaultCanvasGroupRender = __decorate$r([injectable(), __param$j(0, inject(ContributionProvider)), __param$j(0, named(GroupRenderContribution)), __metadata$k("design:paramtypes", [Object])], DefaultCanvasGroupRender);
10232
+ DefaultCanvasGroupRender = __decorate$q([injectable(), __param$j(0, inject(ContributionProvider)), __param$j(0, named(GroupRenderContribution)), __metadata$k("design:paramtypes", [Object])], DefaultCanvasGroupRender);
10344
10233
 
10345
- var __decorate$q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10234
+ var __decorate$p = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10346
10235
  var d,
10347
10236
  c = arguments.length,
10348
10237
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -10393,9 +10282,9 @@ let DefaultIncrementalCanvasLineRender = class extends DefaultCanvasLineRender {
10393
10282
  }), context.setShadowBlendStyle && context.setShadowBlendStyle(line, attribute, defaultAttribute), context.setStrokeStyle(line, attribute, offsetX, offsetY, defaultAttribute), context.stroke());
10394
10283
  }
10395
10284
  };
10396
- DefaultIncrementalCanvasLineRender = __decorate$q([injectable()], DefaultIncrementalCanvasLineRender);
10285
+ DefaultIncrementalCanvasLineRender = __decorate$p([injectable()], DefaultIncrementalCanvasLineRender);
10397
10286
 
10398
- var __decorate$p = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10287
+ var __decorate$o = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10399
10288
  var d,
10400
10289
  c = arguments.length,
10401
10290
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -10438,10 +10327,10 @@ let DefaultIncrementalCanvasAreaRender = class extends DefaultCanvasAreaRender {
10438
10327
  }), context.setShadowBlendStyle && context.setShadowBlendStyle(area, attribute, defaultAttribute), context.setCommonStyle(area, attribute, offsetX, offsetY, defaultAttribute), context.fill());
10439
10328
  }
10440
10329
  };
10441
- DefaultIncrementalCanvasAreaRender = __decorate$p([injectable()], DefaultIncrementalCanvasAreaRender);
10330
+ DefaultIncrementalCanvasAreaRender = __decorate$o([injectable()], DefaultIncrementalCanvasAreaRender);
10442
10331
 
10443
10332
  var STATUS,
10444
- __decorate$o = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10333
+ __decorate$n = undefined && undefined.__decorate || function (decorators, target, key, desc) {
10445
10334
  var d,
10446
10335
  c = arguments.length,
10447
10336
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -10581,7 +10470,7 @@ let DefaultIncrementalDrawContribution = class extends DefaultDrawContribution {
10581
10470
  });
10582
10471
  }
10583
10472
  };
10584
- DefaultIncrementalDrawContribution = __decorate$o([injectable(), __param$i(0, multiInject(GraphicRender)), __param$i(1, inject(DefaultIncrementalCanvasLineRender)), __param$i(2, inject(DefaultIncrementalCanvasAreaRender)), __param$i(3, inject(ContributionProvider)), __param$i(3, named(DrawItemInterceptor)), __metadata$j("design:paramtypes", [Array, Object, Object, Object])], DefaultIncrementalDrawContribution);
10473
+ DefaultIncrementalDrawContribution = __decorate$n([injectable(), __param$i(0, multiInject(GraphicRender)), __param$i(1, inject(DefaultIncrementalCanvasLineRender)), __param$i(2, inject(DefaultIncrementalCanvasAreaRender)), __param$i(3, inject(ContributionProvider)), __param$i(3, named(DrawItemInterceptor)), __metadata$j("design:paramtypes", [Array, Object, Object, Object])], DefaultIncrementalDrawContribution);
10585
10474
 
10586
10475
  var renderModule = new ContainerModule(bind => {
10587
10476
  bind(DefaultBaseBackgroundRenderContribution).toSelf().inSingletonScope(), bind(DefaultBaseTextureRenderContribution).toSelf().inSingletonScope(), bind(DrawContribution).to(DefaultDrawContribution), bind(IncrementalDrawContribution).to(DefaultIncrementalDrawContribution), bind(GroupRender).to(DefaultCanvasGroupRender).inSingletonScope(), bind(GraphicRender).toService(GroupRender), bindContributionProvider(bind, GroupRenderContribution), bind(DefaultBaseInteractiveRenderContribution).toSelf().inSingletonScope(), bindContributionProvider(bind, InteractiveSubRenderContribution), bindContributionProvider(bind, GraphicRender), bind(CommonDrawItemInterceptorContribution).toSelf().inSingletonScope(), bind(DrawItemInterceptor).toService(CommonDrawItemInterceptorContribution), bindContributionProvider(bind, DrawItemInterceptor);
@@ -11809,9 +11698,7 @@ class CustomSymbolClass {
11809
11698
  }), !1) : (renderCommandList(this.path.commandList, ctx, x, y, size + offset, size + offset), !1);
11810
11699
  }
11811
11700
  draw(ctx, size, x, y, z, cb) {
11812
- return this.isSvg ? !!this.svgCache && (this.svgCache.forEach(item => {
11813
- ctx.beginPath(), renderCommandList(item.path.commandList, ctx, x, y, size, size), cb && cb(item.path, item.attribute);
11814
- }), !1) : (renderCommandList(this.path.commandList, ctx, x, y, size, size), !1);
11701
+ return this.drawOffset(ctx, size, x, y, 0, z, cb);
11815
11702
  }
11816
11703
  bounds(size, bounds) {
11817
11704
  if (this.isSvg) {
@@ -12651,10 +12538,10 @@ class RichText extends Graphic {
12651
12538
  strokeOpacity: strokeOpacity
12652
12539
  }, config);
12653
12540
  }
12654
- doUpdateFrameCache() {
12541
+ doUpdateFrameCache(tc) {
12655
12542
  var _a;
12656
12543
  const {
12657
- textConfig = [],
12544
+ textConfig: _tc = [],
12658
12545
  maxWidth: maxWidth,
12659
12546
  maxHeight: maxHeight,
12660
12547
  width: width,
@@ -12668,7 +12555,8 @@ class RichText extends Graphic {
12668
12555
  singleLine: singleLine,
12669
12556
  disableAutoWrapLine: disableAutoWrapLine
12670
12557
  } = this.attribute,
12671
- paragraphs = [];
12558
+ paragraphs = [],
12559
+ textConfig = null != tc ? tc : _tc;
12672
12560
  for (let i = 0; i < textConfig.length; i++) if ("image" in textConfig[i]) {
12673
12561
  const config = this.combinedStyleToCharacter(textConfig[i]),
12674
12562
  iconCache = config.id && this._frameCache && this._frameCache.icons && this._frameCache.icons.get(config.id);
@@ -13226,7 +13114,7 @@ const polygonModule = new ContainerModule(bind => {
13226
13114
  loadPolygonModule || (loadPolygonModule = !0, bind(PolygonRender).to(DefaultCanvasPolygonRender).inSingletonScope(), bind(GraphicRender).toService(PolygonRender), bind(PolygonRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bindContributionProvider(bind, PolygonRenderContribution));
13227
13115
  });
13228
13116
 
13229
- var __decorate$n = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13117
+ var __decorate$m = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13230
13118
  var d,
13231
13119
  c = arguments.length,
13232
13120
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -13287,7 +13175,7 @@ let DefaultCanvasRichTextRender = class extends BaseRender {
13287
13175
  this._draw(richtext, richtextAttribute, !1, drawContext);
13288
13176
  }
13289
13177
  };
13290
- DefaultCanvasRichTextRender = __decorate$n([injectable(), __metadata$i("design:paramtypes", [])], DefaultCanvasRichTextRender);
13178
+ DefaultCanvasRichTextRender = __decorate$m([injectable(), __metadata$i("design:paramtypes", [])], DefaultCanvasRichTextRender);
13291
13179
 
13292
13180
  let loadRichtextModule = !1;
13293
13181
  const richtextModule = new ContainerModule(bind => {
@@ -13480,7 +13368,35 @@ const CanvasPolygonPicker = Symbol.for("CanvasPolygonPicker");
13480
13368
  const CanvasRichTextPicker = Symbol.for("CanvasRichTextPicker");
13481
13369
  const CanvasPickerContribution = Symbol.for("CanvasPickerContribution");
13482
13370
 
13483
- var __decorate$m = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13371
+ class PickerBase {
13372
+ contains(graphic, point, params) {
13373
+ if (!graphic.AABBBounds.containsPoint(point)) return !1;
13374
+ if ("imprecise" === graphic.attribute.pickMode) return !0;
13375
+ const {
13376
+ pickContext: pickContext
13377
+ } = null != params ? params : {};
13378
+ if (!pickContext) return !1;
13379
+ const attribute = getTheme(graphic)[graphic.type];
13380
+ pickContext.highPerformanceSave();
13381
+ let {
13382
+ x = attribute.x,
13383
+ y = attribute.y
13384
+ } = graphic.attribute;
13385
+ if (graphic.transMatrix.onlyTranslate()) {
13386
+ const point = graphic.getOffsetXY(attribute);
13387
+ x += point.x, y += point.y, pickContext.setTransformForCurrent();
13388
+ } else x = 0, y = 0, pickContext.transformFromMatrix(graphic.transMatrix, !0);
13389
+ let picked = !1;
13390
+ return this.canvasRenderer.drawShape(graphic, pickContext, x, y, {}, null, (context, arcAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, arcAttribute, themeAttribute) => {
13391
+ if (picked) return !0;
13392
+ const lineWidth = arcAttribute.lineWidth || themeAttribute.lineWidth,
13393
+ pickStrokeBuffer = arcAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
13394
+ return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
13395
+ }), pickContext.highPerformanceRestore(), picked;
13396
+ }
13397
+ }
13398
+
13399
+ var __decorate$l = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13484
13400
  var d,
13485
13401
  c = arguments.length,
13486
13402
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -13495,44 +13411,19 @@ var __decorate$m = undefined && undefined.__decorate || function (decorators, ta
13495
13411
  decorator(target, key, paramIndex);
13496
13412
  };
13497
13413
  };
13498
- let DefaultMathArcPicker = class {
13414
+ let DefaultMathArcPicker = class extends PickerBase {
13499
13415
  constructor(canvasRenderer) {
13500
- this.canvasRenderer = canvasRenderer, this.type = "arc", this.numberType = ARC_NUMBER_TYPE;
13501
- }
13502
- contains(arc, point, params) {
13503
- if (!arc.AABBBounds.containsPoint(point)) return !1;
13504
- if ("imprecise" === arc.attribute.pickMode) return !0;
13505
- const {
13506
- pickContext: pickContext
13507
- } = null != params ? params : {};
13508
- if (!pickContext) return !1;
13509
- const arcAttribute = getTheme(arc).arc;
13510
- pickContext.highPerformanceSave();
13511
- let {
13512
- x = arcAttribute.x,
13513
- y = arcAttribute.y
13514
- } = arc.attribute;
13515
- if (arc.transMatrix.onlyTranslate()) {
13516
- const point = arc.getOffsetXY(arcAttribute);
13517
- x += point.x, y += point.y, pickContext.setTransformForCurrent();
13518
- } else x = 0, y = 0, pickContext.transformFromMatrix(arc.transMatrix, !0);
13519
- let picked = !1;
13520
- return this.canvasRenderer.drawShape(arc, pickContext, x, y, {}, null, (context, arcAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, arcAttribute, themeAttribute) => {
13521
- if (picked) return !0;
13522
- const lineWidth = arcAttribute.lineWidth || themeAttribute.lineWidth,
13523
- pickStrokeBuffer = arcAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
13524
- return pickContext.lineWidth = lineWidth + pickStrokeBuffer, picked = context.isPointInStroke(point.x, point.y), picked;
13525
- }), pickContext.highPerformanceRestore(), picked;
13416
+ super(), this.canvasRenderer = canvasRenderer, this.type = "arc", this.numberType = ARC_NUMBER_TYPE;
13526
13417
  }
13527
13418
  };
13528
- DefaultMathArcPicker = __decorate$m([injectable(), __param$h(0, inject(ArcRender)), __metadata$h("design:paramtypes", [Object])], DefaultMathArcPicker);
13419
+ DefaultMathArcPicker = __decorate$l([injectable(), __param$h(0, inject(ArcRender)), __metadata$h("design:paramtypes", [Object])], DefaultMathArcPicker);
13529
13420
 
13530
13421
  let loadArcPick$1 = !1;
13531
13422
  const arcMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
13532
13423
  loadArcPick$1 || (loadArcPick$1 = !0, bind(MathArcPicker).to(DefaultMathArcPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathArcPicker));
13533
13424
  });
13534
13425
 
13535
- var __decorate$l = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13426
+ var __decorate$k = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13536
13427
  var d,
13537
13428
  c = arguments.length,
13538
13429
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -13547,38 +13438,19 @@ var __decorate$l = undefined && undefined.__decorate || function (decorators, ta
13547
13438
  decorator(target, key, paramIndex);
13548
13439
  };
13549
13440
  };
13550
- let DefaultMathAreaPicker = class {
13441
+ let DefaultMathAreaPicker = class extends PickerBase {
13551
13442
  constructor(canvasRenderer) {
13552
- this.canvasRenderer = canvasRenderer, this.type = "area", this.numberType = AREA_NUMBER_TYPE;
13553
- }
13554
- contains(area, point, params) {
13555
- if (!area.AABBBounds.containsPoint(point)) return !1;
13556
- if ("imprecise" === area.attribute.pickMode) return !0;
13557
- const {
13558
- pickContext: pickContext
13559
- } = null != params ? params : {};
13560
- if (!pickContext) return !1;
13561
- const areaAttribute = getTheme(area).area;
13562
- let {
13563
- x = areaAttribute.x,
13564
- y = areaAttribute.y
13565
- } = area.attribute;
13566
- if (pickContext.highPerformanceSave(), area.transMatrix.onlyTranslate()) {
13567
- const point = area.getOffsetXY(areaAttribute);
13568
- x += point.x, y += point.y, pickContext.setTransformForCurrent();
13569
- } else x = 0, y = 0, pickContext.transformFromMatrix(area.transMatrix, !0);
13570
- let picked = !1;
13571
- return this.canvasRenderer.drawShape(area, pickContext, x, y, {}, null, context => !!picked || (picked = context.isPointInPath(point.x, point.y), picked)), pickContext.highPerformanceRestore(), picked;
13443
+ super(), this.canvasRenderer = canvasRenderer, this.type = "area", this.numberType = AREA_NUMBER_TYPE;
13572
13444
  }
13573
13445
  };
13574
- DefaultMathAreaPicker = __decorate$l([injectable(), __param$g(0, inject(AreaRender)), __metadata$g("design:paramtypes", [Object])], DefaultMathAreaPicker);
13446
+ DefaultMathAreaPicker = __decorate$k([injectable(), __param$g(0, inject(AreaRender)), __metadata$g("design:paramtypes", [Object])], DefaultMathAreaPicker);
13575
13447
 
13576
13448
  let loadAreaPick$1 = !1;
13577
13449
  const areaMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
13578
13450
  loadAreaPick$1 || (loadAreaPick$1 = !0, bind(MathAreaPicker).to(DefaultMathAreaPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathAreaPicker));
13579
13451
  });
13580
13452
 
13581
- var __decorate$k = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13453
+ var __decorate$j = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13582
13454
  var d,
13583
13455
  c = arguments.length,
13584
13456
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -13593,43 +13465,19 @@ var __decorate$k = undefined && undefined.__decorate || function (decorators, ta
13593
13465
  decorator(target, key, paramIndex);
13594
13466
  };
13595
13467
  };
13596
- let DefaultMathCirclePicker = class {
13468
+ let DefaultMathCirclePicker = class extends PickerBase {
13597
13469
  constructor(canvasRenderer) {
13598
- this.canvasRenderer = canvasRenderer, this.type = "circle", this.numberType = CIRCLE_NUMBER_TYPE;
13599
- }
13600
- contains(circle, point, params) {
13601
- if (!circle.AABBBounds.containsPoint(point)) return !1;
13602
- if ("imprecise" === circle.attribute.pickMode) return !0;
13603
- const {
13604
- pickContext: pickContext
13605
- } = null != params ? params : {};
13606
- if (!pickContext) return !1;
13607
- const circleAttribute = getTheme(circle).circle;
13608
- let {
13609
- x = circleAttribute.x,
13610
- y = circleAttribute.y
13611
- } = circle.attribute;
13612
- if (pickContext.highPerformanceSave(), circle.transMatrix.onlyTranslate()) {
13613
- const point = circle.getOffsetXY(circleAttribute);
13614
- x += point.x, y += point.y, pickContext.setTransformForCurrent();
13615
- } else x = 0, y = 0, pickContext.transformFromMatrix(circle.transMatrix, !0);
13616
- let picked = !1;
13617
- return this.canvasRenderer.drawShape(circle, pickContext, x, y, {}, null, (context, circleAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, circleAttribute, themeAttribute) => {
13618
- if (picked) return !0;
13619
- const lineWidth = circleAttribute.lineWidth || themeAttribute.lineWidth,
13620
- pickStrokeBuffer = circleAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
13621
- return pickContext.lineWidth = lineWidth + pickStrokeBuffer, picked = context.isPointInStroke(point.x, point.y), picked;
13622
- }), pickContext.highPerformanceRestore(), picked;
13470
+ super(), this.canvasRenderer = canvasRenderer, this.type = "circle", this.numberType = CIRCLE_NUMBER_TYPE;
13623
13471
  }
13624
13472
  };
13625
- DefaultMathCirclePicker = __decorate$k([injectable(), __param$f(0, inject(CircleRender)), __metadata$f("design:paramtypes", [Object])], DefaultMathCirclePicker);
13473
+ DefaultMathCirclePicker = __decorate$j([injectable(), __param$f(0, inject(CircleRender)), __metadata$f("design:paramtypes", [Object])], DefaultMathCirclePicker);
13626
13474
 
13627
13475
  let loadCirclePick$1 = !1;
13628
13476
  const circleMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
13629
13477
  loadCirclePick$1 || (loadCirclePick$1 = !0, bind(MathCirclePicker).to(DefaultMathCirclePicker).inSingletonScope(), bind(MathPickerContribution).toService(MathCirclePicker));
13630
13478
  });
13631
13479
 
13632
- var __decorate$j = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13480
+ var __decorate$i = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13633
13481
  var d,
13634
13482
  c = arguments.length,
13635
13483
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -13647,14 +13495,14 @@ let DefaultMathImagePicker = class {
13647
13495
  return !!pickContext && !!image.AABBBounds.containsPoint(point);
13648
13496
  }
13649
13497
  };
13650
- DefaultMathImagePicker = __decorate$j([injectable()], DefaultMathImagePicker);
13498
+ DefaultMathImagePicker = __decorate$i([injectable()], DefaultMathImagePicker);
13651
13499
 
13652
13500
  let loadImagePick$1 = !1;
13653
13501
  const imageMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
13654
13502
  loadImagePick$1 || (loadImagePick$1 = !0, bind(MathImagePicker).to(DefaultMathImagePicker).inSingletonScope(), bind(DefaultMathImagePicker).toService(MathImagePicker));
13655
13503
  });
13656
13504
 
13657
- var __decorate$i = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13505
+ var __decorate$h = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13658
13506
  var d,
13659
13507
  c = arguments.length,
13660
13508
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -13669,43 +13517,19 @@ var __decorate$i = undefined && undefined.__decorate || function (decorators, ta
13669
13517
  decorator(target, key, paramIndex);
13670
13518
  };
13671
13519
  };
13672
- let DefaultMathLinePicker = class {
13520
+ let DefaultMathLinePicker = class extends PickerBase {
13673
13521
  constructor(canvasRenderer) {
13674
- this.canvasRenderer = canvasRenderer, this.type = "line", this.numberType = LINE_NUMBER_TYPE;
13675
- }
13676
- contains(line, point, params) {
13677
- if (!line.AABBBounds.containsPoint(point)) return !1;
13678
- if ("imprecise" === line.attribute.pickMode) return !0;
13679
- const {
13680
- pickContext: pickContext
13681
- } = null != params ? params : {};
13682
- if (!pickContext) return !1;
13683
- const lineAttribute = getTheme(line).line;
13684
- let {
13685
- x = lineAttribute.x,
13686
- y = lineAttribute.y
13687
- } = line.attribute;
13688
- if (pickContext.highPerformanceSave(), line.transMatrix.onlyTranslate()) {
13689
- const point = line.getOffsetXY(lineAttribute);
13690
- x += point.x, y += point.y, pickContext.setTransformForCurrent();
13691
- } else x = 0, y = 0, pickContext.transformFromMatrix(line.transMatrix, !0);
13692
- let picked = !1;
13693
- return this.canvasRenderer.drawShape(line, pickContext, x, y, {}, null, context => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, circleAttribute, themeAttribute) => {
13694
- if (picked) return !0;
13695
- const lineWidth = circleAttribute.lineWidth || themeAttribute.lineWidth,
13696
- pickStrokeBuffer = circleAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
13697
- return pickContext.lineWidth = lineWidth + pickStrokeBuffer, picked = context.isPointInStroke(point.x, point.y), picked;
13698
- }), pickContext.highPerformanceRestore(), picked;
13522
+ super(), this.canvasRenderer = canvasRenderer, this.type = "line", this.numberType = LINE_NUMBER_TYPE;
13699
13523
  }
13700
13524
  };
13701
- DefaultMathLinePicker = __decorate$i([injectable(), __param$e(0, inject(LineRender)), __metadata$e("design:paramtypes", [Object])], DefaultMathLinePicker);
13525
+ DefaultMathLinePicker = __decorate$h([injectable(), __param$e(0, inject(LineRender)), __metadata$e("design:paramtypes", [Object])], DefaultMathLinePicker);
13702
13526
 
13703
13527
  let loadLinePick$1 = !1;
13704
13528
  const lineMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
13705
13529
  loadLinePick$1 || (loadLinePick$1 = !0, bind(MathLinePicker).to(DefaultMathLinePicker).inSingletonScope(), bind(MathPickerContribution).toService(MathLinePicker));
13706
13530
  });
13707
13531
 
13708
- var __decorate$h = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13532
+ var __decorate$g = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13709
13533
  var d,
13710
13534
  c = arguments.length,
13711
13535
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -13720,42 +13544,19 @@ var __decorate$h = undefined && undefined.__decorate || function (decorators, ta
13720
13544
  decorator(target, key, paramIndex);
13721
13545
  };
13722
13546
  };
13723
- let DefaultMathPolygonPicker = class {
13547
+ let DefaultMathPolygonPicker = class extends PickerBase {
13724
13548
  constructor(canvasRenderer) {
13725
- this.canvasRenderer = canvasRenderer, this.type = "polygon", this.numberType = POLYGON_NUMBER_TYPE;
13726
- }
13727
- contains(polygon, point, params) {
13728
- if (!polygon.AABBBounds.contains(point.x, point.y)) return !1;
13729
- const {
13730
- pickContext: pickContext
13731
- } = null != params ? params : {};
13732
- if (!pickContext) return !1;
13733
- const pathAttribute = getTheme(polygon).polygon;
13734
- let {
13735
- x = pathAttribute.x,
13736
- y = pathAttribute.y
13737
- } = polygon.attribute;
13738
- if (pickContext.highPerformanceSave(), polygon.transMatrix.onlyTranslate()) {
13739
- const point = polygon.getOffsetXY(pathAttribute);
13740
- x += point.x, y += point.y, pickContext.setTransformForCurrent();
13741
- } else x = 0, y = 0, pickContext.transformFromMatrix(polygon.transMatrix, !0);
13742
- let picked = !1;
13743
- return this.canvasRenderer.drawShape(polygon, pickContext, x, y, {}, null, (context, pathAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, pathAttribute, themeAttribute) => {
13744
- if (picked) return !0;
13745
- const lineWidth = pathAttribute.lineWidth || themeAttribute.lineWidth,
13746
- pickStrokeBuffer = pathAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
13747
- return pickContext.lineWidth = lineWidth + pickStrokeBuffer, picked = context.isPointInStroke(point.x, point.y), picked;
13748
- }), pickContext.highPerformanceRestore(), picked;
13549
+ super(), this.canvasRenderer = canvasRenderer, this.type = "polygon", this.numberType = POLYGON_NUMBER_TYPE;
13749
13550
  }
13750
13551
  };
13751
- DefaultMathPolygonPicker = __decorate$h([injectable(), __param$d(0, inject(PolygonRender)), __metadata$d("design:paramtypes", [Object])], DefaultMathPolygonPicker);
13552
+ DefaultMathPolygonPicker = __decorate$g([injectable(), __param$d(0, inject(PolygonRender)), __metadata$d("design:paramtypes", [Object])], DefaultMathPolygonPicker);
13752
13553
 
13753
13554
  let loadPolygonPick$1 = !1;
13754
13555
  const polygonMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
13755
13556
  loadPolygonPick$1 || (loadPolygonPick$1 = !0, bind(MathPolygonPicker).to(DefaultMathPolygonPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathPolygonPicker));
13756
13557
  });
13757
13558
 
13758
- var __decorate$g = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13559
+ var __decorate$f = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13759
13560
  var d,
13760
13561
  c = arguments.length,
13761
13562
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -13770,61 +13571,22 @@ var __decorate$g = undefined && undefined.__decorate || function (decorators, ta
13770
13571
  decorator(target, key, paramIndex);
13771
13572
  };
13772
13573
  };
13773
- let DefaultMathPathPicker = class {
13574
+ let DefaultMathPathPicker = class extends PickerBase {
13774
13575
  constructor(canvasRenderer) {
13775
- this.canvasRenderer = canvasRenderer, this.type = "path", this.numberType = PATH_NUMBER_TYPE;
13776
- }
13777
- contains(path, point, params) {
13778
- if (!path.AABBBounds.containsPoint(point)) return !1;
13779
- if ("imprecise" === path.attribute.pickMode) return !0;
13780
- const {
13781
- pickContext: pickContext
13782
- } = null != params ? params : {};
13783
- if (!pickContext) return !1;
13784
- const pathAttribute = getTheme(path).path;
13785
- let {
13786
- x = pathAttribute.x,
13787
- y = pathAttribute.y
13788
- } = path.attribute;
13789
- if (pickContext.highPerformanceSave(), path.transMatrix.onlyTranslate()) {
13790
- const point = path.getOffsetXY(pathAttribute);
13791
- x += point.x, y += point.y, pickContext.setTransformForCurrent();
13792
- } else x = 0, y = 0, pickContext.transformFromMatrix(path.transMatrix, !0);
13793
- let picked = !1;
13794
- return this.canvasRenderer.drawShape(path, pickContext, x, y, {}, null, (context, pathAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, pathAttribute, themeAttribute) => {
13795
- if (picked) return !0;
13796
- const lineWidth = pathAttribute.lineWidth || themeAttribute.lineWidth,
13797
- pickStrokeBuffer = pathAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
13798
- return pickContext.lineWidth = lineWidth + pickStrokeBuffer, picked = context.isPointInStroke(point.x, point.y), picked;
13799
- }), pickContext.highPerformanceRestore(), picked;
13576
+ super(), this.canvasRenderer = canvasRenderer, this.type = "path", this.numberType = PATH_NUMBER_TYPE;
13800
13577
  }
13801
13578
  };
13802
- DefaultMathPathPicker = __decorate$g([injectable(), __param$c(0, inject(PathRender)), __metadata$c("design:paramtypes", [Object])], DefaultMathPathPicker);
13579
+ DefaultMathPathPicker = __decorate$f([injectable(), __param$c(0, inject(PathRender)), __metadata$c("design:paramtypes", [Object])], DefaultMathPathPicker);
13803
13580
 
13804
13581
  let loadPathPick$1 = !1;
13805
13582
  const pathMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
13806
13583
  loadPathPick$1 || (loadPathPick$1 = !0, bind(MathPathPicker).to(DefaultMathPathPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathPathPicker));
13807
13584
  });
13808
13585
 
13809
- var __decorate$f = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13810
- var d,
13811
- c = arguments.length,
13812
- r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
13813
- 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);
13814
- return c > 3 && r && Object.defineProperty(target, key, r), r;
13815
- },
13816
- __metadata$b = undefined && undefined.__metadata || function (k, v) {
13817
- if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
13818
- },
13819
- __param$b = undefined && undefined.__param || function (paramIndex, decorator) {
13820
- return function (target, key) {
13821
- decorator(target, key, paramIndex);
13822
- };
13823
- };
13824
- const _bounds$1 = new AABBBounds();
13825
- let DefaultMathRectPicker = class {
13826
- constructor(canvasRenderer) {
13827
- this.canvasRenderer = canvasRenderer, this.type = "rect", this.numberType = RECT_NUMBER_TYPE;
13586
+ const _bounds = new AABBBounds();
13587
+ class RectPickerBase {
13588
+ constructor() {
13589
+ this.type = "rect", this.numberType = RECT_NUMBER_TYPE;
13828
13590
  }
13829
13591
  contains(rect, point, params) {
13830
13592
  if (!rect.AABBBounds.containsPoint(point)) return !1;
@@ -13848,12 +13610,12 @@ let DefaultMathRectPicker = class {
13848
13610
  x += point.x, y += point.y, pickContext.setTransformForCurrent();
13849
13611
  } else x = 0, y = 0, onlyTranslate = !1, pickContext.transformFromMatrix(rect.transMatrix, !0);
13850
13612
  let picked = !0;
13851
- if (!onlyTranslate || isNumber(cornerRadius, !0) && 0 !== cornerRadius || isArray(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
13613
+ if (!onlyTranslate || rect.shadowRoot || isNumber(cornerRadius, !0) && 0 !== cornerRadius || isArray(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
13852
13614
  if (picked) return !0;
13853
13615
  const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
13854
13616
  pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
13855
- return pickContext.lineWidth = lineWidth + pickStrokeBuffer, picked = context.isPointInStroke(point.x, point.y), picked;
13856
- });else if (picked) {
13617
+ return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
13618
+ });else {
13857
13619
  const {
13858
13620
  fill = rectAttribute.fill,
13859
13621
  stroke = rectAttribute.stroke,
@@ -13861,13 +13623,34 @@ let DefaultMathRectPicker = class {
13861
13623
  } = rect.attribute;
13862
13624
  if (fill) picked = !0;else if (stroke) {
13863
13625
  const bounds = rect.AABBBounds;
13864
- _bounds$1.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2), _bounds$1.expand(-lineWidth / 2), picked = !_bounds$1.containsPoint(point);
13626
+ _bounds.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2), _bounds.expand(-lineWidth / 2), picked = !_bounds.containsPoint(point);
13865
13627
  }
13866
13628
  }
13867
13629
  return pickContext.highPerformanceRestore(), picked;
13868
13630
  }
13631
+ }
13632
+
13633
+ var __decorate$e = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13634
+ var d,
13635
+ c = arguments.length,
13636
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
13637
+ 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);
13638
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
13639
+ },
13640
+ __metadata$b = undefined && undefined.__metadata || function (k, v) {
13641
+ if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
13642
+ },
13643
+ __param$b = undefined && undefined.__param || function (paramIndex, decorator) {
13644
+ return function (target, key) {
13645
+ decorator(target, key, paramIndex);
13646
+ };
13647
+ };
13648
+ let DefaultMathRectPicker = class extends RectPickerBase {
13649
+ constructor(canvasRenderer) {
13650
+ super(), this.canvasRenderer = canvasRenderer;
13651
+ }
13869
13652
  };
13870
- DefaultMathRectPicker = __decorate$f([injectable(), __param$b(0, inject(RectRender)), __metadata$b("design:paramtypes", [Object])], DefaultMathRectPicker);
13653
+ DefaultMathRectPicker = __decorate$e([injectable(), __param$b(0, inject(RectRender)), __metadata$b("design:paramtypes", [Object])], DefaultMathRectPicker);
13871
13654
 
13872
13655
  let loadRectPick$1 = !1;
13873
13656
  const rectMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
@@ -13879,7 +13662,7 @@ const richTextMathPickModule = new ContainerModule((bind, unbind, isBound, rebin
13879
13662
  loadRichTextPick || (loadRichTextPick = !0, bind(MathImagePicker).to(DefaultMathImagePicker).inSingletonScope(), bind(DefaultMathImagePicker).toService(MathImagePicker));
13880
13663
  });
13881
13664
 
13882
- var __decorate$e = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13665
+ var __decorate$d = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13883
13666
  var d,
13884
13667
  c = arguments.length,
13885
13668
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -13894,43 +13677,19 @@ var __decorate$e = undefined && undefined.__decorate || function (decorators, ta
13894
13677
  decorator(target, key, paramIndex);
13895
13678
  };
13896
13679
  };
13897
- let DefaultMathSymbolPicker = class {
13680
+ let DefaultMathSymbolPicker = class extends PickerBase {
13898
13681
  constructor(canvasRenderer) {
13899
- this.canvasRenderer = canvasRenderer, this.type = "symbol", this.numberType = SYMBOL_NUMBER_TYPE;
13900
- }
13901
- contains(symbol, point, params) {
13902
- if (!symbol.AABBBounds.containsPoint(point)) return !1;
13903
- if ("imprecise" === symbol.attribute.pickMode) return !0;
13904
- const {
13905
- pickContext: pickContext
13906
- } = null != params ? params : {};
13907
- if (!pickContext) return !1;
13908
- const symbolAttribute = getTheme(symbol).symbol;
13909
- let {
13910
- x = symbolAttribute.x,
13911
- y = symbolAttribute.y
13912
- } = symbol.attribute;
13913
- if (pickContext.highPerformanceSave(), symbol.transMatrix.onlyTranslate()) {
13914
- const point = symbol.getOffsetXY(symbolAttribute);
13915
- x += point.x, y += point.y, pickContext.setTransformForCurrent();
13916
- } else x = 0, y = 0, pickContext.transformFromMatrix(symbol.transMatrix, !0);
13917
- let picked = !1;
13918
- return this.canvasRenderer.drawShape(symbol, pickContext, x, y, {}, null, (context, symbolAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, symbolAttribute, themeAttribute) => {
13919
- if (picked) return !0;
13920
- const lineWidth = symbolAttribute.lineWidth || themeAttribute.lineWidth,
13921
- pickStrokeBuffer = symbolAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
13922
- return pickContext.lineWidth = lineWidth + pickStrokeBuffer, picked = context.isPointInStroke(point.x, point.y), picked;
13923
- }), pickContext.highPerformanceRestore(), picked;
13682
+ super(), this.canvasRenderer = canvasRenderer, this.type = "symbol", this.numberType = SYMBOL_NUMBER_TYPE;
13924
13683
  }
13925
13684
  };
13926
- DefaultMathSymbolPicker = __decorate$e([injectable(), __param$a(0, inject(SymbolRender)), __metadata$a("design:paramtypes", [Object])], DefaultMathSymbolPicker);
13685
+ DefaultMathSymbolPicker = __decorate$d([injectable(), __param$a(0, inject(SymbolRender)), __metadata$a("design:paramtypes", [Object])], DefaultMathSymbolPicker);
13927
13686
 
13928
13687
  let loadSymbolPick$1 = !1;
13929
13688
  const symbolMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
13930
13689
  loadSymbolPick$1 || (loadSymbolPick$1 = !0, bind(MathSymbolPicker).to(DefaultMathSymbolPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathSymbolPicker));
13931
13690
  });
13932
13691
 
13933
- var __decorate$d = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13692
+ var __decorate$c = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13934
13693
  var d,
13935
13694
  c = arguments.length,
13936
13695
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -13945,14 +13704,14 @@ let DefaultMathTextPicker = class {
13945
13704
  return !!text.AABBBounds.containsPoint(point);
13946
13705
  }
13947
13706
  };
13948
- DefaultMathTextPicker = __decorate$d([injectable()], DefaultMathTextPicker);
13707
+ DefaultMathTextPicker = __decorate$c([injectable()], DefaultMathTextPicker);
13949
13708
 
13950
13709
  let loadTextPick$1 = !1;
13951
13710
  const textMathPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
13952
13711
  loadTextPick$1 || (loadTextPick$1 = !0, bind(MathTextPicker).to(DefaultMathTextPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathTextPicker));
13953
13712
  });
13954
13713
 
13955
- var __decorate$c = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13714
+ var __decorate$b = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13956
13715
  var d,
13957
13716
  c = arguments.length,
13958
13717
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -13967,44 +13726,19 @@ var __decorate$c = undefined && undefined.__decorate || function (decorators, ta
13967
13726
  decorator(target, key, paramIndex);
13968
13727
  };
13969
13728
  };
13970
- let DefaultCanvasArcPicker = class {
13729
+ let DefaultCanvasArcPicker = class extends PickerBase {
13971
13730
  constructor(canvasRenderer) {
13972
- this.canvasRenderer = canvasRenderer, this.type = "arc", this.numberType = ARC_NUMBER_TYPE;
13973
- }
13974
- contains(arc, point, params) {
13975
- if (!arc.AABBBounds.containsPoint(point)) return !1;
13976
- if ("imprecise" === arc.attribute.pickMode) return !0;
13977
- const {
13978
- pickContext: pickContext
13979
- } = null != params ? params : {};
13980
- if (!pickContext) return !1;
13981
- const arcAttribute = getTheme(arc).arc;
13982
- pickContext.highPerformanceSave();
13983
- let {
13984
- x = arcAttribute.x,
13985
- y = arcAttribute.y
13986
- } = arc.attribute;
13987
- if (arc.transMatrix.onlyTranslate()) {
13988
- const point = arc.getOffsetXY(arcAttribute);
13989
- x += point.x, y += point.y, pickContext.setTransformForCurrent();
13990
- } else x = 0, y = 0, pickContext.transformFromMatrix(arc.transMatrix, !0);
13991
- let picked = !1;
13992
- return this.canvasRenderer.drawShape(arc, pickContext, x, y, {}, null, (context, arcAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, arcAttribute, themeAttribute) => {
13993
- if (picked) return !0;
13994
- const lineWidth = arcAttribute.lineWidth || themeAttribute.lineWidth,
13995
- pickStrokeBuffer = arcAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
13996
- return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
13997
- }), pickContext.highPerformanceRestore(), picked;
13731
+ super(), this.canvasRenderer = canvasRenderer, this.type = "arc", this.numberType = ARC_NUMBER_TYPE;
13998
13732
  }
13999
13733
  };
14000
- DefaultCanvasArcPicker = __decorate$c([injectable(), __param$9(0, inject(ArcRender)), __metadata$9("design:paramtypes", [Object])], DefaultCanvasArcPicker);
13734
+ DefaultCanvasArcPicker = __decorate$b([injectable(), __param$9(0, inject(ArcRender)), __metadata$9("design:paramtypes", [Object])], DefaultCanvasArcPicker);
14001
13735
 
14002
13736
  let loadArcPick = !1;
14003
13737
  const arcCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
14004
13738
  loadArcPick || (loadArcPick = !0, bind(CanvasArcPicker).to(DefaultCanvasArcPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasArcPicker));
14005
13739
  });
14006
13740
 
14007
- var __decorate$b = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13741
+ var __decorate$a = undefined && undefined.__decorate || function (decorators, target, key, desc) {
14008
13742
  var d,
14009
13743
  c = arguments.length,
14010
13744
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -14019,98 +13753,29 @@ var __decorate$b = undefined && undefined.__decorate || function (decorators, ta
14019
13753
  decorator(target, key, paramIndex);
14020
13754
  };
14021
13755
  };
14022
- const _bounds = new AABBBounds();
14023
- let DefaultCanvasRectPicker = class {
13756
+ let DefaultCanvasRectPicker = class extends RectPickerBase {
14024
13757
  constructor(canvasRenderer) {
14025
- this.canvasRenderer = canvasRenderer, this.type = "rect", this.numberType = RECT_NUMBER_TYPE;
14026
- }
14027
- contains(rect, point, params) {
14028
- if (!rect.AABBBounds.containsPoint(point)) return !1;
14029
- if ("imprecise" === rect.attribute.pickMode) return !0;
14030
- const {
14031
- pickContext: pickContext
14032
- } = null != params ? params : {};
14033
- if (!pickContext) return !1;
14034
- const rectAttribute = getTheme(rect).rect,
14035
- {
14036
- cornerRadius = rectAttribute.cornerRadius
14037
- } = rect.attribute;
14038
- let {
14039
- x = rectAttribute.x,
14040
- y = rectAttribute.y
14041
- } = rect.attribute;
14042
- pickContext.highPerformanceSave();
14043
- let onlyTranslate = !0;
14044
- if (rect.transMatrix.onlyTranslate()) {
14045
- const point = rect.getOffsetXY(rectAttribute);
14046
- x += point.x, y += point.y, pickContext.setTransformForCurrent();
14047
- } else x = 0, y = 0, onlyTranslate = !1, pickContext.transformFromMatrix(rect.transMatrix, !0);
14048
- let picked = !0;
14049
- if (!onlyTranslate || rect.shadowRoot || isNumber(cornerRadius, !0) && 0 !== cornerRadius || isArray(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
14050
- if (picked) return !0;
14051
- const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
14052
- pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
14053
- return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
14054
- });else {
14055
- const {
14056
- fill = rectAttribute.fill,
14057
- stroke = rectAttribute.stroke,
14058
- lineWidth = rectAttribute.lineWidth
14059
- } = rect.attribute;
14060
- if (fill) picked = !0;else if (stroke) {
14061
- const bounds = rect.AABBBounds;
14062
- _bounds.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2), _bounds.expand(-lineWidth / 2), picked = !_bounds.containsPoint(point);
14063
- }
14064
- }
14065
- return pickContext.highPerformanceRestore(), picked;
13758
+ super(), this.canvasRenderer = canvasRenderer;
14066
13759
  }
14067
13760
  };
14068
- DefaultCanvasRectPicker = __decorate$b([injectable(), __param$8(0, inject(RectRender)), __metadata$8("design:paramtypes", [Object])], DefaultCanvasRectPicker);
13761
+ DefaultCanvasRectPicker = __decorate$a([injectable(), __param$8(0, inject(RectRender)), __metadata$8("design:paramtypes", [Object])], DefaultCanvasRectPicker);
14069
13762
 
14070
13763
  let loadRectPick = !1;
14071
- const rectCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
14072
- loadRectPick || (loadRectPick = !0, bind(CanvasRectPicker).to(DefaultCanvasRectPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasRectPicker));
14073
- });
14074
-
14075
- var __decorate$a = undefined && undefined.__decorate || function (decorators, target, key, desc) {
14076
- var d,
14077
- c = arguments.length,
14078
- r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
14079
- 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);
14080
- return c > 3 && r && Object.defineProperty(target, key, r), r;
14081
- };
14082
- let BasePicker = class extends BaseRender {};
14083
- BasePicker = __decorate$a([injectable()], BasePicker);
14084
-
14085
- var __decorate$9 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
14086
- var d,
14087
- c = arguments.length,
14088
- r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
14089
- 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);
14090
- return c > 3 && r && Object.defineProperty(target, key, r), r;
14091
- },
14092
- __metadata$7 = undefined && undefined.__metadata || function (k, v) {
14093
- if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
14094
- },
14095
- __param$7 = undefined && undefined.__param || function (paramIndex, decorator) {
14096
- return function (target, key) {
14097
- decorator(target, key, paramIndex);
14098
- };
14099
- };
14100
- let DefaultCanvasLinePicker = class extends BasePicker {
14101
- constructor(canvasRenderer) {
14102
- super(), this.canvasRenderer = canvasRenderer, this.type = "line", this.numberType = LINE_NUMBER_TYPE;
14103
- }
14104
- contains(line, point, params) {
14105
- if (!line.AABBBounds.containsPoint(point)) return !1;
14106
- if ("imprecise" === line.attribute.pickMode) return !0;
13764
+ const rectCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind) => {
13765
+ loadRectPick || (loadRectPick = !0, bind(CanvasRectPicker).to(DefaultCanvasRectPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasRectPicker));
13766
+ });
13767
+
13768
+ class BaseLinePicker extends BaseRender {
13769
+ contains(graphic, point, params) {
13770
+ if (!graphic.AABBBounds.containsPoint(point)) return !1;
13771
+ if ("imprecise" === graphic.attribute.pickMode) return !0;
14107
13772
  const {
14108
13773
  pickContext: pickContext
14109
13774
  } = null != params ? params : {};
14110
13775
  if (!pickContext) return !1;
14111
13776
  pickContext.highPerformanceSave();
14112
- const lineAttribute = getTheme(line).line,
14113
- data = this.transform(line, lineAttribute, pickContext),
13777
+ const lineAttribute = getTheme(graphic)[graphic.type],
13778
+ data = this.transform(graphic, lineAttribute, pickContext),
14114
13779
  {
14115
13780
  x: x,
14116
13781
  y: y,
@@ -14120,18 +13785,39 @@ let DefaultCanvasLinePicker = class extends BasePicker {
14120
13785
  let pickPoint = point;
14121
13786
  if (pickContext.camera) {
14122
13787
  pickPoint = point.clone();
14123
- const globalMatrix = line.parent.globalTransMatrix;
13788
+ const globalMatrix = graphic.parent.globalTransMatrix;
14124
13789
  pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e, pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
14125
13790
  }
14126
13791
  this.canvasRenderer.z = z;
14127
13792
  let picked = !1;
14128
- return this.canvasRenderer.drawShape(line, pickContext, x, y, {}, null, context => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked), (context, lineAttribute, themeAttribute) => {
13793
+ return this.canvasRenderer.drawShape(graphic, pickContext, x, y, {}, null, context => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked), (context, lineAttribute, themeAttribute) => {
14129
13794
  if (picked) return !0;
14130
13795
  const lineWidth = lineAttribute.lineWidth || themeAttribute.lineWidth,
14131
13796
  pickStrokeBuffer = lineAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
14132
13797
  return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
14133
13798
  }), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
14134
13799
  }
13800
+ }
13801
+
13802
+ var __decorate$9 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
13803
+ var d,
13804
+ c = arguments.length,
13805
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
13806
+ 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);
13807
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
13808
+ },
13809
+ __metadata$7 = undefined && undefined.__metadata || function (k, v) {
13810
+ if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
13811
+ },
13812
+ __param$7 = undefined && undefined.__param || function (paramIndex, decorator) {
13813
+ return function (target, key) {
13814
+ decorator(target, key, paramIndex);
13815
+ };
13816
+ };
13817
+ let DefaultCanvasLinePicker = class extends BaseLinePicker {
13818
+ constructor(canvasRenderer) {
13819
+ super(), this.canvasRenderer = canvasRenderer, this.type = "line", this.numberType = LINE_NUMBER_TYPE;
13820
+ }
14135
13821
  };
14136
13822
  DefaultCanvasLinePicker = __decorate$9([injectable(), __param$7(0, inject(LineRender)), __metadata$7("design:paramtypes", [Object])], DefaultCanvasLinePicker);
14137
13823
 
@@ -14155,38 +13841,9 @@ var __decorate$8 = undefined && undefined.__decorate || function (decorators, ta
14155
13841
  decorator(target, key, paramIndex);
14156
13842
  };
14157
13843
  };
14158
- let DefaultCanvasAreaPicker = class {
13844
+ let DefaultCanvasAreaPicker = class extends PickerBase {
14159
13845
  constructor(canvasRenderer) {
14160
- this.canvasRenderer = canvasRenderer, this.type = "area", this.numberType = AREA_NUMBER_TYPE;
14161
- }
14162
- contains(area, point, params) {
14163
- if (!area.AABBBounds.containsPoint(point)) return !1;
14164
- if ("imprecise" === area.attribute.pickMode) return !0;
14165
- const {
14166
- pickContext: pickContext
14167
- } = null != params ? params : {};
14168
- if (!pickContext) return !1;
14169
- const areaAttribute = getTheme(area).area;
14170
- let {
14171
- x = areaAttribute.x,
14172
- y = areaAttribute.y
14173
- } = area.attribute;
14174
- const {
14175
- fillPickable = areaAttribute.fillPickable,
14176
- strokePickable = areaAttribute.strokePickable
14177
- } = area.attribute;
14178
- if (pickContext.highPerformanceSave(), area.transMatrix.onlyTranslate()) {
14179
- const point = area.getOffsetXY(areaAttribute);
14180
- x += point.x, y += point.y, pickContext.setTransformForCurrent();
14181
- } else x = 0, y = 0, pickContext.transformFromMatrix(area.transMatrix, !0);
14182
- let picked = !1;
14183
- return this.canvasRenderer.drawShape(area, pickContext, x, y, {}, null, context => !!picked || !!fillPickable && (picked = context.isPointInPath(point.x, point.y), picked), (context, areaAttribute, themeAttribute) => {
14184
- if (picked) return !0;
14185
- if (!strokePickable) return !1;
14186
- const lineWidth = areaAttribute.lineWidth || themeAttribute.lineWidth,
14187
- pickStrokeBuffer = areaAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
14188
- return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
14189
- }), pickContext.highPerformanceRestore(), picked;
13846
+ super(), this.canvasRenderer = canvasRenderer, this.type = "area", this.numberType = AREA_NUMBER_TYPE;
14190
13847
  }
14191
13848
  };
14192
13849
  DefaultCanvasAreaPicker = __decorate$8([injectable(), __param$6(0, inject(AreaRender)), __metadata$6("design:paramtypes", [Object])], DefaultCanvasAreaPicker);
@@ -14196,6 +13853,34 @@ const areaCanvasPickModule = new ContainerModule((bind, unbind, isBound, rebind)
14196
13853
  loadAreaPick || (loadAreaPick = !0, bind(CanvasAreaPicker).to(DefaultCanvasAreaPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasAreaPicker));
14197
13854
  });
14198
13855
 
13856
+ class Base3dPicker extends BaseRender {
13857
+ contains(graphic, point, params) {
13858
+ var _a;
13859
+ const {
13860
+ pickContext: pickContext
13861
+ } = null != params ? params : {};
13862
+ if (!pickContext) return !1;
13863
+ const attribute = getTheme(graphic)[null !== (_a = this.themeType) && void 0 !== _a ? _a : graphic.type];
13864
+ pickContext.highPerformanceSave();
13865
+ const data = this.transform(graphic, attribute, pickContext),
13866
+ {
13867
+ x: x,
13868
+ y: y,
13869
+ z: z,
13870
+ lastModelMatrix: lastModelMatrix
13871
+ } = data;
13872
+ let pickPoint = point;
13873
+ if (pickContext.camera) {
13874
+ pickPoint = point.clone();
13875
+ const globalMatrix = graphic.parent.globalTransMatrix;
13876
+ pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e, pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
13877
+ }
13878
+ this.canvasRenderer.z = z;
13879
+ let picked = !1;
13880
+ return this.canvasRenderer.drawShape(graphic, pickContext, x, y, params, null, (context, arc3dAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked)), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
13881
+ }
13882
+ }
13883
+
14199
13884
  var __decorate$7 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
14200
13885
  var d,
14201
13886
  c = arguments.length,
@@ -14211,7 +13896,7 @@ var __decorate$7 = undefined && undefined.__decorate || function (decorators, ta
14211
13896
  decorator(target, key, paramIndex);
14212
13897
  };
14213
13898
  };
14214
- let DefaultCanvasSymbolPicker = class extends BasePicker {
13899
+ let DefaultCanvasSymbolPicker = class extends Base3dPicker {
14215
13900
  constructor(canvasRenderer) {
14216
13901
  super(), this.canvasRenderer = canvasRenderer, this.type = "symbol", this.numberType = SYMBOL_NUMBER_TYPE;
14217
13902
  }
@@ -14272,33 +13957,9 @@ var __decorate$6 = undefined && undefined.__decorate || function (decorators, ta
14272
13957
  decorator(target, key, paramIndex);
14273
13958
  };
14274
13959
  };
14275
- let DefaultCanvasCirclePicker = class {
13960
+ let DefaultCanvasCirclePicker = class extends PickerBase {
14276
13961
  constructor(canvasRenderer) {
14277
- this.canvasRenderer = canvasRenderer, this.type = "circle", this.numberType = CIRCLE_NUMBER_TYPE;
14278
- }
14279
- contains(circle, point, params) {
14280
- if (!circle.AABBBounds.containsPoint(point)) return !1;
14281
- if ("imprecise" === circle.attribute.pickMode) return !0;
14282
- const {
14283
- pickContext: pickContext
14284
- } = null != params ? params : {};
14285
- if (!pickContext) return !1;
14286
- const circleAttribute = getTheme(circle).circle;
14287
- let {
14288
- x = circleAttribute.x,
14289
- y = circleAttribute.y
14290
- } = circle.attribute;
14291
- if (pickContext.highPerformanceSave(), circle.transMatrix.onlyTranslate()) {
14292
- const point = circle.getOffsetXY(circleAttribute);
14293
- x += point.x, y += point.y, pickContext.setTransformForCurrent();
14294
- } else x = 0, y = 0, pickContext.transformFromMatrix(circle.transMatrix, !0);
14295
- let picked = !1;
14296
- return this.canvasRenderer.drawShape(circle, pickContext, x, y, {}, null, (context, circleAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, circleAttribute, themeAttribute) => {
14297
- if (picked) return !0;
14298
- const lineWidth = circleAttribute.lineWidth || themeAttribute.lineWidth,
14299
- pickStrokeBuffer = circleAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
14300
- return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
14301
- }), pickContext.highPerformanceRestore(), picked;
13962
+ super(), this.canvasRenderer = canvasRenderer, this.type = "circle", this.numberType = CIRCLE_NUMBER_TYPE;
14302
13963
  }
14303
13964
  };
14304
13965
  DefaultCanvasCirclePicker = __decorate$6([injectable(), __param$4(0, inject(CircleRender)), __metadata$4("design:paramtypes", [Object])], DefaultCanvasCirclePicker);
@@ -14323,7 +13984,7 @@ var __decorate$5 = undefined && undefined.__decorate || function (decorators, ta
14323
13984
  decorator(target, key, paramIndex);
14324
13985
  };
14325
13986
  };
14326
- let DefaultCanvasTextPicker = class extends BasePicker {
13987
+ let DefaultCanvasTextPicker = class extends Base3dPicker {
14327
13988
  constructor(canvasRenderer) {
14328
13989
  super(), this.canvasRenderer = canvasRenderer, this.type = "text", this.numberType = TEXT_NUMBER_TYPE;
14329
13990
  }
@@ -14393,41 +14054,10 @@ var __decorate$4 = undefined && undefined.__decorate || function (decorators, ta
14393
14054
  decorator(target, key, paramIndex);
14394
14055
  };
14395
14056
  };
14396
- let DefaultCanvasPathPicker = class extends BasePicker {
14057
+ let DefaultCanvasPathPicker = class extends BaseLinePicker {
14397
14058
  constructor(canvasRenderer) {
14398
14059
  super(), this.canvasRenderer = canvasRenderer, this.type = "path", this.numberType = PATH_NUMBER_TYPE;
14399
14060
  }
14400
- contains(path, point, params) {
14401
- if (!path.AABBBounds.containsPoint(point)) return !1;
14402
- if ("imprecise" === path.attribute.pickMode) return !0;
14403
- const {
14404
- pickContext: pickContext
14405
- } = null != params ? params : {};
14406
- if (!pickContext) return !1;
14407
- const pathAttribute = getTheme(path).path;
14408
- pickContext.highPerformanceSave();
14409
- const data = this.transform(path, pathAttribute, pickContext),
14410
- {
14411
- x: x,
14412
- y: y,
14413
- z: z,
14414
- lastModelMatrix: lastModelMatrix
14415
- } = data;
14416
- let pickPoint = point;
14417
- if (pickContext.camera) {
14418
- pickPoint = point.clone();
14419
- const globalMatrix = path.parent.globalTransMatrix;
14420
- pickPoint.x = globalMatrix.a * point.x + globalMatrix.c * point.y + globalMatrix.e, pickPoint.y = globalMatrix.b * point.x + globalMatrix.d * point.y + globalMatrix.f;
14421
- }
14422
- this.canvasRenderer.z = z;
14423
- let picked = !1;
14424
- return this.canvasRenderer.drawShape(path, pickContext, x, y, {}, null, (context, pathAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked), (context, pathAttribute, themeAttribute) => {
14425
- if (picked) return !0;
14426
- const lineWidth = pathAttribute.lineWidth || themeAttribute.lineWidth,
14427
- pickStrokeBuffer = pathAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
14428
- return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
14429
- }), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
14430
- }
14431
14061
  };
14432
14062
  DefaultCanvasPathPicker = __decorate$4([injectable(), __param$2(0, inject(PathRender)), __metadata$2("design:paramtypes", [Object])], DefaultCanvasPathPicker);
14433
14063
 
@@ -14451,33 +14081,9 @@ var __decorate$3 = undefined && undefined.__decorate || function (decorators, ta
14451
14081
  decorator(target, key, paramIndex);
14452
14082
  };
14453
14083
  };
14454
- let DefaultCanvasPolygonPicker = class {
14084
+ let DefaultCanvasPolygonPicker = class extends PickerBase {
14455
14085
  constructor(canvasRenderer) {
14456
- this.canvasRenderer = canvasRenderer, this.type = "polygon", this.numberType = POLYGON_NUMBER_TYPE;
14457
- }
14458
- contains(polygon, point, params) {
14459
- if (!polygon.AABBBounds.contains(point.x, point.y)) return !1;
14460
- if ("imprecise" === polygon.attribute.pickMode) return !0;
14461
- const {
14462
- pickContext: pickContext
14463
- } = null != params ? params : {};
14464
- if (!pickContext) return !1;
14465
- const polygonAttribute = getTheme(polygon).polygon;
14466
- let {
14467
- x = polygonAttribute.x,
14468
- y = polygonAttribute.y
14469
- } = polygon.attribute;
14470
- if (pickContext.highPerformanceSave(), polygon.transMatrix.onlyTranslate()) {
14471
- const point = polygon.getOffsetXY(polygonAttribute);
14472
- x += point.x, y += point.y, pickContext.setTransformForCurrent();
14473
- } else x = 0, y = 0, pickContext.transformFromMatrix(polygon.transMatrix, !0);
14474
- let picked = !1;
14475
- return this.canvasRenderer.drawShape(polygon, pickContext, x, y, {}, null, (context, pathAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, pathAttribute, themeAttribute) => {
14476
- if (picked) return !0;
14477
- const lineWidth = pathAttribute.lineWidth || themeAttribute.lineWidth,
14478
- pickStrokeBuffer = pathAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
14479
- return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
14480
- }), pickContext.highPerformanceRestore(), picked;
14086
+ super(), this.canvasRenderer = canvasRenderer, this.type = "polygon", this.numberType = POLYGON_NUMBER_TYPE;
14481
14087
  }
14482
14088
  };
14483
14089
  DefaultCanvasPolygonPicker = __decorate$3([injectable(), __param$1(0, inject(PolygonRender)), __metadata$1("design:paramtypes", [Object])], DefaultCanvasPolygonPicker);
@@ -15781,23 +15387,20 @@ PopTipRenderContribution = __decorate([
15781
15387
  injectable()
15782
15388
  ], PopTipRenderContribution);
15783
15389
 
15784
- let PopTipPlugin = class PopTipPlugin {
15390
+ class PopTipPluginBase {
15785
15391
  constructor() {
15786
- this.name = 'poptip';
15787
15392
  this.activeEvent = 'onRegister';
15788
15393
  this._uid = Generator.GenAutoIncrementId();
15789
- this.key = this.name + this._uid;
15790
15394
  this.poptip = (e) => {
15791
15395
  const graphic = e.target;
15792
- if (graphic.isContainer || !graphic.attribute) {
15396
+ if (this.needHide(graphic)) {
15793
15397
  this.unpoptip(e);
15794
15398
  return;
15795
15399
  }
15796
15400
  if (graphic === this.activeGraphic) {
15797
15401
  return;
15798
15402
  }
15799
- const { poptip } = graphic.attribute;
15800
- if (poptip) {
15403
+ if (this.needShow(graphic)) {
15801
15404
  graphic.setAttributes({});
15802
15405
  graphic._showPoptip = 1;
15803
15406
  }
@@ -15821,6 +15424,12 @@ let PopTipPlugin = class PopTipPlugin {
15821
15424
  const { stage } = this.pluginService;
15822
15425
  stage.addEventListener('pointerover', this.poptip);
15823
15426
  }
15427
+ needHide(graphic) {
15428
+ return graphic.isContainer || !graphic.attribute;
15429
+ }
15430
+ needShow(graphic) {
15431
+ return !!graphic.attribute.poptip;
15432
+ }
15824
15433
  setActiveGraphic(graphic, rerender) {
15825
15434
  this.activeGraphic = graphic;
15826
15435
  this.pluginService.stage.renderNextFrame();
@@ -15829,15 +15438,21 @@ let PopTipPlugin = class PopTipPlugin {
15829
15438
  const { stage } = this.pluginService;
15830
15439
  stage.removeEventListener('pointerover', this.poptip);
15831
15440
  }
15441
+ }
15442
+ let PopTipPlugin = class PopTipPlugin extends PopTipPluginBase {
15443
+ constructor() {
15444
+ super(...arguments);
15445
+ this.name = 'poptip';
15446
+ this.key = this.name + this._uid;
15447
+ }
15832
15448
  };
15833
15449
  PopTipPlugin = __decorate([
15834
15450
  injectable()
15835
15451
  ], PopTipPlugin);
15836
- let PopTipForClipedTextPlugin = class PopTipForClipedTextPlugin {
15452
+ let PopTipForClipedTextPlugin = class PopTipForClipedTextPlugin extends PopTipPluginBase {
15837
15453
  constructor() {
15454
+ super(...arguments);
15838
15455
  this.name = 'poptipForText';
15839
- this.activeEvent = 'onRegister';
15840
- this._uid = Generator.GenAutoIncrementId();
15841
15456
  this.key = this.name + this._uid;
15842
15457
  this.pointerlave = (e) => {
15843
15458
  const { stage } = this.pluginService;
@@ -15845,52 +15460,25 @@ let PopTipForClipedTextPlugin = class PopTipForClipedTextPlugin {
15845
15460
  this.unpoptip(e);
15846
15461
  }
15847
15462
  };
15848
- this.poptip = (e) => {
15849
- const graphic = e.target;
15850
- if (graphic.type !== 'text' ||
15851
- !graphic.cliped ||
15852
- graphic.isContainer ||
15853
- !graphic.attribute ||
15854
- graphic.attribute.disableAutoClipedPoptip) {
15855
- this.unpoptip(e);
15856
- return;
15857
- }
15858
- if (graphic === this.activeGraphic) {
15859
- return;
15860
- }
15861
- const { poptip = {} } = graphic.attribute;
15862
- if (poptip) {
15863
- graphic.setAttributes({});
15864
- graphic._showPoptip = 1;
15865
- }
15866
- if (this.activeGraphic) {
15867
- this.activeGraphic.setAttributes({});
15868
- this.activeGraphic._showPoptip = 2;
15869
- }
15870
- this.setActiveGraphic(graphic, true);
15871
- };
15872
- this.unpoptip = (e) => {
15873
- if (!this.activeGraphic) {
15874
- return;
15875
- }
15876
- this.activeGraphic.setAttributes({});
15877
- this.activeGraphic._showPoptip = 2;
15878
- this.setActiveGraphic(null, true);
15879
- };
15880
15463
  }
15881
15464
  activate(context) {
15882
- this.pluginService = context;
15465
+ super.activate(context);
15883
15466
  const { stage } = this.pluginService;
15884
- stage.addEventListener('pointerover', this.poptip);
15885
15467
  stage.addEventListener('pointerleave', this.pointerlave);
15886
15468
  }
15887
- setActiveGraphic(graphic, rerender) {
15888
- this.activeGraphic = graphic;
15889
- this.pluginService.stage.renderNextFrame();
15469
+ needHide(graphic) {
15470
+ return (graphic.type !== 'text' ||
15471
+ !graphic.cliped ||
15472
+ graphic.isContainer ||
15473
+ !graphic.attribute ||
15474
+ graphic.attribute.disableAutoClipedPoptip);
15475
+ }
15476
+ needShow(graphic) {
15477
+ return true;
15890
15478
  }
15891
15479
  deactivate(context) {
15892
15480
  const { stage } = this.pluginService;
15893
- stage.removeEventListener('pointerover', this.poptip);
15481
+ super.deactivate(context);
15894
15482
  stage.removeEventListener('pointerleave', this.pointerlave);
15895
15483
  }
15896
15484
  };
@@ -16754,16 +16342,7 @@ class LabelBase extends AbstractComponent {
16754
16342
  (((_b = e.detail) === null || _b === void 0 ? void 0 : _b.type) === AttributeUpdateType.ANIMATE_UPDATE && ((_c = e.detail.animationState) === null || _c === void 0 ? void 0 : _c.isFirstFrameOfStep))) {
16755
16343
  const currentStates = (_e = (_d = e.target) === null || _d === void 0 ? void 0 : _d.currentStates) !== null && _e !== void 0 ? _e : [];
16756
16344
  const labels = this._isCollectionBase ? [...this._graphicToText.values()] : [this._graphicToText.get(e.target)];
16757
- labels.forEach(label => {
16758
- if (label) {
16759
- if (label.text) {
16760
- label.text.useStates(currentStates);
16761
- }
16762
- if (label.labelLine) {
16763
- label.labelLine.useStates(currentStates);
16764
- }
16765
- }
16766
- });
16345
+ this.updateStatesOfLabels(labels, currentStates);
16767
16346
  }
16768
16347
  };
16769
16348
  }
@@ -16811,6 +16390,9 @@ class LabelBase extends AbstractComponent {
16811
16390
  labels = this._overlapping(labels);
16812
16391
  }
16813
16392
  }
16393
+ if (isFunction(this.attribute.onAfterOverlapping)) {
16394
+ this.attribute.onAfterOverlapping(labels, this.getRelatedGraphic.bind(this), this._isCollectionBase ? (d) => this._idToPoint.get(d.id) : null);
16395
+ }
16814
16396
  if (labels && labels.length) {
16815
16397
  labels.forEach(label => {
16816
16398
  this._bindEvent(label);
@@ -17081,9 +16663,6 @@ class LabelBase extends AbstractComponent {
17081
16663
  }
17082
16664
  !hasPlace && !hideOnHit && result.push(text);
17083
16665
  }
17084
- if (isFunction(this.onAfterLabelOverlap)) {
17085
- this.onAfterLabelOverlap(bitmap);
17086
- }
17087
16666
  return result;
17088
16667
  }
17089
16668
  getBaseMarkGroup() {
@@ -17115,6 +16694,7 @@ class LabelBase extends AbstractComponent {
17115
16694
  }
17116
16695
  _renderWithAnimation(labels) {
17117
16696
  var _a;
16697
+ const { syncState } = this.attribute;
17118
16698
  const currentTextMap = new Map();
17119
16699
  const prevTextMap = this._graphicToText || new Map();
17120
16700
  const texts = [];
@@ -17122,6 +16702,7 @@ class LabelBase extends AbstractComponent {
17122
16702
  const { visible: showLabelLine } = (_a = this.attribute.line) !== null && _a !== void 0 ? _a : {};
17123
16703
  labels &&
17124
16704
  labels.forEach((text, index) => {
16705
+ var _a;
17125
16706
  const relatedGraphic = this.getRelatedGraphic(text.attribute);
17126
16707
  const textId = text.attribute.id;
17127
16708
  const textKey = this._isCollectionBase ? textId : relatedGraphic;
@@ -17130,6 +16711,9 @@ class LabelBase extends AbstractComponent {
17130
16711
  if (showLabelLine) {
17131
16712
  labelLine = this._createLabelLine(text, relatedGraphic);
17132
16713
  }
16714
+ if (syncState) {
16715
+ this.updateStatesOfLabels([labelLine ? { text, labelLine } : { text }], (_a = relatedGraphic.currentStates) !== null && _a !== void 0 ? _a : []);
16716
+ }
17133
16717
  if (state === 'enter') {
17134
16718
  texts.push(text);
17135
16719
  currentTextMap.set(textKey, labelLine ? { text, labelLine } : { text });
@@ -17175,11 +16759,13 @@ class LabelBase extends AbstractComponent {
17175
16759
  }
17176
16760
  _renderWithOutAnimation(labels) {
17177
16761
  var _a;
16762
+ const { syncState } = this.attribute;
17178
16763
  const currentTextMap = new Map();
17179
16764
  const prevTextMap = this._graphicToText || new Map();
17180
16765
  const { visible: showLabelLine } = (_a = this.attribute.line) !== null && _a !== void 0 ? _a : {};
17181
16766
  labels &&
17182
16767
  labels.forEach(text => {
16768
+ var _a;
17183
16769
  const relatedGraphic = this.getRelatedGraphic(text.attribute);
17184
16770
  const state = (prevTextMap === null || prevTextMap === void 0 ? void 0 : prevTextMap.get(relatedGraphic)) ? 'update' : 'enter';
17185
16771
  const textKey = this._isCollectionBase ? text.attribute.id : relatedGraphic;
@@ -17187,6 +16773,9 @@ class LabelBase extends AbstractComponent {
17187
16773
  if (showLabelLine) {
17188
16774
  labelLine = this._createLabelLine(text, relatedGraphic);
17189
16775
  }
16776
+ if (syncState) {
16777
+ this.updateStatesOfLabels([labelLine ? { text, labelLine } : { text }], (_a = relatedGraphic.currentStates) !== null && _a !== void 0 ? _a : []);
16778
+ }
17190
16779
  if (state === 'enter') {
17191
16780
  currentTextMap.set(textKey, labelLine ? { text, labelLine } : { text });
17192
16781
  this.add(text);
@@ -17213,6 +16802,18 @@ class LabelBase extends AbstractComponent {
17213
16802
  });
17214
16803
  this._graphicToText = currentTextMap;
17215
16804
  }
16805
+ updateStatesOfLabels(labels, currentStates) {
16806
+ labels.forEach(label => {
16807
+ if (label) {
16808
+ if (label.text) {
16809
+ label.text.useStates(currentStates);
16810
+ }
16811
+ if (label.labelLine) {
16812
+ label.labelLine.useStates(currentStates);
16813
+ }
16814
+ }
16815
+ });
16816
+ }
17216
16817
  _syncStateWithRelatedGraphic(relatedGraphic) {
17217
16818
  if (this.attribute.syncState) {
17218
16819
  relatedGraphic.on('afterAttributeUpdate', this._handleRelatedGraphicSetState);
@@ -17540,9 +17141,12 @@ class ArcLabel extends LabelBase {
17540
17141
  const labels = super._layout(texts);
17541
17142
  const textBoundsArray = labels.map(label => this.getGraphicBounds(label));
17542
17143
  const ellipsisLabelAttribute = Object.assign(Object.assign({}, this.attribute.textStyle), { text: '…' });
17543
- const ellipsisText = this._createLabelText(ellipsisLabelAttribute);
17544
- const ellipsisTextBounds = this.getGraphicBounds(ellipsisText);
17545
- const ellipsisWidth = ellipsisTextBounds.x2 - ellipsisTextBounds.x1;
17144
+ let ellipsisWidth = Infinity;
17145
+ if (ellipsisLabelAttribute.ellipsis !== false) {
17146
+ const ellipsisText = this._createLabelText(ellipsisLabelAttribute);
17147
+ const ellipsisTextBounds = this.getGraphicBounds(ellipsisText);
17148
+ ellipsisWidth = ellipsisTextBounds.x2 - ellipsisTextBounds.x1;
17149
+ }
17546
17150
  const data = labels.map(label => label.attribute);
17547
17151
  const arcs = this.layoutArcLabels(this.attribute.position, this.attribute, Array.from(this._idToGraphic.values()), data, textBoundsArray, ellipsisWidth);
17548
17152
  for (let i = 0; i < data.length; i++) {
@@ -20314,69 +19918,6 @@ class GroupTransition extends ACustomAnimate {
20314
19918
  }
20315
19919
  }
20316
19920
 
20317
- class GroupFadeIn extends ACustomAnimate {
20318
- constructor(from, to, duration, easing) {
20319
- super(null, null, duration, easing);
20320
- }
20321
- getEndProps() {
20322
- return {};
20323
- }
20324
- onBind() {
20325
- this.target.setTheme({
20326
- common: {
20327
- opacity: 0
20328
- }
20329
- });
20330
- return;
20331
- }
20332
- onEnd() {
20333
- this.target.setTheme({
20334
- common: {
20335
- opacity: 1
20336
- }
20337
- });
20338
- return;
20339
- }
20340
- onUpdate(end, ratio, out) {
20341
- this.target.setTheme({
20342
- common: {
20343
- opacity: ratio
20344
- }
20345
- });
20346
- }
20347
- }
20348
- class GroupFadeOut extends ACustomAnimate {
20349
- constructor(from, to, duration, easing) {
20350
- super(null, null, duration, easing);
20351
- }
20352
- getEndProps() {
20353
- return {};
20354
- }
20355
- onBind() {
20356
- this.target.setTheme({
20357
- common: {
20358
- opacity: 1
20359
- }
20360
- });
20361
- return;
20362
- }
20363
- onEnd() {
20364
- this.target.setTheme({
20365
- common: {
20366
- opacity: 0
20367
- }
20368
- });
20369
- return;
20370
- }
20371
- onUpdate(end, ratio, out) {
20372
- this.target.setTheme({
20373
- common: {
20374
- opacity: 1 - ratio
20375
- }
20376
- });
20377
- }
20378
- }
20379
-
20380
19921
  const convertDomainToTickData = (domain) => {
20381
19922
  const ticks = domain.map((t, index) => {
20382
19923
  return {
@@ -21058,6 +20599,34 @@ class BaseGrid extends AbstractComponent {
21058
20599
  _getNodeId(id) {
21059
20600
  return `${this.id}-${id}`;
21060
20601
  }
20602
+ _parseTickSegment() {
20603
+ let tickSegment = 1;
20604
+ const count = this.data.length;
20605
+ if (count >= 2) {
20606
+ tickSegment = this.data[1].value - this.data[0].value;
20607
+ }
20608
+ return tickSegment;
20609
+ }
20610
+ _getPointsOfSubGrid(tickSegment, alignWithLabel) {
20611
+ const tickLineCount = this.data.length;
20612
+ const points = [];
20613
+ if (tickLineCount >= 2) {
20614
+ this.data.forEach((item) => {
20615
+ let tickValue = item.value;
20616
+ if (!alignWithLabel) {
20617
+ const value = item.value - tickSegment / 2;
20618
+ if (this.isInValidValue(value)) {
20619
+ return;
20620
+ }
20621
+ tickValue = value;
20622
+ }
20623
+ points.push({
20624
+ value: tickValue
20625
+ });
20626
+ });
20627
+ }
20628
+ return points;
20629
+ }
21061
20630
  release() {
21062
20631
  super.release();
21063
20632
  this._prevInnerView = null;
@@ -21112,11 +20681,7 @@ class LineAxisGrid extends BaseGrid {
21112
20681
  }
21113
20682
  getGridAttribute(isSubGrid) {
21114
20683
  const { type: gridType, alignWithLabel = true } = this.attribute;
21115
- let tickSegment = 1;
21116
- const count = this.data.length;
21117
- if (count >= 2) {
21118
- tickSegment = this.data[1].value - this.data[0].value;
21119
- }
20684
+ const tickSegment = this._parseTickSegment();
21120
20685
  let gridAttribute;
21121
20686
  let items = [];
21122
20687
  if (!isSubGrid) {
@@ -21145,20 +20710,7 @@ class LineAxisGrid extends BaseGrid {
21145
20710
  const { count: subCount = 4 } = this.attribute.subGrid || {};
21146
20711
  const tickLineCount = this.data.length;
21147
20712
  if (tickLineCount >= 2) {
21148
- const points = [];
21149
- this.data.forEach((item) => {
21150
- let tickValue = item.value;
21151
- if (!alignWithLabel) {
21152
- const value = item.value - tickSegment / 2;
21153
- if (this.isInValidValue(value)) {
21154
- return;
21155
- }
21156
- tickValue = value;
21157
- }
21158
- points.push({
21159
- value: tickValue
21160
- });
21161
- });
20713
+ const points = this._getPointsOfSubGrid(tickSegment, alignWithLabel);
21162
20714
  for (let i = 0; i < points.length - 1; i++) {
21163
20715
  const pre = points[i];
21164
20716
  const next = points[i + 1];
@@ -21204,11 +20756,7 @@ class CircleAxisGrid extends BaseGrid {
21204
20756
  const _a = this.attribute, { radius, innerRadius = 0, startAngle = POLAR_START_ANGLE, endAngle = POLAR_END_ANGLE, center, subGrid } = _a, grid = __rest(_a, ["radius", "innerRadius", "startAngle", "endAngle", "center", "subGrid"]);
21205
20757
  const { alignWithLabel = true } = grid || {};
21206
20758
  const length = radius - innerRadius;
21207
- let tickSegment = 1;
21208
- const count = this.data.length;
21209
- if (count >= 2) {
21210
- tickSegment = this.data[1].value - this.data[0].value;
21211
- }
20759
+ const tickSegment = this._parseTickSegment();
21212
20760
  if (!isSubGrid) {
21213
20761
  gridAttribute = grid;
21214
20762
  const gridItems = [];
@@ -21243,20 +20791,7 @@ class CircleAxisGrid extends BaseGrid {
21243
20791
  const { count: subCount = 4 } = subGrid || {};
21244
20792
  const tickLineCount = this.data.length;
21245
20793
  if (tickLineCount >= 2) {
21246
- const points = [];
21247
- this.data.forEach((item) => {
21248
- let tickValue = item.value;
21249
- if (!alignWithLabel) {
21250
- const value = item.value - tickSegment / 2;
21251
- if (this.isInValidValue(value)) {
21252
- return;
21253
- }
21254
- tickValue = value;
21255
- }
21256
- points.push({
21257
- value: tickValue
21258
- });
21259
- });
20794
+ const points = this._getPointsOfSubGrid(tickSegment, alignWithLabel);
21260
20795
  for (let i = 0; i < tickLineCount; i++) {
21261
20796
  const pre = points[i];
21262
20797
  const next = points[i + 1];
@@ -24491,6 +24026,7 @@ class DiscreteLegend extends LegendBase {
24491
24026
  const maxPages = isScrollbar ? 1 : isHorizontal ? maxRow : maxCol;
24492
24027
  let { doWrap, maxWidthInCol, startX, startY, pages } = this._itemContext;
24493
24028
  let item;
24029
+ let lastItemWidth = 0;
24494
24030
  for (let index = startIndex, len = legendItems.length; index < len; index++) {
24495
24031
  if (lazyload && pages > this._itemContext.currentPage * maxPages) {
24496
24032
  break;
@@ -24542,6 +24078,14 @@ class DiscreteLegend extends LegendBase {
24542
24078
  pages = Math.ceil((startY + itemHeight) / maxHeight);
24543
24079
  doWrap = pages > 1;
24544
24080
  }
24081
+ else if (maxHeight <= itemHeight) {
24082
+ pages += 1;
24083
+ doWrap = true;
24084
+ startY = 0;
24085
+ if (index > 0) {
24086
+ startX += lastItemWidth + spaceCol;
24087
+ }
24088
+ }
24545
24089
  else if (maxHeight < startY + itemHeight) {
24546
24090
  pages += 1;
24547
24091
  doWrap = true;
@@ -24559,6 +24103,7 @@ class DiscreteLegend extends LegendBase {
24559
24103
  startY += spaceRow + itemHeight;
24560
24104
  }
24561
24105
  itemsContainer.add(itemGroup);
24106
+ lastItemWidth = itemWidth;
24562
24107
  }
24563
24108
  this._itemContext.doWrap = doWrap;
24564
24109
  this._itemContext.startX = startX;
@@ -27356,20 +26901,11 @@ class BasePlayer extends AbstractComponent {
27356
26901
  backward: this._backward,
27357
26902
  disableTriggerEvent: this.attribute.disableTriggerEvent
27358
26903
  };
27359
- if (isHorizontal(this._orient)) {
27360
- attrs.layout = 'horizontal';
27361
- attrs.start = Object.assign(Object.assign({}, attrs.start), { style: Object.assign(Object.assign({}, attrs.start.style), { x: this._layoutInfo.start.x, y: this._layoutInfo.start.y }) });
27362
- attrs.pause = Object.assign(Object.assign({}, attrs.pause), { style: Object.assign(Object.assign({}, attrs.pause.style), { x: this._layoutInfo.start.x, y: this._layoutInfo.start.y }) });
27363
- attrs.backward = Object.assign(Object.assign({}, attrs.backward), { style: Object.assign(Object.assign({}, attrs.backward.style), { x: this._layoutInfo.backward.x, y: this._layoutInfo.backward.y }) });
27364
- attrs.forward = Object.assign(Object.assign({}, attrs.forward), { style: Object.assign(Object.assign({}, attrs.forward.style), { x: this._layoutInfo.forward.x, y: this._layoutInfo.forward.y }) });
27365
- }
27366
- else {
27367
- attrs.layout = 'vertical';
27368
- attrs.start = Object.assign(Object.assign({}, attrs.start), { style: Object.assign(Object.assign({}, attrs.start.style), { x: this._layoutInfo.start.x, y: this._layoutInfo.start.y }) });
27369
- attrs.pause = Object.assign(Object.assign({}, attrs.pause), { style: Object.assign(Object.assign({}, attrs.pause.style), { x: this._layoutInfo.start.x, y: this._layoutInfo.start.y }) });
27370
- attrs.backward = Object.assign(Object.assign({}, attrs.backward), { style: Object.assign(Object.assign({}, attrs.backward.style), { x: this._layoutInfo.backward.x, y: this._layoutInfo.backward.y }) });
27371
- attrs.forward = Object.assign(Object.assign({}, attrs.forward), { style: Object.assign(Object.assign({}, attrs.forward.style), { x: this._layoutInfo.forward.x, y: this._layoutInfo.forward.y }) });
27372
- }
26904
+ attrs.layout = isHorizontal(this._orient) ? 'horizontal' : 'vertical';
26905
+ attrs.start = Object.assign(Object.assign({}, attrs.start), { style: Object.assign(Object.assign({}, attrs.start.style), { x: this._layoutInfo.start.x, y: this._layoutInfo.start.y }) });
26906
+ attrs.pause = Object.assign(Object.assign({}, attrs.pause), { style: Object.assign(Object.assign({}, attrs.pause.style), { x: this._layoutInfo.start.x, y: this._layoutInfo.start.y }) });
26907
+ attrs.backward = Object.assign(Object.assign({}, attrs.backward), { style: Object.assign(Object.assign({}, attrs.backward.style), { x: this._layoutInfo.backward.x, y: this._layoutInfo.backward.y }) });
26908
+ attrs.forward = Object.assign(Object.assign({}, attrs.forward), { style: Object.assign(Object.assign({}, attrs.forward.style), { x: this._layoutInfo.forward.x, y: this._layoutInfo.forward.y }) });
27373
26909
  return attrs;
27374
26910
  };
27375
26911
  this._initController = () => {
@@ -28378,11 +27914,8 @@ class Tooltip extends AbstractComponent {
28378
27914
  (isVisible(itemAttr.key) ? keyWidth + itemAttr.key.spacing : 0) +
28379
27915
  (isVisible(itemAttr.value) ? valueWidth : 0)
28380
27916
  : 0;
28381
- const shapeGraphic = this._createShape(itemAttr, itemGroup, itemGroupName);
27917
+ this._createShape(align === 'right' ? x - itemAttr.shape.size / 2 : x + itemAttr.shape.size / 2, itemAttr, itemGroup, itemGroupName);
28382
27918
  if (hasContentShape) {
28383
- if (shapeGraphic) {
28384
- shapeGraphic.setAttribute('x', x);
28385
- }
28386
27919
  if (align === 'right') {
28387
27920
  x -= shapeOffsetWidth;
28388
27921
  }
@@ -28418,10 +27951,10 @@ class Tooltip extends AbstractComponent {
28418
27951
  });
28419
27952
  }
28420
27953
  }
28421
- _createShape(itemAttr, itemGroup, itemGroupName) {
27954
+ _createShape(x, itemAttr, itemGroup, itemGroupName) {
28422
27955
  var _a;
28423
27956
  if (isVisible(itemAttr.shape)) {
28424
- return itemGroup.createOrUpdateChild(`${itemGroupName}-${TOOLTIP_SHAPE_NAME_SUFFIX}`, Object.assign({ visible: true, x: itemAttr.shape.size / 2, y: itemAttr.shape.size / 2 +
27957
+ return itemGroup.createOrUpdateChild(`${itemGroupName}-${TOOLTIP_SHAPE_NAME_SUFFIX}`, Object.assign({ visible: true, x: x, y: itemAttr.shape.size / 2 +
28425
27958
  (((_a = calculateLineHeight(itemAttr.key.lineHeight, itemAttr.key.fontSize)) !== null && _a !== void 0 ? _a : itemAttr.key.fontSize) -
28426
27959
  itemAttr.shape.size) /
28427
27960
  2 }, itemAttr.shape), 'symbol');
@@ -28989,6 +28522,6 @@ EmptyTip.defaultAttributes = {
28989
28522
  }
28990
28523
  };
28991
28524
 
28992
- const version = "0.20.0-alpha.0";
28525
+ const version = "0.20.0-alpha.1";
28993
28526
 
28994
- 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, GroupFadeIn, GroupFadeOut, GroupTransition, 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, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SizeContinuousLegend, Slider, SymbolLabel, Tag, Title, Tooltip, VTag, alignTextInLine, angle, angleLabelOrientAttribute, angleTo, cartesianTicks, clampRadian, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, createTextGraphicByType, deltaXYToAngle, fuzzyEqualNumber, getCircleLabelPosition, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getPolarAngleLabelPosition, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextType, getVerticalCoord, getVerticalPath, htmlAttributeTransform, initTextMeasure, isInRange, isPostiveXAxis, isRichText, isVisible, labelSmartInvert, length, linearDiscreteTicks, loadPoptip, measureTextSize, normalize, polarAngleAxisDiscreteTicks, polarTicks, reactAttributeTransform, registerArcDataLabel, registerLineDataLabel, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerRectDataLabel, registerSymbolDataLabel, removeRepeatPoint, richTextAttributeTransform, scale, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, ticks, traverseGroup, version };
28527
+ 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, 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, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SizeContinuousLegend, Slider, SymbolLabel, Tag, Title, Tooltip, VTag, alignTextInLine, angle, angleLabelOrientAttribute, angleTo, cartesianTicks, clampRadian, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, createTextGraphicByType, deltaXYToAngle, fuzzyEqualNumber, getCircleLabelPosition, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getPolarAngleLabelPosition, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextType, getVerticalCoord, getVerticalPath, htmlAttributeTransform, initTextMeasure, isInRange, isPostiveXAxis, isRichText, isVisible, labelSmartInvert, length, linearDiscreteTicks, loadPoptip, measureTextSize, normalize, polarAngleAxisDiscreteTicks, polarTicks, reactAttributeTransform, registerArcDataLabel, registerLineDataLabel, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerRectDataLabel, registerSymbolDataLabel, removeRepeatPoint, richTextAttributeTransform, scale, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, ticks, traverseGroup, version };