@visactor/vrender 0.17.19 → 0.18.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4278,10 +4278,6 @@
4278
4278
  var defined0 = !1;
4279
4279
  for (var i = 0, n = points.length; i <= n; i++) i >= n === defined0 && ((defined0 = !defined0) ? path.lineStart() : path.lineEnd()), defined0 && path.point(points[i]);
4280
4280
  }
4281
- function genSegContext(curveType, direction, points) {
4282
- var curveDirection = null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? exports.Direction.ROW : exports.Direction.COLUMN;
4283
- return "monotoneY" === curveType ? new ReflectSegContext(curveType, curveDirection) : new SegContext(curveType, curveDirection);
4284
- }
4285
4281
 
4286
4282
  var Linear = /*#__PURE__*/function () {
4287
4283
  function Linear(context, startPoint) {
@@ -4337,7 +4333,7 @@
4337
4333
  var direction = params.direction,
4338
4334
  startPoint = params.startPoint;
4339
4335
  if (points.length < 2 - Number(!!startPoint)) return null;
4340
- var segContext = genSegContext("linear", direction, points);
4336
+ var segContext = new SegContext("linear", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? exports.Direction.ROW : exports.Direction.COLUMN);
4341
4337
  return genLinearTypeSegments(new Linear(segContext, startPoint), points), segContext;
4342
4338
  }
4343
4339
  function genLinearTypeSegments(path, points) {
@@ -4407,7 +4403,7 @@
4407
4403
  startPoint = params.startPoint;
4408
4404
  if (points.length < 2 - Number(!!startPoint)) return null;
4409
4405
  if (points.length < 3 - Number(!!startPoint)) return genLinearSegments(points, params);
4410
- var segContext = genSegContext("basis", direction, points);
4406
+ var segContext = new SegContext("basis", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? exports.Direction.ROW : exports.Direction.COLUMN);
4411
4407
  return genBasisTypeSegments(new Basis(segContext, startPoint), points), segContext;
4412
4408
  }
4413
4409
 
@@ -4514,7 +4510,7 @@
4514
4510
  }]);
4515
4511
  return MonotoneY;
4516
4512
  }(MonotoneX);
4517
- function genMonotoneXTypeSegments(path, points) {
4513
+ function genMonotpneXTypeSegments(path, points) {
4518
4514
  return genCurveSegments(path, points);
4519
4515
  }
4520
4516
  function genMonotoneXSegments(points) {
@@ -4523,10 +4519,10 @@
4523
4519
  startPoint = params.startPoint;
4524
4520
  if (points.length < 2 - Number(!!startPoint)) return null;
4525
4521
  if (points.length < 3 - Number(!!startPoint)) return genLinearSegments(points, params);
4526
- var segContext = genSegContext("monotoneX", direction, points);
4527
- return genMonotoneXTypeSegments(new MonotoneX(segContext, startPoint), points), segContext;
4522
+ var segContext = new SegContext("monotoneX", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? exports.Direction.ROW : exports.Direction.COLUMN);
4523
+ return genMonotpneXTypeSegments(new MonotoneX(segContext, startPoint), points), segContext;
4528
4524
  }
4529
- function genMonotoneYTypeSegments(path, points) {
4525
+ function genMonotpneYTypeSegments(path, points) {
4530
4526
  return genCurveSegments(path, points);
4531
4527
  }
4532
4528
  function genMonotoneYSegments(points) {
@@ -4535,8 +4531,8 @@
4535
4531
  startPoint = params.startPoint;
4536
4532
  if (points.length < 2 - Number(!!startPoint)) return null;
4537
4533
  if (points.length < 3 - Number(!!startPoint)) return genLinearSegments(points, params);
4538
- var segContext = genSegContext("monotoneY", direction, points);
4539
- return genMonotoneYTypeSegments(new MonotoneY(segContext, startPoint), points), segContext;
4534
+ var segContext = new ReflectSegContext("monotoneY", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? exports.Direction.ROW : exports.Direction.COLUMN);
4535
+ return genMonotpneYTypeSegments(new MonotoneY(segContext, startPoint), points), segContext;
4540
4536
  }
4541
4537
 
4542
4538
  var Step$1 = /*#__PURE__*/function () {
@@ -4605,27 +4601,61 @@
4605
4601
  return genCurveSegments(path, points);
4606
4602
  }
4607
4603
 
4608
- var LinearClosed = /*#__PURE__*/function (_Linear) {
4609
- _inherits(LinearClosed, _Linear);
4610
- var _super = _createSuper(LinearClosed);
4611
- function LinearClosed() {
4604
+ var LinearClosed = /*#__PURE__*/function () {
4605
+ function LinearClosed(context, startPoint) {
4612
4606
  _classCallCheck(this, LinearClosed);
4613
- return _super.apply(this, arguments);
4607
+ this.context = context, startPoint && (this.startPoint = startPoint);
4614
4608
  }
4615
4609
  _createClass(LinearClosed, [{
4610
+ key: "areaStart",
4611
+ value: function areaStart() {
4612
+ this._line = 0;
4613
+ }
4614
+ }, {
4615
+ key: "areaEnd",
4616
+ value: function areaEnd() {
4617
+ this._line = NaN;
4618
+ }
4619
+ }, {
4620
+ key: "lineStart",
4621
+ value: function lineStart() {
4622
+ this._point = 0, this.startPoint && this.point(this.startPoint);
4623
+ }
4624
+ }, {
4616
4625
  key: "lineEnd",
4617
4626
  value: function lineEnd() {
4618
4627
  this.context.closePath();
4619
4628
  }
4629
+ }, {
4630
+ key: "point",
4631
+ value: function point(p) {
4632
+ var x = p.x,
4633
+ y = p.y;
4634
+ switch (this._point) {
4635
+ case 0:
4636
+ this._point = 1, this._line ? this.context.lineTo(x, y, !1 !== this._lastDefined && !1 !== p.defined, p) : this.context.moveTo(x, y, p);
4637
+ break;
4638
+ case 1:
4639
+ this._point = 2;
4640
+ default:
4641
+ this.context.lineTo(x, y, !1 !== this._lastDefined && !1 !== p.defined, p);
4642
+ }
4643
+ this._lastDefined = p.defined;
4644
+ }
4645
+ }, {
4646
+ key: "tryUpdateLength",
4647
+ value: function tryUpdateLength() {
4648
+ return this.context.tryUpdateLength();
4649
+ }
4620
4650
  }]);
4621
4651
  return LinearClosed;
4622
- }(Linear);
4652
+ }();
4623
4653
  function genLinearClosedSegments(points) {
4624
4654
  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
4625
4655
  var direction = params.direction,
4626
4656
  startPoint = params.startPoint;
4627
4657
  if (points.length < 2 - Number(!!startPoint)) return null;
4628
- var segContext = genSegContext("linear", direction, points);
4658
+ var segContext = new SegContext("linear", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? exports.Direction.ROW : exports.Direction.COLUMN);
4629
4659
  return genLinearClosedTypeSegments(new LinearClosed(segContext, startPoint), points), segContext;
4630
4660
  }
4631
4661
  function genLinearClosedTypeSegments(path, points) {
@@ -5158,13 +5188,11 @@
5158
5188
  var DefaultStyle = Object.assign(Object.assign(Object.assign(Object.assign({
5159
5189
  opacity: 1,
5160
5190
  background: null,
5161
- backgroundCornerRadius: 0,
5162
5191
  texture: null,
5163
5192
  textureColor: "black",
5164
5193
  textureSize: 10,
5165
5194
  texturePadding: 2,
5166
5195
  backgroundMode: "no-repeat",
5167
- backgroundFit: !0,
5168
5196
  blur: 0,
5169
5197
  cursor: null,
5170
5198
  html: null
@@ -5182,8 +5210,6 @@
5182
5210
  strokeSeg: null,
5183
5211
  pickable: !0,
5184
5212
  childrenPickable: !0,
5185
- fillPickable: !0,
5186
- strokePickable: !0,
5187
5213
  visible: !0,
5188
5214
  zIndex: 0,
5189
5215
  layout: null,
@@ -7860,14 +7886,10 @@
7860
7886
  viewport = params.viewport,
7861
7887
  _params$autoPreventDe = params.autoPreventDefault,
7862
7888
  autoPreventDefault = _params$autoPreventDe === void 0 ? !1 : _params$autoPreventDe,
7863
- clickInterval = params.clickInterval,
7864
- _params$supportsTouch = params.supportsTouchEvents,
7865
- supportsTouchEvents = _params$supportsTouch === void 0 ? global.supportsTouchEvents : _params$supportsTouch,
7866
- _params$supportsPoint = params.supportsPointerEvents,
7867
- supportsPointerEvents = _params$supportsPoint === void 0 ? global.supportsPointerEvents : _params$supportsPoint;
7889
+ clickInterval = params.clickInterval;
7868
7890
  this.manager = new EventManager(rootNode, {
7869
7891
  clickInterval: clickInterval
7870
- }), this.globalObj = global, this.supportsPointerEvents = supportsPointerEvents, this.supportsTouchEvents = supportsTouchEvents, this.supportsMouseEvents = global.supportsMouseEvents, this.applyStyles = global.applyStyles, this.autoPreventDefault = autoPreventDefault, this.eventsAdded = !1, this.viewport = viewport, this.rootPointerEvent = new FederatedPointerEvent(), this.rootWheelEvent = new FederatedWheelEvent(), this.cursorStyles = {
7892
+ }), this.globalObj = global, this.supportsPointerEvents = global.supportsPointerEvents, this.supportsTouchEvents = global.supportsTouchEvents, this.supportsMouseEvents = global.supportsMouseEvents, this.applyStyles = global.applyStyles, this.autoPreventDefault = autoPreventDefault, this.eventsAdded = !1, this.viewport = viewport, this.rootPointerEvent = new FederatedPointerEvent(), this.rootWheelEvent = new FederatedWheelEvent(), this.cursorStyles = {
7871
7893
  "default": "inherit",
7872
7894
  pointer: "pointer"
7873
7895
  }, this.resolution = resolution, this.setTargetElement(targetElement);
@@ -10561,25 +10583,6 @@
10561
10583
  return path;
10562
10584
  }
10563
10585
 
10564
- var normalizeRectAttributes = function normalizeRectAttributes(attribute) {
10565
- if (!attribute) return {
10566
- x: 0,
10567
- y: 0,
10568
- width: 0,
10569
- height: 0
10570
- };
10571
- var width = isNil$1(attribute.width) ? attribute.x1 - attribute.x : attribute.width,
10572
- height = isNil$1(attribute.height) ? attribute.y1 - attribute.y : attribute.height,
10573
- x = 0,
10574
- y = 0;
10575
- return width < 0 ? (x = width, width = -width) : Number.isNaN(width) && (width = 0), height < 0 ? (y = height, height = -height) : Number.isNaN(height) && (height = 0), {
10576
- x: x,
10577
- y: y,
10578
- width: width,
10579
- height: height
10580
- };
10581
- };
10582
-
10583
10586
  function splitToGrids(width, height, count) {
10584
10587
  var ratio = width / height;
10585
10588
  var rowCount, columnCount;
@@ -10591,9 +10594,8 @@
10591
10594
  return grids;
10592
10595
  }
10593
10596
  var splitRect = function splitRect(rect, count) {
10594
- var _normalizeRectAttribu = normalizeRectAttributes(rect.attribute),
10595
- width = _normalizeRectAttribu.width,
10596
- height = _normalizeRectAttribu.height,
10597
+ var width = rect.getComputedAttribute("width"),
10598
+ height = rect.getComputedAttribute("height"),
10597
10599
  grids = splitToGrids(width, height, count),
10598
10600
  res = [],
10599
10601
  gridHeight = height / grids.length;
@@ -11452,8 +11454,7 @@
11452
11454
  var _this;
11453
11455
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
11454
11456
  _classCallCheck(this, Graphic);
11455
- var _a;
11456
- _this = _super.call(this), _this._AABBBounds = new AABBBounds(), _this._updateTag = exports.UpdateTag.INIT, _this.attribute = params, _this.valid = _this.isValid(), params.background && _this.loadImage(null !== (_a = params.background.background) && void 0 !== _a ? _a : params.background, !0);
11457
+ _this = _super.call(this), _this._AABBBounds = new AABBBounds(), _this._updateTag = exports.UpdateTag.INIT, _this.attribute = params, _this.valid = _this.isValid(), params.background && _this.loadImage(params.background, !0);
11457
11458
  return _this;
11458
11459
  }
11459
11460
  _createClass(Graphic, [{
@@ -11662,7 +11663,7 @@
11662
11663
  var context = {
11663
11664
  type: exports.AttributeUpdateType.INIT
11664
11665
  };
11665
- params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params, this.attribute = params, params.background && this.loadImage(params.background, !0), this._updateTag = exports.UpdateTag.INIT, this.valid = this.isValid(), this.onAttributeUpdate(context);
11666
+ params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params, this.attribute = params, params.background && this.loadImage(params.background, !0), this._updateTag = exports.UpdateTag.INIT, this.onAttributeUpdate(context);
11666
11667
  }
11667
11668
  }, {
11668
11669
  key: "translate",
@@ -12766,7 +12767,7 @@
12766
12767
  value: function doUpdateAABBBounds() {
12767
12768
  var attribute = this.attribute,
12768
12769
  groupTheme = getTheme(this).group;
12769
- this._AABBBounds.clear();
12770
+ this._AABBBounds.setValue(1 / 0, 1 / 0, -1 / 0, -1 / 0);
12770
12771
  var bounds = application.graphicService.updateGroupAABBBounds(attribute, groupTheme, this._AABBBounds, this),
12771
12772
  _attribute$boundsPadd = attribute.boundsPadding,
12772
12773
  boundsPadding = _attribute$boundsPadd === void 0 ? groupTheme.boundsPadding : _attribute$boundsPadd,
@@ -13587,7 +13588,7 @@
13587
13588
  key: "doUpdateAABBBounds",
13588
13589
  value: function doUpdateAABBBounds(full) {
13589
13590
  var circleTheme = getTheme(this).circle;
13590
- this._AABBBounds.clear();
13591
+ this._AABBBounds.setValue(1 / 0, 1 / 0, -1 / 0, -1 / 0);
13591
13592
  var attribute = this.attribute,
13592
13593
  bounds = application.graphicService.updateCircleAABBBounds(attribute, getTheme(this).circle, this._AABBBounds, full, this),
13593
13594
  _attribute$boundsPadd = attribute.boundsPadding,
@@ -13774,7 +13775,7 @@
13774
13775
  return CanvasTextLayout;
13775
13776
  }();
13776
13777
 
13777
- var TEXT_UPDATE_TAG_KEY = ["text", "maxLineWidth", "textAlign", "textBaseline", "heightLimit", "lineClamp", "fontSize", "fontFamily", "fontWeight", "ellipsis", "lineHeight", "direction", "wordBreak", "heightLimit", "lineClamp"].concat(_toConsumableArray(GRAPHIC_UPDATE_TAG_KEY));
13778
+ var TEXT_UPDATE_TAG_KEY = ["text", "maxLineWidth", "heightLimit", "lineClamp", "fontSize", "fontFamily", "fontWeight", "ellipsis", "lineHeight", "direction", "wordBreak", "heightLimit", "lineClamp"].concat(_toConsumableArray(GRAPHIC_UPDATE_TAG_KEY));
13778
13779
  var Text = /*#__PURE__*/function (_Graphic) {
13779
13780
  _inherits(Text, _Graphic);
13780
13781
  var _super = _createSuper(Text);
@@ -13815,12 +13816,10 @@
13815
13816
  get: function get() {
13816
13817
  var textTheme = getTheme(this).text,
13817
13818
  attribute = this.attribute;
13818
- if (this.isMultiLine) return;
13819
+ if (!this.isSimplify()) return;
13819
13820
  var _attribute$maxLineWid2 = attribute.maxLineWidth,
13820
13821
  maxLineWidth = _attribute$maxLineWid2 === void 0 ? textTheme.maxLineWidth : _attribute$maxLineWid2;
13821
- return !!Number.isFinite(maxLineWidth) && (this.tryUpdateAABBBounds(), "vertical" === attribute.direction && this.cache.verticalList && this.cache.verticalList[0] ? this.cache.verticalList[0].map(function (item) {
13822
- return item.text;
13823
- }).join("") !== attribute.text.toString() : null != this.clipedText && this.clipedText !== attribute.text.toString());
13822
+ return !!Number.isFinite(maxLineWidth) && (this.tryUpdateAABBBounds(), null != this.clipedText && this.clipedText !== attribute.text.toString());
13824
13823
  }
13825
13824
  }, {
13826
13825
  key: "multilineLayout",
@@ -13854,7 +13853,7 @@
13854
13853
  key: "doUpdateAABBBounds",
13855
13854
  value: function doUpdateAABBBounds() {
13856
13855
  var textTheme = getTheme(this).text;
13857
- this._AABBBounds.clear();
13856
+ this._AABBBounds.setValue(1 / 0, 1 / 0, -1 / 0, -1 / 0);
13858
13857
  var attribute = this.attribute,
13859
13858
  bounds = application.graphicService.updateTextAABBBounds(attribute, textTheme, this._AABBBounds, this),
13860
13859
  _this$attribute$bound = this.attribute.boundsPadding,
@@ -15333,7 +15332,7 @@
15333
15332
  key: "doUpdateAABBBounds",
15334
15333
  value: function doUpdateAABBBounds(full) {
15335
15334
  var symbolTheme = getTheme(this).symbol;
15336
- this._AABBBounds.clear();
15335
+ this._AABBBounds.setValue(1 / 0, 1 / 0, -1 / 0, -1 / 0);
15337
15336
  var attribute = this.attribute,
15338
15337
  bounds = application.graphicService.updateSymbolAABBBounds(attribute, getTheme(this).symbol, this._AABBBounds, full, this),
15339
15338
  _attribute$boundsPadd = attribute.boundsPadding,
@@ -15423,7 +15422,7 @@
15423
15422
  key: "doUpdateAABBBounds",
15424
15423
  value: function doUpdateAABBBounds() {
15425
15424
  var lineTheme = getTheme(this).line;
15426
- this._AABBBounds.clear();
15425
+ this._AABBBounds.setValue(1 / 0, 1 / 0, -1 / 0, -1 / 0);
15427
15426
  var attribute = this.attribute,
15428
15427
  bounds = application.graphicService.updateLineAABBBounds(attribute, getTheme(this).line, this._AABBBounds, this),
15429
15428
  _attribute$boundsPadd = attribute.boundsPadding,
@@ -15514,7 +15513,7 @@
15514
15513
  key: "doUpdateAABBBounds",
15515
15514
  value: function doUpdateAABBBounds() {
15516
15515
  var rectTheme = getTheme(this).rect;
15517
- this._AABBBounds.clear();
15516
+ this._AABBBounds.setValue(1 / 0, 1 / 0, -1 / 0, -1 / 0);
15518
15517
  var attribute = this.attribute,
15519
15518
  bounds = application.graphicService.updateRectAABBBounds(attribute, getTheme(this).rect, this._AABBBounds, this),
15520
15519
  _attribute$boundsPadd = attribute.boundsPadding,
@@ -15545,13 +15544,13 @@
15545
15544
  }, {
15546
15545
  key: "toCustomPath",
15547
15546
  value: function toCustomPath() {
15548
- var attribute = this.attribute,
15549
- _normalizeRectAttribu = normalizeRectAttributes(attribute),
15550
- x = _normalizeRectAttribu.x,
15551
- y = _normalizeRectAttribu.y,
15552
- width = _normalizeRectAttribu.width,
15553
- height = _normalizeRectAttribu.height,
15554
- path = new CustomPath2D();
15547
+ var attribute = this.attribute;
15548
+ var width = isNil$1(attribute.width) ? attribute.x1 - attribute.x : attribute.width,
15549
+ height = isNil$1(attribute.height) ? attribute.y1 - attribute.y : attribute.height,
15550
+ x = 0,
15551
+ y = 0;
15552
+ width < 0 && (x = width, width = -width), height < 0 && (y = height, height = -height);
15553
+ var path = new CustomPath2D();
15555
15554
  return path.moveTo(x, y), path.rect(x, y, width, height), path;
15556
15555
  }
15557
15556
  }, {
@@ -15744,7 +15743,7 @@
15744
15743
  }, {
15745
15744
  key: "doUpdateAABBBounds",
15746
15745
  value: function doUpdateAABBBounds() {
15747
- this._AABBBounds.clear();
15746
+ this._AABBBounds.setValue(1 / 0, 1 / 0, -1 / 0, -1 / 0);
15748
15747
  var bounds = application.graphicService.updateGlyphAABBBounds(this.attribute, getTheme(this).glyph, this._AABBBounds, this);
15749
15748
  return this.clearUpdateBoundTag(), bounds;
15750
15749
  }
@@ -16116,21 +16115,11 @@
16116
16115
  _this3.failCallback && _this3.failCallback();
16117
16116
  });
16118
16117
  }
16119
- }, {
16120
- key: "setAttributes",
16121
- value: function setAttributes(params, forceUpdateTag, context) {
16122
- return params.image && this.loadImage(params.image), _get(_getPrototypeOf(Image.prototype), "setAttributes", this).call(this, params, forceUpdateTag, context);
16123
- }
16124
- }, {
16125
- key: "setAttribute",
16126
- value: function setAttribute(key, value, forceUpdateTag, context) {
16127
- return "image" === key && this.loadImage(value), _get(_getPrototypeOf(Image.prototype), "setAttribute", this).call(this, key, value, forceUpdateTag, context);
16128
- }
16129
16118
  }, {
16130
16119
  key: "doUpdateAABBBounds",
16131
16120
  value: function doUpdateAABBBounds() {
16132
16121
  var imageTheme = getTheme(this).image;
16133
- this._AABBBounds.clear();
16122
+ this._AABBBounds.setValue(1 / 0, 1 / 0, -1 / 0, -1 / 0);
16134
16123
  var attribute = this.attribute,
16135
16124
  bounds = application.graphicService.updateImageAABBBounds(attribute, getTheme(this).image, this._AABBBounds, this),
16136
16125
  _attribute$boundsPadd = attribute.boundsPadding,
@@ -16489,7 +16478,7 @@
16489
16478
  key: "doUpdateAABBBounds",
16490
16479
  value: function doUpdateAABBBounds() {
16491
16480
  var richTextTheme = getTheme(this).richtext;
16492
- this._AABBBounds.clear();
16481
+ this._AABBBounds.setValue(1 / 0, 1 / 0, -1 / 0, -1 / 0);
16493
16482
  var attribute = this.attribute,
16494
16483
  bounds = application.graphicService.updateRichTextAABBBounds(attribute, getTheme(this).richtext, this._AABBBounds, this),
16495
16484
  _attribute$boundsPadd = attribute.boundsPadding,
@@ -16552,13 +16541,10 @@
16552
16541
  _this2.addUpdateBoundTag(), null === (_a = _this2.stage) || void 0 === _a || _a.renderNextFrame();
16553
16542
  }, icon.richtextId = config.id, paragraphs.push(icon);
16554
16543
  }
16555
- } else {
16556
- var richTextConfig = textConfig[i];
16557
- if (isNumber$2(richTextConfig.text) && (richTextConfig.text = "".concat(richTextConfig.text)), richTextConfig.text.includes("\n")) {
16558
- var textParts = richTextConfig.text.split("\n");
16559
- for (var j = 0; j < textParts.length; j++) paragraphs.push(new Paragraph(textParts[j], 0 !== j, richTextConfig));
16560
- } else paragraphs.push(new Paragraph(richTextConfig.text, !1, richTextConfig));
16561
- }
16544
+ } else if (textConfig[i].text.includes("\n")) {
16545
+ var textParts = textConfig[i].text.split("\n");
16546
+ for (var j = 0; j < textParts.length; j++) paragraphs.push(new Paragraph(textParts[j], 0 !== j, textConfig[i]));
16547
+ } else paragraphs.push(new Paragraph(textConfig[i].text, !1, textConfig[i]));
16562
16548
  var maxWidthFinite = "number" == typeof maxWidth && Number.isFinite(maxWidth) && maxWidth > 0,
16563
16549
  maxHeightFinite = "number" == typeof maxHeight && Number.isFinite(maxHeight) && maxHeight > 0,
16564
16550
  richTextWidthEnable = "number" == typeof width && Number.isFinite(width) && width > 0 && (!maxWidthFinite || width <= maxWidth),
@@ -16677,7 +16663,7 @@
16677
16663
  key: "doUpdateAABBBounds",
16678
16664
  value: function doUpdateAABBBounds() {
16679
16665
  var pathTheme = getTheme(this).path;
16680
- this.doUpdatePathShape(), this._AABBBounds.clear();
16666
+ this.doUpdatePathShape(), this._AABBBounds.setValue(1 / 0, 1 / 0, -1 / 0, -1 / 0);
16681
16667
  var attribute = this.attribute,
16682
16668
  bounds = application.graphicService.updatePathAABBBounds(attribute, getTheme(this).path, this._AABBBounds, this),
16683
16669
  _attribute$boundsPadd = attribute.boundsPadding,
@@ -16765,7 +16751,7 @@
16765
16751
  key: "doUpdateAABBBounds",
16766
16752
  value: function doUpdateAABBBounds() {
16767
16753
  var areaTheme = getTheme(this).area;
16768
- this._AABBBounds.clear();
16754
+ this._AABBBounds.setValue(1 / 0, 1 / 0, -1 / 0, -1 / 0);
16769
16755
  var attribute = this.attribute,
16770
16756
  bounds = application.graphicService.updateAreaAABBBounds(attribute, getTheme(this).area, this._AABBBounds, this),
16771
16757
  _attribute$boundsPadd = attribute.boundsPadding,
@@ -16968,7 +16954,7 @@
16968
16954
  key: "doUpdateAABBBounds",
16969
16955
  value: function doUpdateAABBBounds(full) {
16970
16956
  var arcTheme = getTheme(this).arc;
16971
- this._AABBBounds.clear();
16957
+ this._AABBBounds.setValue(1 / 0, 1 / 0, -1 / 0, -1 / 0);
16972
16958
  var attribute = this.attribute,
16973
16959
  bounds = application.graphicService.updateArcAABBBounds(attribute, getTheme(this).arc, this._AABBBounds, full, this),
16974
16960
  _attribute$boundsPadd = attribute.boundsPadding,
@@ -17054,7 +17040,7 @@
17054
17040
  key: "doUpdateAABBBounds",
17055
17041
  value: function doUpdateAABBBounds() {
17056
17042
  var polygonTheme = getTheme(this).arc;
17057
- this._AABBBounds.clear();
17043
+ this._AABBBounds.setValue(1 / 0, 1 / 0, -1 / 0, -1 / 0);
17058
17044
  var attribute = this.attribute,
17059
17045
  bounds = application.graphicService.updateArc3dAABBBounds(attribute, getTheme(this).polygon, this._AABBBounds, this),
17060
17046
  _attribute$boundsPadd = attribute.boundsPadding,
@@ -17102,7 +17088,7 @@
17102
17088
  key: "doUpdateAABBBounds",
17103
17089
  value: function doUpdateAABBBounds() {
17104
17090
  var polygonTheme = getTheme(this).polygon;
17105
- this._AABBBounds.clear();
17091
+ this._AABBBounds.setValue(1 / 0, 1 / 0, -1 / 0, -1 / 0);
17106
17092
  var attribute = this.attribute,
17107
17093
  bounds = application.graphicService.updatePolygonAABBBounds(attribute, getTheme(this).polygon, this._AABBBounds, this),
17108
17094
  _attribute$boundsPadd = attribute.boundsPadding,
@@ -17175,7 +17161,7 @@
17175
17161
  key: "doUpdateAABBBounds",
17176
17162
  value: function doUpdateAABBBounds() {
17177
17163
  var polygonTheme = getTheme(this).polygon;
17178
- this._AABBBounds.clear();
17164
+ this._AABBBounds.setValue(1 / 0, 1 / 0, -1 / 0, -1 / 0);
17179
17165
  var attribute = this.attribute,
17180
17166
  bounds = application.graphicService.updatePyramid3dAABBBounds(attribute, getTheme(this).polygon, this._AABBBounds, this),
17181
17167
  _attribute$boundsPadd = attribute.boundsPadding,
@@ -18135,37 +18121,35 @@
18135
18121
  }, {
18136
18122
  key: "transformAABBBounds",
18137
18123
  value: function transformAABBBounds(attribute, aabbBounds, theme, miter, graphic) {
18138
- if (!aabbBounds.empty()) {
18139
- var _attribute$scaleX2 = attribute.scaleX,
18140
- scaleX = _attribute$scaleX2 === void 0 ? theme.scaleX : _attribute$scaleX2,
18141
- _attribute$scaleY2 = attribute.scaleY,
18142
- scaleY = _attribute$scaleY2 === void 0 ? theme.scaleY : _attribute$scaleY2,
18143
- _attribute$stroke = attribute.stroke,
18144
- stroke = _attribute$stroke === void 0 ? theme.stroke : _attribute$stroke,
18145
- _attribute$shadowBlur2 = attribute.shadowBlur,
18146
- shadowBlur = _attribute$shadowBlur2 === void 0 ? theme.shadowBlur : _attribute$shadowBlur2,
18147
- _attribute$lineWidth = attribute.lineWidth,
18148
- lineWidth = _attribute$lineWidth === void 0 ? theme.lineWidth : _attribute$lineWidth,
18149
- _attribute$pickStroke = attribute.pickStrokeBuffer,
18150
- pickStrokeBuffer = _attribute$pickStroke === void 0 ? theme.pickStrokeBuffer : _attribute$pickStroke,
18151
- _attribute$strokeBoun2 = attribute.strokeBoundsBuffer,
18152
- strokeBoundsBuffer = _attribute$strokeBoun2 === void 0 ? theme.strokeBoundsBuffer : _attribute$strokeBoun2,
18153
- tb1 = this.tempAABBBounds1,
18154
- tb2 = this.tempAABBBounds2;
18155
- if (stroke && lineWidth) {
18156
- var scaledHalfLineWidth = (lineWidth + pickStrokeBuffer) / Math.abs(scaleX + scaleY);
18157
- boundStroke(tb1, scaledHalfLineWidth, miter, strokeBoundsBuffer), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
18158
- }
18159
- if (shadowBlur) {
18160
- var _attribute$shadowOffs = attribute.shadowOffsetX,
18161
- shadowOffsetX = _attribute$shadowOffs === void 0 ? theme.shadowOffsetX : _attribute$shadowOffs,
18162
- _attribute$shadowOffs2 = attribute.shadowOffsetY,
18163
- shadowOffsetY = _attribute$shadowOffs2 === void 0 ? theme.shadowOffsetY : _attribute$shadowOffs2,
18164
- shadowBlurWidth = shadowBlur / Math.abs(scaleX + scaleY) * 2;
18165
- boundStroke(tb1, shadowBlurWidth, !1, strokeBoundsBuffer + 1), tb1.translate(shadowOffsetX, shadowOffsetY), aabbBounds.union(tb1);
18166
- }
18124
+ var _attribute$scaleX2 = attribute.scaleX,
18125
+ scaleX = _attribute$scaleX2 === void 0 ? theme.scaleX : _attribute$scaleX2,
18126
+ _attribute$scaleY2 = attribute.scaleY,
18127
+ scaleY = _attribute$scaleY2 === void 0 ? theme.scaleY : _attribute$scaleY2,
18128
+ _attribute$stroke = attribute.stroke,
18129
+ stroke = _attribute$stroke === void 0 ? theme.stroke : _attribute$stroke,
18130
+ _attribute$shadowBlur2 = attribute.shadowBlur,
18131
+ shadowBlur = _attribute$shadowBlur2 === void 0 ? theme.shadowBlur : _attribute$shadowBlur2,
18132
+ _attribute$lineWidth = attribute.lineWidth,
18133
+ lineWidth = _attribute$lineWidth === void 0 ? theme.lineWidth : _attribute$lineWidth,
18134
+ _attribute$pickStroke = attribute.pickStrokeBuffer,
18135
+ pickStrokeBuffer = _attribute$pickStroke === void 0 ? theme.pickStrokeBuffer : _attribute$pickStroke,
18136
+ _attribute$strokeBoun2 = attribute.strokeBoundsBuffer,
18137
+ strokeBoundsBuffer = _attribute$strokeBoun2 === void 0 ? theme.strokeBoundsBuffer : _attribute$strokeBoun2,
18138
+ tb1 = this.tempAABBBounds1,
18139
+ tb2 = this.tempAABBBounds2;
18140
+ if (stroke && lineWidth) {
18141
+ var scaledHalfLineWidth = (lineWidth + pickStrokeBuffer) / Math.abs(scaleX + scaleY);
18142
+ boundStroke(tb1, scaledHalfLineWidth, miter, strokeBoundsBuffer), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
18167
18143
  }
18168
- if (this.combindShadowAABBBounds(aabbBounds, graphic), aabbBounds.empty()) return;
18144
+ if (shadowBlur) {
18145
+ var _attribute$shadowOffs = attribute.shadowOffsetX,
18146
+ shadowOffsetX = _attribute$shadowOffs === void 0 ? theme.shadowOffsetX : _attribute$shadowOffs,
18147
+ _attribute$shadowOffs2 = attribute.shadowOffsetY,
18148
+ shadowOffsetY = _attribute$shadowOffs2 === void 0 ? theme.shadowOffsetY : _attribute$shadowOffs2,
18149
+ shadowBlurWidth = shadowBlur / Math.abs(scaleX + scaleY) * 2;
18150
+ boundStroke(tb1, shadowBlurWidth, !1, strokeBoundsBuffer + 1), tb1.translate(shadowOffsetX, shadowOffsetY), aabbBounds.union(tb1);
18151
+ }
18152
+ this.combindShadowAABBBounds(aabbBounds, graphic);
18169
18153
  var updateMatrix = !0;
18170
18154
  var m = graphic.transMatrix;
18171
18155
  graphic && graphic.isContainer && (updateMatrix = !(1 === m.a && 0 === m.b && 0 === m.c && 1 === m.d && 0 === m.e && 0 === m.f)), updateMatrix && transformBoundsWithMatrix(aabbBounds, aabbBounds, m);
@@ -18207,7 +18191,7 @@
18207
18191
 
18208
18192
  var text, richText;
18209
18193
  function getTextBounds(params) {
18210
- return text || (text = graphicCreator.CreateGraphic("text", {})), text.initAttributes(params), text.AABBBounds;
18194
+ return text || (text = graphicCreator.CreateGraphic("text", {})), text.setAttributes(params), text.AABBBounds;
18211
18195
  }
18212
18196
  function getRichTextBounds(params) {
18213
18197
  return richText || (richText = graphicCreator.CreateGraphic("richtext", {})), richText.setAttributes(params), richText.AABBBounds;
@@ -18380,254 +18364,6 @@
18380
18364
  return BaseRender;
18381
18365
  }();
18382
18366
 
18383
- var parse = function () {
18384
- var tokens = {
18385
- linearGradient: /^(linear\-gradient)/i,
18386
- radialGradient: /^(radial\-gradient)/i,
18387
- conicGradient: /^(conic\-gradient)/i,
18388
- sideOrCorner: /^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,
18389
- extentKeywords: /^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,
18390
- positionKeywords: /^(left|center|right|top|bottom)/i,
18391
- pixelValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,
18392
- percentageValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,
18393
- emValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,
18394
- angleValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,
18395
- fromAngleValue: /^from\s*(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,
18396
- startCall: /^\(/,
18397
- endCall: /^\)/,
18398
- comma: /^,/,
18399
- hexColor: /(^\#[0-9a-fA-F]+)/,
18400
- literalColor: /^([a-zA-Z]+)/,
18401
- rgbColor: /^(rgb\(\d{1,3},\s*\d{1,3},\s*\d{1,3}\))/i,
18402
- rgbaColor: /^(rgba\(\d{1,3},\s*\d{1,3},\s*\d{1,3},\s*((\d\.\d+)|\d{1,3})\))/i,
18403
- number: /^(([0-9]*\.[0-9]+)|([0-9]+\.?))/
18404
- };
18405
- var input = "";
18406
- function error(msg) {
18407
- var err = new Error(input + ": " + msg);
18408
- throw err.source = input, err;
18409
- }
18410
- function getAST() {
18411
- var ast = matchListing(matchDefinition);
18412
- return input.length > 0 && error("Invalid input not EOF"), ast;
18413
- }
18414
- function matchDefinition() {
18415
- return matchGradient("linear", tokens.linearGradient, matchLinearOrientation) || matchGradient("radial", tokens.radialGradient, matchListRadialOrientations) || matchGradient("conic", tokens.conicGradient, matchConicalOrientation);
18416
- }
18417
- function matchGradient(gradientType, pattern, orientationMatcher) {
18418
- return function (pattern, callback) {
18419
- var captures = scan(pattern);
18420
- if (captures) {
18421
- scan(tokens.startCall) || error("Missing (");
18422
- var result = callback(captures);
18423
- return scan(tokens.endCall) || error("Missing )"), result;
18424
- }
18425
- }(pattern, function (captures) {
18426
- var orientation = orientationMatcher();
18427
- return orientation && (scan(tokens.comma) || error("Missing comma before color stops")), {
18428
- type: gradientType,
18429
- orientation: orientation,
18430
- colorStops: matchListing(matchColorStop)
18431
- };
18432
- });
18433
- }
18434
- function matchLinearOrientation() {
18435
- return match("directional", tokens.sideOrCorner, 1) || match("angular", tokens.angleValue, 1);
18436
- }
18437
- function matchConicalOrientation() {
18438
- return match("angular", tokens.fromAngleValue, 1);
18439
- }
18440
- function matchListRadialOrientations() {
18441
- var radialOrientations,
18442
- lookaheadCache,
18443
- radialOrientation = matchRadialOrientation();
18444
- return radialOrientation && (radialOrientations = [], radialOrientations.push(radialOrientation), lookaheadCache = input, scan(tokens.comma) && (radialOrientation = matchRadialOrientation(), radialOrientation ? radialOrientations.push(radialOrientation) : input = lookaheadCache)), radialOrientations;
18445
- }
18446
- function matchRadialOrientation() {
18447
- var radialType = function () {
18448
- var circle = match("shape", /^(circle)/i, 0);
18449
- circle && (circle.style = matchLength() || matchExtentKeyword());
18450
- return circle;
18451
- }() || function () {
18452
- var ellipse = match("shape", /^(ellipse)/i, 0);
18453
- ellipse && (ellipse.style = matchDistance() || matchExtentKeyword());
18454
- return ellipse;
18455
- }();
18456
- if (radialType) radialType.at = matchAtPosition();else {
18457
- var extent = matchExtentKeyword();
18458
- if (extent) {
18459
- radialType = extent;
18460
- var positionAt = matchAtPosition();
18461
- positionAt && (radialType.at = positionAt);
18462
- } else {
18463
- var defaultPosition = matchPositioning();
18464
- defaultPosition && (radialType = {
18465
- type: "default-radial",
18466
- at: defaultPosition
18467
- });
18468
- }
18469
- }
18470
- return radialType;
18471
- }
18472
- function matchExtentKeyword() {
18473
- return match("extent-keyword", tokens.extentKeywords, 1);
18474
- }
18475
- function matchAtPosition() {
18476
- if (match("position", /^at/, 0)) {
18477
- var positioning = matchPositioning();
18478
- return positioning || error("Missing positioning value"), positioning;
18479
- }
18480
- }
18481
- function matchPositioning() {
18482
- var location = {
18483
- x: matchDistance(),
18484
- y: matchDistance()
18485
- };
18486
- if (location.x || location.y) return {
18487
- type: "position",
18488
- value: location
18489
- };
18490
- }
18491
- function matchListing(matcher) {
18492
- var captures = matcher();
18493
- var result = [];
18494
- if (captures) for (result.push(captures); scan(tokens.comma);) captures = matcher(), captures ? result.push(captures) : error("One extra comma");
18495
- return result;
18496
- }
18497
- function matchColorStop() {
18498
- var color = match("hex", tokens.hexColor, 1) || match("rgba", tokens.rgbaColor, 1) || match("rgb", tokens.rgbColor, 1) || match("literal", tokens.literalColor, 0);
18499
- return color || error("Expected color definition"), color.length = matchDistance(), color;
18500
- }
18501
- function matchDistance() {
18502
- return match("%", tokens.percentageValue, 1) || match("position-keyword", tokens.positionKeywords, 1) || matchLength();
18503
- }
18504
- function matchLength() {
18505
- return match("px", tokens.pixelValue, 1) || match("em", tokens.emValue, 1);
18506
- }
18507
- function match(type, pattern, captureIndex) {
18508
- var captures = scan(pattern);
18509
- if (captures) return {
18510
- type: type,
18511
- value: captures[captureIndex]
18512
- };
18513
- }
18514
- function scan(regexp) {
18515
- var blankCaptures = /^[\n\r\t\s]+/.exec(input);
18516
- blankCaptures && consume(blankCaptures[0].length);
18517
- var captures = regexp.exec(input);
18518
- return captures && consume(captures[0].length), captures;
18519
- }
18520
- function consume(size) {
18521
- input = input.substr(size);
18522
- }
18523
- return function (code) {
18524
- return input = code.toString(), getAST();
18525
- };
18526
- }();
18527
- var GradientParser = /*#__PURE__*/function () {
18528
- function GradientParser() {
18529
- _classCallCheck(this, GradientParser);
18530
- }
18531
- _createClass(GradientParser, null, [{
18532
- key: "IsGradient",
18533
- value: function IsGradient(c) {
18534
- return !("string" == typeof c && c.length < 10);
18535
- }
18536
- }, {
18537
- key: "IsGradientStr",
18538
- value: function IsGradientStr(c) {
18539
- return "string" == typeof c && c.length > 10;
18540
- }
18541
- }, {
18542
- key: "Parse",
18543
- value: function Parse(c) {
18544
- if (GradientParser.IsGradientStr(c)) try {
18545
- var datum = parse(c)[0];
18546
- if (datum) {
18547
- if ("linear" === datum.type) return GradientParser.ParseLinear(datum);
18548
- if ("radial" === datum.type) return GradientParser.ParseRadial(datum);
18549
- if ("conic" === datum.type) return GradientParser.ParseConic(datum);
18550
- }
18551
- } catch (err) {
18552
- return c;
18553
- }
18554
- return c;
18555
- }
18556
- }, {
18557
- key: "ParseConic",
18558
- value: function ParseConic(datum) {
18559
- var orientation = datum.orientation,
18560
- _datum$colorStops = datum.colorStops,
18561
- colorStops = _datum$colorStops === void 0 ? [] : _datum$colorStops,
18562
- halfPi = pi / 2,
18563
- sa = parseFloat(orientation.value) / 180 * pi - halfPi;
18564
- return {
18565
- gradient: "conical",
18566
- x: .5,
18567
- y: .5,
18568
- startAngle: sa,
18569
- endAngle: sa + pi2,
18570
- stops: colorStops.map(function (item) {
18571
- return {
18572
- color: item.value,
18573
- offset: parseFloat(item.length.value) / 100
18574
- };
18575
- })
18576
- };
18577
- }
18578
- }, {
18579
- key: "ParseRadial",
18580
- value: function ParseRadial(datum) {
18581
- var _datum$colorStops2 = datum.colorStops,
18582
- colorStops = _datum$colorStops2 === void 0 ? [] : _datum$colorStops2;
18583
- return {
18584
- gradient: "radial",
18585
- x0: .5,
18586
- y0: .5,
18587
- x1: .5,
18588
- y1: .5,
18589
- r0: 0,
18590
- r1: 1,
18591
- stops: colorStops.map(function (item) {
18592
- return {
18593
- color: item.value,
18594
- offset: parseFloat(item.length.value) / 100
18595
- };
18596
- })
18597
- };
18598
- }
18599
- }, {
18600
- key: "ParseLinear",
18601
- value: function ParseLinear(datum) {
18602
- var orientation = datum.orientation,
18603
- _datum$colorStops3 = datum.colorStops,
18604
- colorStops = _datum$colorStops3 === void 0 ? [] : _datum$colorStops3,
18605
- halfPi = pi / 2;
18606
- var angle = "angular" === orientation.type ? parseFloat(orientation.value) / 180 * pi : 0;
18607
- for (; angle < 0;) angle += pi2;
18608
- for (; angle > pi2;) angle -= pi2;
18609
- var x0 = 0,
18610
- y0 = 0,
18611
- x1 = 0,
18612
- y1 = 0;
18613
- return angle < halfPi ? (x0 = 0, y0 = 1, x1 = Math.sin(angle), y1 = Math.cos(angle)) : angle < pi ? (x0 = 0, y0 = 0, x1 = Math.cos(angle - halfPi), y1 = Math.sin(angle - halfPi)) : angle < pi + halfPi ? (x0 = 1, y0 = 0, x1 = x0 - Math.sin(angle - pi), y1 = Math.cos(angle - pi)) : (x0 = 1, x1 = x0 - Math.cos(angle - halfPi - pi), y1 -= Math.sin(angle - halfPi - pi)), {
18614
- gradient: "linear",
18615
- x0: x0,
18616
- y0: y0,
18617
- x1: x1,
18618
- y1: y1,
18619
- stops: colorStops.map(function (item) {
18620
- return {
18621
- color: item.value,
18622
- offset: parseFloat(item.length.value) / 100
18623
- };
18624
- })
18625
- };
18626
- }
18627
- }]);
18628
- return GradientParser;
18629
- }();
18630
-
18631
18367
  function getScaledStroke(context, width, dpr) {
18632
18368
  var strokeWidth = width;
18633
18369
  var _context$currentMatri = context.currentMatrix,
@@ -18643,7 +18379,7 @@
18643
18379
  if (!c || !0 === c) return "black";
18644
18380
  var result, color;
18645
18381
  if (isArray$1(c)) for (var i = 0; i < c.length && (color = c[i], !color); i++);else color = c;
18646
- 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");
18382
+ return "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");
18647
18383
  }
18648
18384
  function createLinearGradient(context, color, params) {
18649
18385
  var offsetX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
@@ -18744,9 +18480,7 @@
18744
18480
  var _graphic$attribute = graphic.attribute,
18745
18481
  background = _graphic$attribute.background,
18746
18482
  _graphic$attribute$ba = _graphic$attribute.backgroundMode,
18747
- backgroundMode = _graphic$attribute$ba === void 0 ? graphicAttribute.backgroundMode : _graphic$attribute$ba,
18748
- _graphic$attribute$ba2 = _graphic$attribute.backgroundFit,
18749
- backgroundFit = _graphic$attribute$ba2 === void 0 ? graphicAttribute.backgroundFit : _graphic$attribute$ba2;
18483
+ backgroundMode = _graphic$attribute$ba === void 0 ? graphicAttribute.backgroundMode : _graphic$attribute$ba;
18750
18484
  if (background) if (graphic.backgroundImg && graphic.resources) {
18751
18485
  var res = graphic.resources.get(background);
18752
18486
  if ("success" !== res.state || !res.data) return;
@@ -18761,37 +18495,15 @@
18761
18495
  }
18762
18496
  context.clip();
18763
18497
  var b = graphic.AABBBounds;
18764
- context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), this.doDrawImage(context, res.data, b, backgroundMode, backgroundFit), context.restore(), graphic.transMatrix.onlyTranslate() || context.setTransformForCurrent();
18498
+ context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), this.doDrawImage(context, res.data, b, backgroundMode), context.restore(), graphic.transMatrix.onlyTranslate() || context.setTransformForCurrent();
18765
18499
  } else context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.fillStyle = background, context.fill(), context.highPerformanceRestore();
18766
18500
  }
18767
18501
  }, {
18768
18502
  key: "doDrawImage",
18769
- value: function doDrawImage(context, data, b, backgroundMode, backgroundFit) {
18503
+ value: function doDrawImage(context, data, b, backgroundMode) {
18770
18504
  if ("no-repeat" === backgroundMode) context.drawImage(data, b.x1, b.y1, b.width(), b.height());else {
18771
- var targetW = b.width(),
18772
- targetH = b.height();
18773
- var w = targetW,
18774
- h = targetH;
18775
- if (backgroundFit && "repeat" !== backgroundMode && (data.width || data.height)) {
18776
- var resW = data.width,
18777
- resH = data.height;
18778
- if ("repeat-x" === backgroundMode) {
18779
- w = resW * (targetH / resH), h = targetH;
18780
- } else if ("repeat-y" === backgroundMode) {
18781
- h = resH * (targetW / resW), w = targetW;
18782
- }
18783
- var _dpr = context.dpr,
18784
- canvas = canvasAllocate.allocate({
18785
- width: w,
18786
- height: h,
18787
- dpr: _dpr
18788
- }),
18789
- ctx = canvas.getContext("2d");
18790
- ctx && (ctx.inuse = !0, ctx.clearMatrix(), ctx.setTransformForCurrent(!0), ctx.clearRect(0, 0, w, h), ctx.drawImage(data, 0, 0, w, h), data = canvas.nativeCanvas), canvasAllocate.free(canvas);
18791
- }
18792
- var dpr = context.dpr,
18793
- pattern = context.createPattern(data, backgroundMode);
18794
- pattern.setTransform && pattern.setTransform(new DOMMatrix([1 / dpr, 0, 0, 1 / dpr, 0, 0])), context.fillStyle = pattern, context.translate(b.x1, b.y1), context.fillRect(0, 0, targetW, targetH), context.translate(-b.x1, -b.y1);
18505
+ var pattern = context.createPattern(data, backgroundMode);
18506
+ context.fillStyle = pattern, context.translate(b.x1, b.y1), context.fillRect(0, 0, b.width(), b.height()), context.translate(-b.x1, -b.y1);
18795
18507
  }
18796
18508
  }
18797
18509
  }]);
@@ -18814,7 +18526,6 @@
18814
18526
  return DefaultBaseInteractiveRenderContribution;
18815
18527
  }();
18816
18528
  exports.DefaultBaseInteractiveRenderContribution = __decorate$1w([injectable(), __param$O(0, inject(ContributionProvider)), __param$O(0, named(InteractiveSubRenderContribution)), __metadata$19("design:paramtypes", [Object])], exports.DefaultBaseInteractiveRenderContribution);
18817
-
18818
18529
  var DefaultBaseTextureRenderContribution = /*#__PURE__*/function () {
18819
18530
  function DefaultBaseTextureRenderContribution() {
18820
18531
  _classCallCheck(this, DefaultBaseTextureRenderContribution);
@@ -18915,20 +18626,16 @@
18915
18626
  key: "drawShape",
18916
18627
  value: function drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
18917
18628
  this.textureMap || this.initTextureMap(context, graphic.stage);
18918
- var _graphic$attribute = graphic.attribute,
18919
- _graphic$attribute$te = _graphic$attribute.texture,
18920
- texture = _graphic$attribute$te === void 0 ? graphicAttribute.texture : _graphic$attribute$te,
18921
- _graphic$attribute$te2 = _graphic$attribute.textureColor,
18922
- textureColor = _graphic$attribute$te2 === void 0 ? graphicAttribute.textureColor : _graphic$attribute$te2,
18923
- _graphic$attribute$te3 = _graphic$attribute.textureSize,
18924
- textureSize = _graphic$attribute$te3 === void 0 ? graphicAttribute.textureSize : _graphic$attribute$te3,
18925
- _graphic$attribute$te4 = _graphic$attribute.texturePadding,
18926
- texturePadding = _graphic$attribute$te4 === void 0 ? graphicAttribute.texturePadding : _graphic$attribute$te4;
18927
- texture && this.drawTexture(texture, graphic, context, x, y, graphicAttribute, textureColor, textureSize, texturePadding);
18928
- }
18929
- }, {
18930
- key: "drawTexture",
18931
- value: function drawTexture(texture, graphic, context, x, y, graphicAttribute, textureColor, textureSize, texturePadding) {
18629
+ var _graphic$attribute2 = graphic.attribute,
18630
+ _graphic$attribute2$t = _graphic$attribute2.texture,
18631
+ texture = _graphic$attribute2$t === void 0 ? graphicAttribute.texture : _graphic$attribute2$t,
18632
+ _graphic$attribute2$t2 = _graphic$attribute2.textureColor,
18633
+ textureColor = _graphic$attribute2$t2 === void 0 ? graphicAttribute.textureColor : _graphic$attribute2$t2,
18634
+ _graphic$attribute2$t3 = _graphic$attribute2.textureSize,
18635
+ textureSize = _graphic$attribute2$t3 === void 0 ? graphicAttribute.textureSize : _graphic$attribute2$t3,
18636
+ _graphic$attribute2$t4 = _graphic$attribute2.texturePadding,
18637
+ texturePadding = _graphic$attribute2$t4 === void 0 ? graphicAttribute.texturePadding : _graphic$attribute2$t4;
18638
+ if (!texture) return;
18932
18639
  var pattern = this.textureMap.get(texture);
18933
18640
  if (!pattern) switch (texture) {
18934
18641
  case "circle":
@@ -19115,15 +18822,13 @@
19115
18822
  var _graphic$attribute = graphic.attribute,
19116
18823
  background = _graphic$attribute.background,
19117
18824
  _graphic$attribute$ba = _graphic$attribute.backgroundMode,
19118
- backgroundMode = _graphic$attribute$ba === void 0 ? graphicAttribute.backgroundMode : _graphic$attribute$ba,
19119
- _graphic$attribute$ba2 = _graphic$attribute.backgroundFit,
19120
- backgroundFit = _graphic$attribute$ba2 === void 0 ? graphicAttribute.backgroundFit : _graphic$attribute$ba2;
18825
+ backgroundMode = _graphic$attribute$ba === void 0 ? graphicAttribute.backgroundMode : _graphic$attribute$ba;
19121
18826
  if (background) if (graphic.backgroundImg && graphic.resources) {
19122
18827
  var res = graphic.resources.get(background);
19123
18828
  if ("success" !== res.state || !res.data) return;
19124
18829
  context.highPerformanceSave(), context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0);
19125
18830
  var b = graphic.AABBBounds;
19126
- this.doDrawImage(context, res.data, b, backgroundMode, backgroundFit), context.highPerformanceRestore(), context.setTransformForCurrent();
18831
+ this.doDrawImage(context, res.data, b, backgroundMode), context.highPerformanceRestore(), context.setTransformForCurrent();
19127
18832
  } else context.highPerformanceSave(), context.fillStyle = background, context.fill(), context.highPerformanceRestore();
19128
18833
  }
19129
18834
  }]);
@@ -19205,9 +18910,7 @@
19205
18910
  var _graphic$attribute = graphic.attribute,
19206
18911
  background = _graphic$attribute.background,
19207
18912
  _graphic$attribute$ba = _graphic$attribute.backgroundMode,
19208
- backgroundMode = _graphic$attribute$ba === void 0 ? graphicAttribute.backgroundMode : _graphic$attribute$ba,
19209
- _graphic$attribute$ba2 = _graphic$attribute.backgroundFit,
19210
- backgroundFit = _graphic$attribute$ba2 === void 0 ? graphicAttribute.backgroundFit : _graphic$attribute$ba2;
18913
+ backgroundMode = _graphic$attribute$ba === void 0 ? graphicAttribute.backgroundMode : _graphic$attribute$ba;
19211
18914
  if (background) if (graphic.backgroundImg) {
19212
18915
  var res = graphic.resources.get(background);
19213
18916
  if ("success" !== res.state || !res.data) return;
@@ -19221,7 +18924,7 @@
19221
18924
  context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), context.translate(scrollX, scrollY);
19222
18925
  }
19223
18926
  var b = graphic.AABBBounds;
19224
- this.doDrawImage(context, res.data, b, backgroundMode, backgroundFit), context.restore(), graphic.transMatrix.onlyTranslate() || context.setTransformForCurrent();
18927
+ this.doDrawImage(context, res.data, b, backgroundMode), context.restore(), graphic.transMatrix.onlyTranslate() || context.setTransformForCurrent();
19225
18928
  } else if (isObject$1(background)) {
19226
18929
  var stroke = background.stroke,
19227
18930
  fill = background.fill,
@@ -19448,37 +19151,6 @@
19448
19151
  var defaultSymbolTextureRenderContribution = defaultBaseTextureRenderContribution;
19449
19152
  var defaultSymbolBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
19450
19153
 
19451
- var DefaultAreaTextureRenderContribution = /*#__PURE__*/function (_DefaultBaseTextureRe) {
19452
- _inherits(DefaultAreaTextureRenderContribution, _DefaultBaseTextureRe);
19453
- var _super = _createSuper(DefaultAreaTextureRenderContribution);
19454
- function DefaultAreaTextureRenderContribution() {
19455
- var _this;
19456
- _classCallCheck(this, DefaultAreaTextureRenderContribution);
19457
- _this = _super.apply(this, arguments), _this.time = exports.BaseRenderContributionTime.afterFillStroke;
19458
- return _this;
19459
- }
19460
- _createClass(DefaultAreaTextureRenderContribution, [{
19461
- key: "drawShape",
19462
- value: function drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
19463
- var _a, _b, _c, _d;
19464
- this.textureMap || this.initTextureMap(context, graphic.stage);
19465
- var _ref = options || {},
19466
- _ref$attribute = _ref.attribute,
19467
- attribute = _ref$attribute === void 0 ? graphic.attribute : _ref$attribute,
19468
- _attribute$texture = attribute.texture,
19469
- texture = _attribute$texture === void 0 ? null !== (_a = graphic.attribute.texture) && void 0 !== _a ? _a : getAttributeFromDefaultAttrList(graphicAttribute, "texture") : _attribute$texture,
19470
- _attribute$textureCol = attribute.textureColor,
19471
- textureColor = _attribute$textureCol === void 0 ? null !== (_b = graphic.attribute.textureColor) && void 0 !== _b ? _b : getAttributeFromDefaultAttrList(graphicAttribute, "textureColor") : _attribute$textureCol,
19472
- _attribute$textureSiz = attribute.textureSize,
19473
- textureSize = _attribute$textureSiz === void 0 ? null !== (_c = graphic.attribute.textureSize) && void 0 !== _c ? _c : getAttributeFromDefaultAttrList(graphicAttribute, "textureSize") : _attribute$textureSiz,
19474
- _attribute$texturePad = attribute.texturePadding,
19475
- texturePadding = _attribute$texturePad === void 0 ? null !== (_d = graphic.attribute.texturePadding) && void 0 !== _d ? _d : getAttributeFromDefaultAttrList(graphicAttribute, "texturePadding") : _attribute$texturePad;
19476
- texture && this.drawTexture(texture, graphic, context, x, y, graphicAttribute, textureColor, textureSize, texturePadding);
19477
- }
19478
- }]);
19479
- return DefaultAreaTextureRenderContribution;
19480
- }(DefaultBaseTextureRenderContribution);
19481
-
19482
19154
  var __decorate$1u = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19483
19155
  var d,
19484
19156
  c = arguments.length,
@@ -19719,26 +19391,6 @@
19719
19391
  }(BaseRender);
19720
19392
  exports.DefaultCanvasCircleRender = __decorate$1t([injectable(), __param$M(0, inject(ContributionProvider)), __param$M(0, named(CircleRenderContribution)), __metadata$17("design:paramtypes", [Object])], exports.DefaultCanvasCircleRender);
19721
19393
 
19722
- function drawSegItem(ctx, curve, endPercent, params) {
19723
- if (!curve.p1) return;
19724
- var _ref = params || {},
19725
- _ref$offsetX = _ref.offsetX,
19726
- offsetX = _ref$offsetX === void 0 ? 0 : _ref$offsetX,
19727
- _ref$offsetY = _ref.offsetY,
19728
- offsetY = _ref$offsetY === void 0 ? 0 : _ref$offsetY,
19729
- _ref$offsetZ = _ref.offsetZ,
19730
- offsetZ = _ref$offsetZ === void 0 ? 0 : _ref$offsetZ;
19731
- if (1 === endPercent) curve.p2 && curve.p3 ? ctx.bezierCurveTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetX + curve.p2.x, offsetY + curve.p2.y, offsetX + curve.p3.x, offsetY + curve.p3.y, offsetZ) : ctx.lineTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetZ);else if (curve.p2 && curve.p3) {
19732
- var _divideCubic = divideCubic(curve, endPercent),
19733
- _divideCubic2 = _slicedToArray(_divideCubic, 1),
19734
- curve1 = _divideCubic2[0];
19735
- ctx.bezierCurveTo(offsetX + curve1.p1.x, offsetY + curve1.p1.y, offsetX + curve1.p2.x, offsetY + curve1.p2.y, offsetX + curve1.p3.x, offsetY + curve1.p3.y, offsetZ);
19736
- } else {
19737
- var p = curve.getPointAt(endPercent);
19738
- ctx.lineTo(offsetX + p.x, offsetY + p.y, offsetZ);
19739
- }
19740
- }
19741
-
19742
19394
  function drawSegments(path, segPath, percent, clipRangeByDimension, params) {
19743
19395
  var _a;
19744
19396
  var _ref = params || {},
@@ -19781,7 +19433,7 @@
19781
19433
  } else _lastCurve = curve;
19782
19434
  });
19783
19435
  } else curves.forEach(function (curve) {
19784
- curve.defined ? (needMoveTo && path.moveTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), drawSegItem(path, curve, 1, params), needMoveTo = !1) : needMoveTo = !0;
19436
+ curve.defined ? (needMoveTo && path.moveTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), drawSegItem$1(path, curve, 1, params), needMoveTo = !1) : needMoveTo = !0;
19785
19437
  });
19786
19438
  return;
19787
19439
  }
@@ -19820,7 +19472,7 @@
19820
19472
  needMoveTo = !0;
19821
19473
  continue;
19822
19474
  }
19823
- needMoveTo && path.moveTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), drawSegItem(path, curve, min(_p, 1), params), needMoveTo = !1;
19475
+ needMoveTo && path.moveTo(curve.p0.x + offsetX, curve.p0.y + offsetY, offsetZ), drawSegItem$1(path, curve, min(_p, 1), params), needMoveTo = !1;
19824
19476
  }
19825
19477
  }
19826
19478
  }
@@ -19857,6 +19509,25 @@
19857
19509
  path.lineTo(null !== (_c = startP.x1) && void 0 !== _c ? _c : startP.x, null !== (_d = startP.y1) && void 0 !== _d ? _d : startP.y), path.closePath();
19858
19510
  });
19859
19511
  }
19512
+ function drawSegItem$1(ctx, curve, endPercent, params) {
19513
+ if (!curve.p1) return;
19514
+ var _ref4 = params || {},
19515
+ _ref4$offsetX = _ref4.offsetX,
19516
+ offsetX = _ref4$offsetX === void 0 ? 0 : _ref4$offsetX,
19517
+ _ref4$offsetY = _ref4.offsetY,
19518
+ offsetY = _ref4$offsetY === void 0 ? 0 : _ref4$offsetY,
19519
+ _ref4$offsetZ = _ref4.offsetZ,
19520
+ offsetZ = _ref4$offsetZ === void 0 ? 0 : _ref4$offsetZ;
19521
+ if (1 === endPercent) curve.p2 && curve.p3 ? ctx.bezierCurveTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetX + curve.p2.x, offsetY + curve.p2.y, offsetX + curve.p3.x, offsetY + curve.p3.y, offsetZ) : ctx.lineTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetZ);else if (curve.p2 && curve.p3) {
19522
+ var _divideCubic = divideCubic(curve, endPercent),
19523
+ _divideCubic2 = _slicedToArray(_divideCubic, 1),
19524
+ curve1 = _divideCubic2[0];
19525
+ ctx.bezierCurveTo(offsetX + curve1.p1.x, offsetY + curve1.p1.y, offsetX + curve1.p2.x, offsetY + curve1.p2.y, offsetX + curve1.p3.x, offsetY + curve1.p3.y, offsetZ);
19526
+ } else {
19527
+ var p = curve.getPointAt(endPercent);
19528
+ ctx.lineTo(offsetX + p.x, offsetY + p.y, offsetZ);
19529
+ }
19530
+ }
19860
19531
 
19861
19532
  var __decorate$1s = undefined && undefined.__decorate || function (decorators, target, key, desc) {
19862
19533
  var d,
@@ -20164,7 +19835,83 @@
20164
19835
  }
20165
19836
  path.closePath();
20166
19837
  }
19838
+ function drawSegItem(ctx, curve, endPercent, params) {
19839
+ if (!curve.p1) return;
19840
+ var _ref5 = params || {},
19841
+ _ref5$offsetX = _ref5.offsetX,
19842
+ offsetX = _ref5$offsetX === void 0 ? 0 : _ref5$offsetX,
19843
+ _ref5$offsetY = _ref5.offsetY,
19844
+ offsetY = _ref5$offsetY === void 0 ? 0 : _ref5$offsetY,
19845
+ _ref5$offsetZ = _ref5.offsetZ,
19846
+ offsetZ = _ref5$offsetZ === void 0 ? 0 : _ref5$offsetZ;
19847
+ if (1 === endPercent) curve.p2 && curve.p3 ? ctx.bezierCurveTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetX + curve.p2.x, offsetY + curve.p2.y, offsetX + curve.p3.x, offsetY + curve.p3.y, offsetZ) : ctx.lineTo(offsetX + curve.p1.x, offsetY + curve.p1.y, offsetZ);else if (curve.p2 && curve.p3) {
19848
+ var _divideCubic = divideCubic(curve, endPercent),
19849
+ _divideCubic2 = _slicedToArray(_divideCubic, 1),
19850
+ curve1 = _divideCubic2[0];
19851
+ ctx.bezierCurveTo(offsetX + curve1.p1.x, offsetY + curve1.p1.y, offsetX + curve1.p2.x, offsetY + curve1.p2.y, offsetX + curve1.p3.x, offsetY + curve1.p3.y, offsetZ);
19852
+ } else {
19853
+ var p = curve.getPointAt(endPercent);
19854
+ ctx.lineTo(offsetX + p.x, offsetY + p.y, offsetZ);
19855
+ }
19856
+ }
20167
19857
 
19858
+ var DefaultAreaTextureRenderContribution = /*#__PURE__*/function (_DefaultBaseTextureRe) {
19859
+ _inherits(DefaultAreaTextureRenderContribution, _DefaultBaseTextureRe);
19860
+ var _super = _createSuper(DefaultAreaTextureRenderContribution);
19861
+ function DefaultAreaTextureRenderContribution() {
19862
+ var _this;
19863
+ _classCallCheck(this, DefaultAreaTextureRenderContribution);
19864
+ _this = _super.apply(this, arguments), _this.time = exports.BaseRenderContributionTime.afterFillStroke;
19865
+ return _this;
19866
+ }
19867
+ _createClass(DefaultAreaTextureRenderContribution, [{
19868
+ key: "drawShape",
19869
+ value: function drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
19870
+ var _a, _b, _c, _d;
19871
+ this.textureMap || this.initTextureMap(context, graphic.stage);
19872
+ var _ref = options || {},
19873
+ _ref$attribute = _ref.attribute,
19874
+ attribute = _ref$attribute === void 0 ? graphic.attribute : _ref$attribute,
19875
+ _attribute$texture = attribute.texture,
19876
+ texture = _attribute$texture === void 0 ? null !== (_a = graphic.attribute.texture) && void 0 !== _a ? _a : getAttributeFromDefaultAttrList(graphicAttribute, "texture") : _attribute$texture,
19877
+ _attribute$textureCol = attribute.textureColor,
19878
+ textureColor = _attribute$textureCol === void 0 ? null !== (_b = graphic.attribute.textureColor) && void 0 !== _b ? _b : getAttributeFromDefaultAttrList(graphicAttribute, "textureColor") : _attribute$textureCol,
19879
+ _attribute$textureSiz = attribute.textureSize,
19880
+ textureSize = _attribute$textureSiz === void 0 ? null !== (_c = graphic.attribute.textureSize) && void 0 !== _c ? _c : getAttributeFromDefaultAttrList(graphicAttribute, "textureSize") : _attribute$textureSiz,
19881
+ _attribute$texturePad = attribute.texturePadding,
19882
+ texturePadding = _attribute$texturePad === void 0 ? null !== (_d = graphic.attribute.texturePadding) && void 0 !== _d ? _d : getAttributeFromDefaultAttrList(graphicAttribute, "texturePadding") : _attribute$texturePad;
19883
+ if (!texture) return;
19884
+ var pattern = this.textureMap.get(texture);
19885
+ if (!pattern) switch (texture) {
19886
+ case "circle":
19887
+ pattern = this.createCirclePattern(textureSize, texturePadding, textureColor, context);
19888
+ break;
19889
+ case "diamond":
19890
+ pattern = this.createDiamondPattern(textureSize, texturePadding, textureColor, context);
19891
+ break;
19892
+ case "rect":
19893
+ pattern = this.createRectPattern(textureSize, texturePadding, textureColor, context);
19894
+ break;
19895
+ case "vertical-line":
19896
+ pattern = this.createVerticalLinePattern(textureSize, texturePadding, textureColor, context);
19897
+ break;
19898
+ case "horizontal-line":
19899
+ pattern = this.createHorizontalLinePattern(textureSize, texturePadding, textureColor, context);
19900
+ break;
19901
+ case "bias-lr":
19902
+ pattern = this.createBiasLRLinePattern(textureSize, texturePadding, textureColor, context);
19903
+ break;
19904
+ case "bias-rl":
19905
+ pattern = this.createBiasRLLinePattern(textureSize, texturePadding, textureColor, context);
19906
+ break;
19907
+ case "grid":
19908
+ pattern = this.createGridPattern(textureSize, texturePadding, textureColor, context);
19909
+ }
19910
+ pattern && (context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.fillStyle = pattern, context.fill(), context.highPerformanceRestore());
19911
+ }
19912
+ }]);
19913
+ return DefaultAreaTextureRenderContribution;
19914
+ }(DefaultBaseTextureRenderContribution);
20168
19915
  var defaultAreaTextureRenderContribution = new DefaultAreaTextureRenderContribution();
20169
19916
  var defaultAreaBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
20170
19917
 
@@ -20238,9 +19985,7 @@
20238
19985
  originX = _area$attribute$x === void 0 ? 0 : _area$attribute$x,
20239
19986
  _area$attribute$x2 = _area$attribute.x,
20240
19987
  originY = _area$attribute$x2 === void 0 ? 0 : _area$attribute$x2;
20241
- if (!1 !== fill && (fillCb ? fillCb(context, area.attribute, areaAttribute) : fillOpacity && (context.setCommonStyle(area, area.attribute, originX - offsetX, originY - offsetY, areaAttribute), context.fill())), this.afterRenderStep(area, context, offsetX, offsetY, !!fillOpacity, !1, fill, !1, areaAttribute, drawContext, fillCb, null, {
20242
- attribute: area.attribute
20243
- }), stroke) {
19988
+ if (!1 !== fill && (fillCb ? fillCb(context, area.attribute, areaAttribute) : fillOpacity && (context.setCommonStyle(area, area.attribute, originX - offsetX, originY - offsetY, areaAttribute), context.fill())), stroke) {
20244
19989
  var _area$attribute$strok = area.attribute.stroke,
20245
19990
  _stroke = _area$attribute$strok === void 0 ? areaAttribute && areaAttribute.stroke : _area$attribute$strok;
20246
19991
  if (isArray$1(_stroke) && (_stroke[0] || _stroke[2]) && !1 === _stroke[1]) if (context.beginPath(), _stroke[0]) {
@@ -20257,7 +20002,9 @@
20257
20002
  context.lineTo((null !== (_d = _p3.x1) && void 0 !== _d ? _d : _p3.x) + offsetX, (null !== (_e = _p3.y1) && void 0 !== _e ? _e : _p3.y) + offsetY, z);
20258
20003
  }
20259
20004
  }
20260
- strokeCb ? strokeCb(context, area.attribute, areaAttribute) : (context.setStrokeStyle(area, area.attribute, originX - offsetX, originY - offsetY, areaAttribute), context.stroke());
20005
+ context.setStrokeStyle(area, area.attribute, originX - offsetX, originY - offsetY, areaAttribute), context.stroke(), this.afterRenderStep(area, context, offsetX, offsetY, !!fillOpacity, !1, fill, !1, areaAttribute, drawContext, fillCb, null, {
20006
+ attribute: area.attribute
20007
+ });
20261
20008
  }
20262
20009
  }
20263
20010
  }, {
@@ -20682,46 +20429,6 @@
20682
20429
  }(BaseRender);
20683
20430
  exports.DefaultCanvasSymbolRender = __decorate$1o([injectable(), __param$I(0, inject(ContributionProvider)), __param$I(0, named(SymbolRenderContribution)), __metadata$13("design:paramtypes", [Object])], exports.DefaultCanvasSymbolRender);
20684
20431
 
20685
- var DefaultBoundsAllocate = /*#__PURE__*/function () {
20686
- function DefaultBoundsAllocate() {
20687
- _classCallCheck(this, DefaultBoundsAllocate);
20688
- this.pools = [];
20689
- for (var i = 0; i < 10; i++) this.pools.push(new AABBBounds());
20690
- }
20691
- _createClass(DefaultBoundsAllocate, [{
20692
- key: "allocate",
20693
- value: function allocate(x1, y1, x2, y2) {
20694
- if (!this.pools.length) return new AABBBounds().setValue(x1, y1, x2, y2);
20695
- var b = this.pools.pop();
20696
- return b.x1 = x1, b.y1 = y1, b.x2 = x2, b.y2 = y2, b;
20697
- }
20698
- }, {
20699
- key: "allocateByObj",
20700
- value: function allocateByObj(b) {
20701
- if (!this.pools.length) return new AABBBounds(b);
20702
- var _b = this.pools.pop();
20703
- return _b.x1 = b.x1, _b.y1 = b.y1, _b.x2 = b.x2, _b.y2 = b.y2, _b;
20704
- }
20705
- }, {
20706
- key: "free",
20707
- value: function free(b) {
20708
- this.pools.push(b);
20709
- }
20710
- }, {
20711
- key: "length",
20712
- get: function get() {
20713
- return this.pools.length;
20714
- }
20715
- }, {
20716
- key: "release",
20717
- value: function release() {
20718
- this.pools = [];
20719
- }
20720
- }]);
20721
- return DefaultBoundsAllocate;
20722
- }();
20723
- var boundsAllocate = new DefaultBoundsAllocate();
20724
-
20725
20432
  var DefaultTextBackgroundRenderContribution = /*#__PURE__*/function (_DefaultBaseBackgroun) {
20726
20433
  _inherits(DefaultTextBackgroundRenderContribution, _DefaultBaseBackgroun);
20727
20434
  var _super = _createSuper(DefaultTextBackgroundRenderContribution);
@@ -20734,38 +20441,17 @@
20734
20441
  _createClass(DefaultTextBackgroundRenderContribution, [{
20735
20442
  key: "drawShape",
20736
20443
  value: function drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb) {
20737
- var _a, _c, _d, _e, _f, _g, _h, _j, _k, _l;
20738
20444
  var _graphic$attribute = graphic.attribute,
20445
+ background = _graphic$attribute.background,
20739
20446
  _graphic$attribute$ba = _graphic$attribute.backgroundMode,
20740
- backgroundMode = _graphic$attribute$ba === void 0 ? graphicAttribute.backgroundMode : _graphic$attribute$ba,
20741
- _graphic$attribute$ba2 = _graphic$attribute.backgroundFit,
20742
- backgroundFit = _graphic$attribute$ba2 === void 0 ? graphicAttribute.backgroundFit : _graphic$attribute$ba2;
20743
- var b,
20744
- background = graphic.attribute.background;
20447
+ backgroundMode = _graphic$attribute$ba === void 0 ? graphicAttribute.backgroundMode : _graphic$attribute$ba;
20745
20448
  if (!background) return;
20746
- var shouldReCalBounds = isObject$1(background) && background.background,
20747
- onlyTranslate = graphic.transMatrix.onlyTranslate();
20748
- if (shouldReCalBounds) {
20749
- var _b = graphic.AABBBounds,
20750
- _x = (null !== (_a = background.x) && void 0 !== _a ? _a : _b.x1) + (null !== (_c = background.dx) && void 0 !== _c ? _c : 0),
20751
- _y = (null !== (_d = background.y) && void 0 !== _d ? _d : _b.y1) + (null !== (_e = background.dy) && void 0 !== _e ? _e : 0),
20752
- w = null !== (_f = background.width) && void 0 !== _f ? _f : _b.width(),
20753
- h = null !== (_g = background.height) && void 0 !== _g ? _g : _b.height();
20754
- if (b = boundsAllocate.allocate(_x, _y, _x + w, _y + h), background = background.background, !onlyTranslate) {
20755
- var _w = b.width(),
20756
- _h2 = b.height();
20757
- b.set((null !== (_h = background.x) && void 0 !== _h ? _h : 0) + (null !== (_j = background.dx) && void 0 !== _j ? _j : 0), (null !== (_k = background.y) && void 0 !== _k ? _k : 0) + (null !== (_l = background.dy) && void 0 !== _l ? _l : 0), _w, _h2);
20758
- }
20759
- } else b = graphic.AABBBounds, onlyTranslate || b.set(0, 0, b.width(), b.height());
20449
+ var b = graphic.AABBBounds;
20760
20450
  if (graphic.backgroundImg && graphic.resources) {
20761
20451
  var res = graphic.resources.get(background);
20762
20452
  if ("success" !== res.state || !res.data) return;
20763
- context.highPerformanceSave(), onlyTranslate && context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), this.doDrawImage(context, res.data, b, backgroundMode, backgroundFit), context.highPerformanceRestore(), context.setTransformForCurrent();
20764
- } else {
20765
- var backgroundCornerRadius = graphic.attribute.backgroundCornerRadius;
20766
- context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.fillStyle = background, backgroundCornerRadius ? (createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius), context.fill()) : context.fillRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore();
20767
- }
20768
- shouldReCalBounds && boundsAllocate.free(b);
20453
+ context.highPerformanceSave(), context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), this.doDrawImage(context, res.data, b, backgroundMode), context.highPerformanceRestore(), context.setTransformForCurrent();
20454
+ } else context.highPerformanceSave(), context.fillStyle = background, context.fillRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore();
20769
20455
  }
20770
20456
  }]);
20771
20457
  return DefaultTextBackgroundRenderContribution;
@@ -22167,6 +21853,46 @@
22167
21853
  return Canvas3DDrawItemInterceptor;
22168
21854
  }();
22169
21855
 
21856
+ var DefaultBoundsAllocate = /*#__PURE__*/function () {
21857
+ function DefaultBoundsAllocate() {
21858
+ _classCallCheck(this, DefaultBoundsAllocate);
21859
+ this.pools = [];
21860
+ for (var i = 0; i < 10; i++) this.pools.push(new AABBBounds());
21861
+ }
21862
+ _createClass(DefaultBoundsAllocate, [{
21863
+ key: "allocate",
21864
+ value: function allocate(x1, y1, x2, y2) {
21865
+ if (!this.pools.length) return new AABBBounds().setValue(x1, y1, x2, y2);
21866
+ var b = this.pools.pop();
21867
+ return b.x1 = x1, b.y1 = y1, b.x2 = x2, b.y2 = y2, b;
21868
+ }
21869
+ }, {
21870
+ key: "allocateByObj",
21871
+ value: function allocateByObj(b) {
21872
+ if (!this.pools.length) return new AABBBounds(b);
21873
+ var _b = this.pools.pop();
21874
+ return _b.x1 = b.x1, _b.y1 = b.y1, _b.x2 = b.x2, _b.y2 = b.y2, _b;
21875
+ }
21876
+ }, {
21877
+ key: "free",
21878
+ value: function free(b) {
21879
+ this.pools.push(b);
21880
+ }
21881
+ }, {
21882
+ key: "length",
21883
+ get: function get() {
21884
+ return this.pools.length;
21885
+ }
21886
+ }, {
21887
+ key: "release",
21888
+ value: function release() {
21889
+ this.pools = [];
21890
+ }
21891
+ }]);
21892
+ return DefaultBoundsAllocate;
21893
+ }();
21894
+ var boundsAllocate = new DefaultBoundsAllocate();
21895
+
22170
21896
  var __decorate$1c = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22171
21897
  var d,
22172
21898
  c = arguments.length,
@@ -22365,7 +22091,7 @@
22365
22091
  }, {
22366
22092
  key: "clearScreen",
22367
22093
  value: function clearScreen(renderService, context, drawContext) {
22368
- var _a, _b;
22094
+ var _a;
22369
22095
  var clear = drawContext.clear;
22370
22096
  if (clear) {
22371
22097
  var canvas = context.getCanvas(),
@@ -22377,7 +22103,7 @@
22377
22103
  y = 0;
22378
22104
  context.clearRect(x, y, width, height);
22379
22105
  var stage = null === (_a = renderService.drawParams) || void 0 === _a ? void 0 : _a.stage;
22380
- if (stage && (context.globalAlpha = null !== (_b = stage.attribute.opacity) && void 0 !== _b ? _b : 1), stage && stage.backgroundImg && stage.resources) {
22106
+ if (stage && stage.backgroundImg && stage.resources) {
22381
22107
  var res = stage.resources.get(clear);
22382
22108
  res && "success" === res.state && res.data && context.drawImage(res.data, x, y, width, height);
22383
22109
  } else context.fillStyle = createColor(context, clear, {
@@ -22687,10 +22413,15 @@
22687
22413
  _classCallCheck(this, DefaultIncrementalDrawContribution);
22688
22414
  _this = _super.call(this, contributions, drawItemInterceptorContributions), _this.contributions = contributions, _this.lineRender = lineRender, _this.areaRender = areaRender, _this.drawItemInterceptorContributions = drawItemInterceptorContributions, _this.rendering = !1, _this.currFrameStartAt = 0, _this.currentIdx = 0, _this.status = STATUS.NORMAL, _this.checkingForDrawPromise = null, _this.hooks = {
22689
22415
  completeDraw: new SyncHook([])
22690
- }, _this.defaultRenderMap.set(_this.lineRender.numberType, _this.lineRender), _this.defaultRenderMap.set(_this.areaRender.numberType, _this.areaRender);
22416
+ };
22691
22417
  return _this;
22692
22418
  }
22693
22419
  _createClass(DefaultIncrementalDrawContribution, [{
22420
+ key: "init",
22421
+ value: function init() {
22422
+ _get(_getPrototypeOf(DefaultIncrementalDrawContribution.prototype), "init", this).call(this), this.defaultRenderMap.set(this.lineRender.numberType, this.lineRender), this.defaultRenderMap.set(this.areaRender.numberType, this.areaRender);
22423
+ }
22424
+ }, {
22694
22425
  key: "draw",
22695
22426
  value: function draw(renderService, drawContext) {
22696
22427
  return __awaiter$1(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
@@ -23007,10 +22738,11 @@
23007
22738
  container.load(renderModule);
23008
22739
  }
23009
22740
 
22741
+ var loaded$r = !1;
23010
22742
  function preLoadAllModule() {
23011
- preLoadAllModule.__loaded || (preLoadAllModule.__loaded = !0, container.load(coreModule), container.load(graphicModule), container.load(renderModule$1), container.load(pickModule), container.load(pluginModule), load$1(container), load(container));
22743
+ loaded$r || (loaded$r = !0, container.load(coreModule), container.load(graphicModule), container.load(renderModule$1), container.load(pickModule), container.load(pluginModule), load$1(container), load(container));
23012
22744
  }
23013
- preLoadAllModule.__loaded = !1, preLoadAllModule();
22745
+ preLoadAllModule();
23014
22746
  var vglobal = container.get(VGlobal);
23015
22747
  application.global = vglobal;
23016
22748
  var graphicUtil = container.get(GraphicUtil);
@@ -23221,7 +22953,7 @@
23221
22953
  graphic.bindDom.forEach(function (_ref) {
23222
22954
  var wrapGroup = _ref.wrapGroup;
23223
22955
  application.global.removeDom(wrapGroup);
23224
- }), "string" == typeof dom ? (nativeDom = new DOMParser().parseFromString(dom, "text/html").firstChild, nativeDom.lastChild && (nativeDom = nativeDom.lastChild.firstChild)) : nativeDom = dom;
22956
+ }), nativeDom = "string" == typeof dom ? new DOMParser().parseFromString(dom, "text/html").firstChild : dom;
23225
22957
  var _container = container || (!0 === stage.params.enableHtmlAttribute ? null : stage.params.enableHtmlAttribute);
23226
22958
  nativeContainer = _container ? "string" == typeof _container ? application.global.getElementById(_container) : _container : graphic.stage.window.getContainer();
23227
22959
  var wrapGroup = application.global.createDom({
@@ -23238,11 +22970,13 @@
23238
22970
  })), wrapGroup.style.pointerEvents = "none", wrapGroup.style.position || (wrapGroup.style.position = "absolute", nativeContainer.style.position = "relative");
23239
22971
  var left = 0,
23240
22972
  top = 0;
23241
- var b = graphic.globalAABBBounds;
23242
- if ("position" === anchorType || b.empty()) {
23243
- var matrix = graphic.globalTransMatrix;
22973
+ if ("position" === anchorType) {
22974
+ var matrix = graphic.transMatrix;
23244
22975
  left = matrix.e, top = matrix.f;
23245
- } else left = b.x1, top = b.y1;
22976
+ } else {
22977
+ var b = graphic.AABBBounds;
22978
+ left = b.x1, top = b.y1;
22979
+ }
23246
22980
  var containerTL = application.global.getElementTopLeft(nativeContainer, !1),
23247
22981
  windowTL = stage.window.getTopLeft(!1),
23248
22982
  offsetX = left + windowTL.left - containerTL.left,
@@ -23667,21 +23401,24 @@
23667
23401
 
23668
23402
  var _isBrowserEnv;
23669
23403
  function initIsBrowserEnv() {
23670
- if (null == _isBrowserEnv) try {
23671
- _isBrowserEnv = globalThis === window, _isBrowserEnv && (_isBrowserEnv = !!document.createElement);
23672
- } catch (err) {
23673
- _isBrowserEnv = !1;
23404
+ if (null == _isBrowserEnv) {
23405
+ try {
23406
+ _isBrowserEnv = !!window;
23407
+ } catch (err) {
23408
+ _isBrowserEnv = !1;
23409
+ }
23410
+ if (_isBrowserEnv) try {
23411
+ _isBrowserEnv = !tt;
23412
+ } catch (err) {
23413
+ _isBrowserEnv = !0;
23414
+ }
23674
23415
  }
23675
23416
  }
23676
23417
  function isBrowserEnv() {
23677
- initIsBrowserEnv();
23678
- var env = application.global && application.global.env;
23679
- return env ? "browser" === env : _isBrowserEnv;
23418
+ return initIsBrowserEnv(), _isBrowserEnv;
23680
23419
  }
23681
23420
  function isNodeEnv() {
23682
- initIsBrowserEnv();
23683
- var env = application.global && application.global.env;
23684
- return env ? "node" === env : !_isBrowserEnv;
23421
+ return initIsBrowserEnv(), !_isBrowserEnv;
23685
23422
  }
23686
23423
  function getCurrentEnv() {
23687
23424
  return isBrowserEnv() ? "browser" : "node";
@@ -23819,8 +23556,6 @@
23819
23556
  resolution: this.window.dpr || this.global.devicePixelRatio,
23820
23557
  rootNode: this,
23821
23558
  global: this.global,
23822
- supportsPointerEvents: this.params.supportsPointerEvents,
23823
- supportsTouchEvents: this.params.supportsTouchEvents,
23824
23559
  viewport: {
23825
23560
  viewBox: this._viewBox,
23826
23561
  get x() {
@@ -24065,7 +23800,7 @@
24065
23800
  }, {
24066
23801
  key: "tryInitInteractiveLayer",
24067
23802
  value: function tryInitInteractiveLayer() {
24068
- this.supportInteractiveLayer && !this.interactiveLayer && (this.interactiveLayer = this.createLayer(), this.interactiveLayer.name = "_builtin_interactive", this.interactiveLayer.attribute.pickable = !1, this.nextFrameRenderLayerSet.add(this.interactiveLayer));
23803
+ this.supportInteractiveLayer && !this.interactiveLayer && (this.interactiveLayer = this.createLayer(), this.interactiveLayer.name = "_builtin_interactive", this.nextFrameRenderLayerSet.add(this.interactiveLayer));
24069
23804
  }
24070
23805
  }, {
24071
23806
  key: "clearViewBox",
@@ -26950,7 +26685,7 @@
26950
26685
  ops: I(t, e, s, n, a)
26951
26686
  };
26952
26687
  }
26953
- function m$2(t, e, s) {
26688
+ function m(t, e, s) {
26954
26689
  var n = (t || []).length;
26955
26690
  if (n > 2) {
26956
26691
  var _a5 = [];
@@ -26967,7 +26702,7 @@
26967
26702
  }
26968
26703
  function w(t, e, s, n, a) {
26969
26704
  return function (t, e) {
26970
- return m$2(t, !0, e);
26705
+ return m(t, !0, e);
26971
26706
  }([[t, e], [t + s, e], [t + s, e + n], [t, e + n]], a);
26972
26707
  }
26973
26708
  function x(t, e) {
@@ -27403,7 +27138,7 @@
27403
27138
  key: "linearPath",
27404
27139
  value: function linearPath(t, e) {
27405
27140
  var s = this._o(e);
27406
- return this._d("linearPath", [m$2(t, !1, s)], s);
27141
+ return this._d("linearPath", [m(t, !1, s)], s);
27407
27142
  }
27408
27143
  }, {
27409
27144
  key: "arc",
@@ -27470,7 +27205,7 @@
27470
27205
  value: function polygon(t, e) {
27471
27206
  var s = this._o(e),
27472
27207
  n = [],
27473
- a = m$2(t, !0, s);
27208
+ a = m(t, !0, s);
27474
27209
  return s.fill && ("solid" === s.fillStyle ? n.push(S([t], s)) : n.push(L([t], s))), s.stroke !== H && n.push(a), this._d("polygon", n, s);
27475
27210
  }
27476
27211
  }, {
@@ -27536,7 +27271,7 @@
27536
27271
  return l;
27537
27272
  }(t, 1, h ? 4 - 4 * s.simplification : (1 + s.roughness) / 2);
27538
27273
  return a && ("solid" === s.fillStyle ? n.push(S(r, s)) : n.push(L(r, s))), o && (h ? r.forEach(function (t) {
27539
- n.push(m$2(t, !1, s));
27274
+ n.push(m(t, !1, s));
27540
27275
  }) : n.push(function (t, e) {
27541
27276
  var s = g(d(f(t))),
27542
27277
  n = [];
@@ -30184,11 +29919,10 @@
30184
29919
  }();
30185
29920
  DefaultCanvasGroupPicker = __decorate$O([injectable()], DefaultCanvasGroupPicker);
30186
29921
 
30187
- var m$1 = new ContainerModule(function (bind, unbind, isBound, rebind) {
30188
- m$1.__vloaded || (m$1.__vloaded = !0, bind(CanvasGroupPicker).to(DefaultCanvasGroupPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasGroupPicker), bindContributionProvider(bind, CanvasPickerContribution));
29922
+ var loaded$q = !1;
29923
+ var canvasModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
29924
+ loaded$q || (loaded$q = !0, bind(CanvasGroupPicker).to(DefaultCanvasGroupPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasGroupPicker), bindContributionProvider(bind, CanvasPickerContribution));
30189
29925
  });
30190
- m$1.__vloaded = !1;
30191
- var canvasModule = m$1;
30192
29926
 
30193
29927
  var canvasPickerModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
30194
29928
  isBound(DefaultCanvasPickerService) || bind(DefaultCanvasPickerService).toSelf().inSingletonScope(), isBound(PickerService) ? rebind(PickerService).toService(DefaultCanvasPickerService) : bind(PickerService).toService(DefaultCanvasPickerService);
@@ -30535,7 +30269,7 @@
30535
30269
  key: "getNativeAABBBounds",
30536
30270
  value: function getNativeAABBBounds(_dom) {
30537
30271
  var dom = _dom;
30538
- if ("string" == typeof _dom && (dom = new DOMParser().parseFromString(_dom, "text/html").firstChild, dom.lastChild && (dom = dom.lastChild.firstChild)), dom.getBoundingClientRect) {
30272
+ if ("string" == typeof _dom && (dom = new DOMParser().parseFromString(_dom, "text/html").firstChild), dom.getBoundingClientRect) {
30539
30273
  var b = dom.getBoundingClientRect();
30540
30274
  return new DynamicB(b);
30541
30275
  }
@@ -30697,15 +30431,15 @@
30697
30431
  }(exports.BaseEnvContribution);
30698
30432
  BrowserEnvContribution = __decorate$M([injectable(), __metadata$D("design:paramtypes", [])], BrowserEnvContribution);
30699
30433
 
30434
+ var isBrowserBound = !1;
30700
30435
  var browserEnvModule = new ContainerModule(function (bind) {
30701
- browserEnvModule.isBrowserBound || (browserEnvModule.isBrowserBound = !0, bind(BrowserEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(BrowserEnvContribution));
30436
+ isBrowserBound || (isBrowserBound = !0, bind(BrowserEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(BrowserEnvContribution));
30702
30437
  });
30703
- browserEnvModule.isBrowserBound = !1;
30438
+ var loaded$p = !1;
30704
30439
  function loadBrowserEnv(container) {
30705
30440
  var loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
30706
- loadBrowserEnv.__loaded || (loadBrowserEnv.__loaded = !0, container.load(browserEnvModule), container.load(browserCanvasModule), container.load(browserWindowModule), loadPicker && loadCanvasPicker(container));
30441
+ loaded$p || (loaded$p = !0, container.load(browserEnvModule), container.load(browserCanvasModule), container.load(browserWindowModule), loadPicker && loadCanvasPicker(container));
30707
30442
  }
30708
- loadBrowserEnv.__loaded = !1;
30709
30443
  function initBrowserEnv() {
30710
30444
  loadBrowserEnv(container);
30711
30445
  }
@@ -31070,11 +30804,10 @@
31070
30804
  }(exports.DefaultPickService);
31071
30805
  DefaultMathPickerService = __decorate$I([injectable(), __param$r(0, inject(ContributionProvider)), __param$r(0, named(MathPickerContribution)), __param$r(1, inject(ContributionProvider)), __param$r(1, named(PickItemInterceptor)), __metadata$A("design:paramtypes", [Object, Object])], DefaultMathPickerService);
31072
30806
 
31073
- var m = new ContainerModule(function (bind) {
31074
- m.__vloaded || (m.__vloaded = !0, bindContributionProvider(bind, MathPickerContribution));
30807
+ var loaded$o = !1;
30808
+ var mathModule = new ContainerModule(function (bind) {
30809
+ loaded$o || (loaded$o = !0, bindContributionProvider(bind, MathPickerContribution));
31075
30810
  });
31076
- m.__vloaded = !1;
31077
- var mathModule = m;
31078
30811
 
31079
30812
  var mathPickerModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
31080
30813
  isBound(DefaultMathPickerService) || bind(DefaultMathPickerService).toSelf().inSingletonScope(), isBound(PickerService) ? rebind(PickerService).toService(DefaultMathPickerService) : bind(PickerService).toService(DefaultMathPickerService);
@@ -31083,105 +30816,6 @@
31083
30816
  c.load(mathModule), c.load(mathPickerModule);
31084
30817
  }
31085
30818
 
31086
- var CanvasWrapDisableWH = /*#__PURE__*/function () {
31087
- function CanvasWrapDisableWH(nativeCanvas, ctx, dpr, w, h, id) {
31088
- _classCallCheck(this, CanvasWrapDisableWH);
31089
- this.nativeCanvas = nativeCanvas, this.ctx = ctx, this._w = w, this._h = h, this.id = id, nativeCanvas.id = id, this.dpr = dpr;
31090
- }
31091
- _createClass(CanvasWrapDisableWH, [{
31092
- key: "width",
31093
- get: function get() {
31094
- return this._w * this.dpr;
31095
- },
31096
- set: function set(w) {}
31097
- }, {
31098
- key: "height",
31099
- get: function get() {
31100
- return this._h * this.dpr;
31101
- },
31102
- set: function set(h) {}
31103
- }, {
31104
- key: "offsetWidth",
31105
- get: function get() {
31106
- return this._w;
31107
- },
31108
- set: function set(w) {}
31109
- }, {
31110
- key: "offsetHeight",
31111
- get: function get() {
31112
- return this._h;
31113
- },
31114
- set: function set(h) {}
31115
- }, {
31116
- key: "getContext",
31117
- value: function getContext() {
31118
- return this.ctx;
31119
- }
31120
- }, {
31121
- key: "getBoundingClientRect",
31122
- value: function getBoundingClientRect() {
31123
- return {
31124
- width: this._w,
31125
- height: this._h
31126
- };
31127
- }
31128
- }]);
31129
- return CanvasWrapDisableWH;
31130
- }();
31131
- var CanvasWrapEnableWH = /*#__PURE__*/function () {
31132
- function CanvasWrapEnableWH(nativeCanvas, ctx, dpr, w, h, id) {
31133
- _classCallCheck(this, CanvasWrapEnableWH);
31134
- this.nativeCanvas = nativeCanvas, this.ctx = ctx, this._w = w, this._h = h, this.id = id, nativeCanvas.id = id, this.dpr = dpr;
31135
- }
31136
- _createClass(CanvasWrapEnableWH, [{
31137
- key: "width",
31138
- get: function get() {
31139
- return this._w * this.dpr;
31140
- },
31141
- set: function set(w) {
31142
- this._w = w / this.dpr, this.nativeCanvas.width = w;
31143
- }
31144
- }, {
31145
- key: "height",
31146
- get: function get() {
31147
- return this._h * this.dpr;
31148
- },
31149
- set: function set(h) {
31150
- this._h = h / this.dpr, this.nativeCanvas.height = h;
31151
- }
31152
- }, {
31153
- key: "offsetWidth",
31154
- get: function get() {
31155
- return this._w;
31156
- },
31157
- set: function set(w) {
31158
- this._w = w, this.nativeCanvas.width = w * this.dpr;
31159
- }
31160
- }, {
31161
- key: "offsetHeight",
31162
- get: function get() {
31163
- return this._h;
31164
- },
31165
- set: function set(h) {
31166
- this._h = h, this.nativeCanvas.height = h * this.dpr;
31167
- }
31168
- }, {
31169
- key: "getContext",
31170
- value: function getContext() {
31171
- return this.ctx;
31172
- }
31173
- }, {
31174
- key: "getBoundingClientRect",
31175
- value: function getBoundingClientRect() {
31176
- return {
31177
- width: this._w,
31178
- height: this._h
31179
- };
31180
- }
31181
- }]);
31182
- return CanvasWrapEnableWH;
31183
- }();
31184
-
31185
30819
  var __decorate$H = undefined && undefined.__decorate || function (decorators, target, key, desc) {
31186
30820
  var d,
31187
30821
  c = arguments.length,
@@ -31192,12 +30826,31 @@
31192
30826
  __metadata$z = undefined && undefined.__metadata || function (k, v) {
31193
30827
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
31194
30828
  };
31195
- function makeUpCanvas$3(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList, pixelRatio) {
31196
- var dpr = null != pixelRatio ? pixelRatio : tt.getSystemInfoSync().pixelRatio;
30829
+ function makeUpCanvas$3(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList) {
30830
+ var dpr = tt.getSystemInfoSync().pixelRatio;
31197
30831
  canvasIdLists.forEach(function (id, i) {
31198
- var ctx = tt.createCanvasContext(id),
31199
- canvas = new CanvasWrapDisableWH(ctx.canvas || {}, ctx, dpr, domref.width, domref.height, id);
31200
- ctx.canvas = canvas, canvasMap.set(id, canvas), i >= freeCanvasIdx && freeCanvasList.push(canvas);
30832
+ var ctx = tt.createCanvasContext(id);
30833
+ ctx.canvas = {
30834
+ width: domref.width * dpr,
30835
+ height: domref.height * dpr
30836
+ };
30837
+ var canvas = {
30838
+ width: domref.width * dpr,
30839
+ height: domref.height * dpr,
30840
+ offsetWidth: domref.width,
30841
+ offsetHeight: domref.height,
30842
+ id: null != id ? id : "",
30843
+ getContext: function getContext() {
30844
+ return ctx;
30845
+ },
30846
+ getBoundingClientRect: function getBoundingClientRect() {
30847
+ return {
30848
+ height: domref.height,
30849
+ width: domref.width
30850
+ };
30851
+ }
30852
+ };
30853
+ canvasMap.set(id, canvas), i >= freeCanvasIdx && freeCanvasList.push(canvas);
31201
30854
  });
31202
30855
  }
31203
30856
  var FeishuEnvContribution = /*#__PURE__*/function (_BaseEnvContribution) {
@@ -31228,7 +30881,7 @@
31228
30881
  }, {
31229
30882
  key: "configure",
31230
30883
  value: function configure(service, params) {
31231
- service.env === this.type && (service.setActiveEnvContribution(this), makeUpCanvas$3(params.domref, params.canvasIdLists, this.canvasMap, params.freeCanvasIdx, this.freeCanvasList, params.pixelRatio));
30884
+ service.env === this.type && (service.setActiveEnvContribution(this), makeUpCanvas$3(params.domref, params.canvasIdLists, this.canvasMap, params.freeCanvasIdx, this.freeCanvasList));
31232
30885
  }
31233
30886
  }, {
31234
30887
  key: "loadImage",
@@ -31318,15 +30971,15 @@
31318
30971
  }(exports.BaseEnvContribution);
31319
30972
  FeishuEnvContribution = __decorate$H([injectable(), __metadata$z("design:paramtypes", [])], FeishuEnvContribution);
31320
30973
 
30974
+ var isFeishuBound = !1;
31321
30975
  var feishuEnvModule = new ContainerModule(function (bind) {
31322
- feishuEnvModule.isFeishuBound || (feishuEnvModule.isFeishuBound = !0, bind(FeishuEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(FeishuEnvContribution));
30976
+ isFeishuBound || (isFeishuBound = !0, bind(FeishuEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(FeishuEnvContribution));
31323
30977
  });
31324
- feishuEnvModule.isFeishuBound = !1;
30978
+ var loaded$n = !1;
31325
30979
  function loadFeishuEnv(container) {
31326
30980
  var loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
31327
- loadFeishuEnv.__loaded || (loadFeishuEnv.__loaded = !0, container.load(feishuEnvModule), container.load(feishuCanvasModule), container.load(feishuWindowModule), loadPicker && loadMathPicker(container));
30981
+ loaded$n || (loaded$n = !0, container.load(feishuEnvModule), container.load(feishuCanvasModule), container.load(feishuWindowModule), loadPicker && loadMathPicker(container));
31328
30982
  }
31329
- loadFeishuEnv.__loaded = !1;
31330
30983
  function initFeishuEnv() {
31331
30984
  loadFeishuEnv(container);
31332
30985
  }
@@ -31406,11 +31059,11 @@
31406
31059
  value: function draw() {
31407
31060
  var _this = this;
31408
31061
  var _context = this.nativeContext;
31409
- _context.draw && (this.drawPromise = new Promise(function (resolve) {
31062
+ this.drawPromise = new Promise(function (resolve) {
31410
31063
  _context.draw(!0, function () {
31411
31064
  _this.drawPromise = null, resolve(null);
31412
31065
  });
31413
- }));
31066
+ });
31414
31067
  }
31415
31068
  }]);
31416
31069
  return LynxContext2d;
@@ -31679,13 +31332,32 @@
31679
31332
  try {
31680
31333
  ng = !!lynx.createCanvasNG;
31681
31334
  } catch (err) {}
31682
- function makeUpCanvas$2(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList, pixelRatio) {
31683
- var dpr = null != pixelRatio ? pixelRatio : SystemInfo.pixelRatio;
31335
+ function makeUpCanvas$2(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList) {
31336
+ var dpr = SystemInfo.pixelRatio;
31684
31337
  canvasIdLists.forEach(function (id, i) {
31685
31338
  var _canvas = ng ? lynx.createCanvasNG(id) : lynx.createCanvas(id);
31686
31339
  _canvas.width = domref.width * dpr, _canvas.height = domref.height * dpr, ng && _canvas.attachToCanvasView(id);
31687
- var ctx = _canvas.getContext("2d"),
31688
- canvas = new CanvasWrapEnableWH(_canvas, ctx, dpr, domref.width, domref.height, id);
31340
+ var ctx = _canvas.getContext("2d");
31341
+ ctx.draw = function (a, b) {
31342
+ b();
31343
+ };
31344
+ var canvas = {
31345
+ width: domref.width * dpr,
31346
+ height: domref.height * dpr,
31347
+ offsetWidth: domref.width,
31348
+ offsetHeight: domref.height,
31349
+ id: null != id ? id : "",
31350
+ getContext: function getContext() {
31351
+ return ctx;
31352
+ },
31353
+ getBoundingClientRect: function getBoundingClientRect() {
31354
+ return {
31355
+ height: domref.height,
31356
+ width: domref.width
31357
+ };
31358
+ },
31359
+ nativeCanvas: _canvas
31360
+ };
31689
31361
  canvasMap.set(id, canvas), i >= freeCanvasIdx && freeCanvasList.push(canvas);
31690
31362
  });
31691
31363
  }
@@ -31719,7 +31391,7 @@
31719
31391
  _createClass(LynxEnvContribution, [{
31720
31392
  key: "configure",
31721
31393
  value: function configure(service, params) {
31722
- service.env === this.type && (service.setActiveEnvContribution(this), makeUpCanvas$2(params.domref, params.canvasIdLists, this.canvasMap, params.freeCanvasIdx, this.freeCanvasList, params.pixelRatio));
31394
+ service.env === this.type && (service.setActiveEnvContribution(this), makeUpCanvas$2(params.domref, params.canvasIdLists, this.canvasMap, params.freeCanvasIdx, this.freeCanvasList));
31723
31395
  }
31724
31396
  }, {
31725
31397
  key: "getDynamicCanvasCount",
@@ -31826,15 +31498,15 @@
31826
31498
  }(exports.BaseEnvContribution);
31827
31499
  LynxEnvContribution = __decorate$D([injectable(), __metadata$w("design:paramtypes", [])], LynxEnvContribution);
31828
31500
 
31501
+ var isLynxBound = !1;
31829
31502
  var lynxEnvModule = new ContainerModule(function (bind) {
31830
- lynxEnvModule.isLynxBound || (lynxEnvModule.isLynxBound = !0, bind(LynxEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(LynxEnvContribution));
31503
+ isLynxBound || (isLynxBound = !0, bind(LynxEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(LynxEnvContribution));
31831
31504
  });
31832
- lynxEnvModule.isLynxBound = !1;
31505
+ var loaded$m = !1;
31833
31506
  function loadLynxEnv(container) {
31834
31507
  var loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
31835
- loadLynxEnv.__loaded || (loadLynxEnv.__loaded = !0, container.load(lynxEnvModule), container.load(lynxCanvasModule), container.load(lynxWindowModule), loadPicker && loadMathPicker(container));
31508
+ loaded$m || (loaded$m = !0, container.load(lynxEnvModule), container.load(lynxCanvasModule), container.load(lynxWindowModule), loadPicker && loadMathPicker(container));
31836
31509
  }
31837
- loadLynxEnv.__loaded = !1;
31838
31510
  function initLynxEnv() {
31839
31511
  loadLynxEnv(container);
31840
31512
  }
@@ -32207,14 +31879,14 @@
32207
31879
  }(exports.BaseEnvContribution);
32208
31880
  NodeEnvContribution = __decorate$z([injectable()], NodeEnvContribution);
32209
31881
 
31882
+ var isNodeBound = !1;
32210
31883
  var nodeEnvModule = new ContainerModule(function (bind) {
32211
- nodeEnvModule.isNodeBound || (nodeEnvModule.isNodeBound = !0, bind(NodeEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(NodeEnvContribution));
31884
+ isNodeBound || (isNodeBound = !0, bind(NodeEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(NodeEnvContribution));
32212
31885
  });
32213
- nodeEnvModule.isNodeBound = !1;
31886
+ var loaded$l = !1;
32214
31887
  function loadNodeEnv(container) {
32215
- loadNodeEnv.__loaded || (loadNodeEnv.__loaded = !0, container.load(nodeEnvModule), container.load(nodeCanvasModule), container.load(nodeWindowModule));
31888
+ loaded$l || (loaded$l = !0, container.load(nodeEnvModule), container.load(nodeCanvasModule), container.load(nodeWindowModule));
32216
31889
  }
32217
- loadNodeEnv.__loaded = !1;
32218
31890
  function initNodeEnv() {
32219
31891
  loadNodeEnv(container);
32220
31892
  }
@@ -32311,34 +31983,6 @@
32311
31983
  value: function createPattern(image, repetition) {
32312
31984
  return null;
32313
31985
  }
32314
- }, {
32315
- key: "getImageData",
32316
- value: function getImageData(sx, sy, sw, sh) {
32317
- var _this = this;
32318
- var ctx = this.nativeContext,
32319
- taro = ctx.taro;
32320
- if (ctx && taro) return !ctx.getImageData && taro.canvasGetImageData ? new Promise(function (resolve, reject) {
32321
- try {
32322
- taro.canvasGetImageData({
32323
- canvasId: _this.canvas.nativeCanvas.id,
32324
- sx: sx,
32325
- sy: sy,
32326
- sw: sw,
32327
- sh: sh,
32328
- success: function success(res) {
32329
- resolve(res);
32330
- }
32331
- });
32332
- } catch (err) {
32333
- reject(err);
32334
- }
32335
- }) : void 0;
32336
- }
32337
- }, {
32338
- key: "createRadialGradient",
32339
- value: function createRadialGradient(x0, y0, r0, x1, y1, r1) {
32340
- return this.nativeContext.createCircularGradient && this.nativeContext.createCircularGradient(x0, y0, r0, x1, y1, r1);
32341
- }
32342
31986
  }]);
32343
31987
  return TaroContext2d;
32344
31988
  }(BrowserContext2d);
@@ -32606,9 +32250,47 @@
32606
32250
  };
32607
32251
  function makeUpCanvas$1(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList, taro, dpr) {
32608
32252
  canvasIdLists.forEach(function (id, i) {
32609
- var ctx = taro.createCanvasContext(id),
32610
- canvas = new CanvasWrapDisableWH(ctx.canvas || {}, ctx, dpr, domref.width, domref.height, id);
32611
- return ctx.canvas = canvas, canvasMap.set(id, canvas), i >= freeCanvasIdx && freeCanvasList.push(canvas), canvas;
32253
+ var ctx = taro.createCanvasContext(id);
32254
+ ctx.canvas = {
32255
+ width: domref.width * dpr,
32256
+ height: domref.height * dpr
32257
+ }, ctx.createRadialGradient || (ctx.createRadialGradient = function () {
32258
+ return ctx.createCircularGradient.apply(ctx, arguments);
32259
+ }), !ctx.getImageData && taro.canvasGetImageData && (ctx.getImageData = function (x, y, width, height) {
32260
+ return new Promise(function (resolve, reject) {
32261
+ try {
32262
+ taro.canvasGetImageData({
32263
+ canvasId: id,
32264
+ x: x,
32265
+ y: y,
32266
+ width: width,
32267
+ height: height,
32268
+ success: function success(res) {
32269
+ resolve(res);
32270
+ }
32271
+ });
32272
+ } catch (err) {
32273
+ reject(err);
32274
+ }
32275
+ });
32276
+ });
32277
+ var canvas = {
32278
+ id: id,
32279
+ width: domref.width * dpr,
32280
+ height: domref.height * dpr,
32281
+ offsetWidth: domref.width,
32282
+ offsetHeight: domref.height,
32283
+ getContext: function getContext() {
32284
+ return ctx;
32285
+ },
32286
+ getBoundingClientRect: function getBoundingClientRect() {
32287
+ return {
32288
+ height: domref.height,
32289
+ width: domref.width
32290
+ };
32291
+ }
32292
+ };
32293
+ return canvasMap.set(id, canvas), i >= freeCanvasIdx && freeCanvasList.push(canvas), canvas;
32612
32294
  });
32613
32295
  }
32614
32296
  var TaroEnvContribution = /*#__PURE__*/function (_BaseEnvContribution) {
@@ -32745,15 +32427,15 @@
32745
32427
  }(exports.BaseEnvContribution);
32746
32428
  TaroEnvContribution = __decorate$v([injectable(), __metadata$q("design:paramtypes", [])], TaroEnvContribution);
32747
32429
 
32430
+ var isTaroBound = !1;
32748
32431
  var taroEnvModule = new ContainerModule(function (bind) {
32749
- taroEnvModule.isTaroBound || (taroEnvModule.isTaroBound = !0, bind(TaroEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(TaroEnvContribution));
32432
+ isTaroBound || (isTaroBound = !0, bind(TaroEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(TaroEnvContribution));
32750
32433
  });
32751
- taroEnvModule.isTaroBound = !1;
32434
+ var loaded$k = !1;
32752
32435
  function loadTaroEnv(container) {
32753
32436
  var loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
32754
- loadTaroEnv.__loaded || (loadTaroEnv.__loaded = !0, container.load(taroEnvModule), container.load(taroCanvasModule), container.load(taroWindowModule), loadPicker && loadMathPicker(container));
32437
+ loaded$k || (loaded$k = !0, container.load(taroEnvModule), container.load(taroCanvasModule), container.load(taroWindowModule), loadPicker && loadMathPicker(container));
32755
32438
  }
32756
- loadTaroEnv.__loaded = !1;
32757
32439
  function initTaroEnv() {
32758
32440
  loadTaroEnv(container);
32759
32441
  }
@@ -33220,15 +32902,15 @@
33220
32902
  }(exports.BaseEnvContribution);
33221
32903
  WxEnvContribution = __decorate$r([injectable(), __metadata$n("design:paramtypes", [])], WxEnvContribution);
33222
32904
 
32905
+ var isWxBound = !1;
33223
32906
  var wxEnvModule = new ContainerModule(function (bind) {
33224
- wxEnvModule._isWxBound || (wxEnvModule._isWxBound = !0, bind(WxEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(WxEnvContribution));
32907
+ isWxBound || (isWxBound = !0, bind(WxEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(WxEnvContribution));
33225
32908
  });
33226
- wxEnvModule._isWxBound = !1;
32909
+ var loaded$j = !1;
33227
32910
  function loadWxEnv(container) {
33228
32911
  var loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
33229
- loadWxEnv.__loaded || (loadWxEnv.__loaded = !0, container.load(wxEnvModule), container.load(wxCanvasModule), container.load(wxWindowModule), loadPicker && loadMathPicker(container));
32912
+ loaded$j || (loaded$j = !0, container.load(wxEnvModule), container.load(wxCanvasModule), container.load(wxWindowModule), loadPicker && loadMathPicker(container));
33230
32913
  }
33231
- loadWxEnv.__loaded = !1;
33232
32914
  function initWxEnv() {
33233
32915
  loadWxEnv(container);
33234
32916
  }
@@ -33236,12 +32918,12 @@
33236
32918
  function loadAllEnv(container) {
33237
32919
  loadAllModule(container);
33238
32920
  }
32921
+ var loaded$i = !1;
33239
32922
  function loadAllModule(container) {
33240
- loadAllModule.__loaded || (loadAllModule.__loaded = !0, loadBrowserEnv(container, !1), loadFeishuEnv(container, !1), loadLynxEnv(container, !1), loadNodeEnv(container), loadTaroEnv(container, !1), loadWxEnv(container, !1), loadCanvasPicker(container), vglobal.hooks.onSetEnv.tap("loadMathPicker", function (lastEnv, env) {
32923
+ loaded$i || (loaded$i = !0, loadBrowserEnv(container, !1), loadFeishuEnv(container, !1), loadLynxEnv(container, !1), loadNodeEnv(container), loadTaroEnv(container, !1), loadWxEnv(container, !1), loadCanvasPicker(container), vglobal.hooks.onSetEnv.tap("loadMathPicker", function (lastEnv, env) {
33241
32924
  "browser" !== env && loadMathPicker(container);
33242
32925
  }));
33243
32926
  }
33244
- loadAllModule.__loaded = !1;
33245
32927
  function initAllEnv() {
33246
32928
  loadAllEnv(container);
33247
32929
  }
@@ -33696,24 +33378,13 @@
33696
33378
  x = _area$attribute$x === void 0 ? areaAttribute.x : _area$attribute$x,
33697
33379
  _area$attribute$y = _area$attribute.y,
33698
33380
  y = _area$attribute$y === void 0 ? areaAttribute.y : _area$attribute$y;
33699
- var _area$attribute2 = area.attribute,
33700
- _area$attribute2$fill = _area$attribute2.fillPickable,
33701
- fillPickable = _area$attribute2$fill === void 0 ? areaAttribute.fillPickable : _area$attribute2$fill,
33702
- _area$attribute2$stro = _area$attribute2.strokePickable,
33703
- strokePickable = _area$attribute2$stro === void 0 ? areaAttribute.strokePickable : _area$attribute2$stro;
33704
33381
  if (pickContext.highPerformanceSave(), area.transMatrix.onlyTranslate()) {
33705
33382
  var _point = area.getOffsetXY(areaAttribute);
33706
33383
  x += _point.x, y += _point.y, pickContext.setTransformForCurrent();
33707
33384
  } else x = 0, y = 0, pickContext.transformFromMatrix(area.transMatrix, !0);
33708
33385
  var picked = !1;
33709
33386
  return this.canvasRenderer.drawShape(area, pickContext, x, y, {}, null, function (context) {
33710
- return !!picked || !!fillPickable && (picked = context.isPointInPath(point.x, point.y), picked);
33711
- }, function (context, areaAttribute, themeAttribute) {
33712
- if (picked) return !0;
33713
- if (!strokePickable) return !1;
33714
- var lineWidth = areaAttribute.lineWidth || themeAttribute.lineWidth,
33715
- pickStrokeBuffer = areaAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
33716
- return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
33387
+ return !!picked || (picked = context.isPointInPath(point.x, point.y), picked);
33717
33388
  }), pickContext.highPerformanceRestore(), picked;
33718
33389
  }
33719
33390
  }]);
@@ -34743,117 +34414,99 @@
34743
34414
 
34744
34415
  var browser = isBrowserEnv();
34745
34416
 
34746
- function _registerArc() {
34747
- _registerArc.__loaded || (_registerArc.__loaded = !0, registerArcGraphic(), container.load(arcModule), container.load(browser ? arcCanvasPickModule : arcMathPickModule));
34417
+ var loaded$h = !1;
34418
+ function registerArc() {
34419
+ loaded$h || (loaded$h = !0, registerArcGraphic(), container.load(arcModule), container.load(browser ? arcCanvasPickModule : arcMathPickModule));
34748
34420
  }
34749
- _registerArc.__loaded = !1;
34750
- var registerArc = _registerArc;
34751
34421
 
34752
- function _registerArc3d() {
34753
- _registerArc3d.__loaded || (_registerArc3d.__loaded = !0, registerArc3dGraphic(), container.load(arc3dModule), container.load(arc3dCanvasPickModule));
34422
+ var loaded$g = !1;
34423
+ function registerArc3d() {
34424
+ loaded$g || (loaded$g = !0, registerArc3dGraphic(), container.load(arc3dModule), container.load(arc3dCanvasPickModule));
34754
34425
  }
34755
- _registerArc3d.__loaded = !1;
34756
- var registerArc3d = _registerArc3d;
34757
34426
 
34758
- function _registerArea() {
34759
- _registerArea.__loaded || (_registerArea.__loaded = !0, registerAreaGraphic(), container.load(areaModule), container.load(browser ? areaCanvasPickModule : areaMathPickModule));
34427
+ var loaded$f = !1;
34428
+ function registerArea() {
34429
+ loaded$f || (loaded$f = !0, registerAreaGraphic(), container.load(areaModule), container.load(browser ? areaCanvasPickModule : areaMathPickModule));
34760
34430
  }
34761
- _registerArea.__loaded = !1;
34762
- var registerArea = _registerArea;
34763
34431
 
34764
- function _registerCircle() {
34765
- _registerCircle.__loaded || (_registerCircle.__loaded = !0, registerCircleGraphic(), container.load(circleModule), container.load(browser ? circleCanvasPickModule : circleMathPickModule));
34432
+ var loaded$e = !1;
34433
+ function registerCircle() {
34434
+ loaded$e || (loaded$e = !0, registerCircleGraphic(), container.load(circleModule), container.load(browser ? circleCanvasPickModule : circleMathPickModule));
34766
34435
  }
34767
- _registerCircle.__loaded = !1;
34768
- var registerCircle = _registerCircle;
34769
34436
 
34770
- function _registerGlyph() {
34771
- _registerGlyph.__loaded || (_registerGlyph.__loaded = !0, registerGlyphGraphic(), container.load(glyphModule), container.load(browser ? glyphCanvasPickModule : glyphMathPickModule));
34437
+ var loaded$d = !1;
34438
+ function registerGlyph() {
34439
+ loaded$d || (loaded$d = !0, registerGlyphGraphic(), container.load(glyphModule), container.load(browser ? glyphCanvasPickModule : glyphMathPickModule));
34772
34440
  }
34773
- _registerGlyph.__loaded = !1;
34774
- var registerGlyph = _registerGlyph;
34775
34441
 
34776
- function _registerGroup() {
34777
- _registerGroup.__loaded || (_registerGroup.__loaded = !0, registerGroupGraphic());
34442
+ var loaded$c = !1;
34443
+ function registerGroup() {
34444
+ loaded$c || (loaded$c = !0, registerGroupGraphic());
34778
34445
  }
34779
- _registerGroup.__loaded = !1;
34780
- var registerGroup = _registerGroup;
34781
34446
 
34782
- function _registerImage() {
34783
- _registerImage.__loaded || (_registerImage.__loaded = !0, registerImageGraphic(), container.load(imageModule), container.load(browser ? imageCanvasPickModule : imageMathPickModule));
34447
+ var loaded$b = !1;
34448
+ function registerImage() {
34449
+ loaded$b || (loaded$b = !0, registerImageGraphic(), container.load(imageModule), container.load(browser ? imageCanvasPickModule : imageMathPickModule));
34784
34450
  }
34785
- _registerImage.__loaded = !1;
34786
- var registerImage = _registerImage;
34787
34451
 
34788
- function _registerLine() {
34789
- _registerLine.__loaded || (_registerLine.__loaded = !0, registerLineGraphic(), container.load(lineModule), container.load(browser ? lineCanvasPickModule : lineMathPickModule));
34452
+ var loaded$a = !1;
34453
+ function registerLine() {
34454
+ loaded$a || (loaded$a = !0, registerLineGraphic(), container.load(lineModule), container.load(browser ? lineCanvasPickModule : lineMathPickModule));
34790
34455
  }
34791
- _registerLine.__loaded = !1;
34792
- var registerLine = _registerLine;
34793
34456
 
34794
- function _registerPath() {
34795
- _registerPath.__loaded || (_registerPath.__loaded = !0, registerPathGraphic(), container.load(pathModule), container.load(browser ? pathCanvasPickModule : pathMathPickModule));
34457
+ var loaded$9 = !1;
34458
+ function registerPath() {
34459
+ loaded$9 || (loaded$9 = !0, registerPathGraphic(), container.load(pathModule), container.load(browser ? pathCanvasPickModule : pathMathPickModule));
34796
34460
  }
34797
- _registerPath.__loaded = !1;
34798
- var registerPath = _registerPath;
34799
34461
 
34800
- function _registerPolygon() {
34801
- _registerPolygon.__loaded || (_registerPolygon.__loaded = !0, registerPolygonGraphic(), container.load(polygonModule), container.load(browser ? polygonCanvasPickModule : polygonMathPickModule));
34462
+ var loaded$8 = !1;
34463
+ function registerPolygon() {
34464
+ loaded$8 || (loaded$8 = !0, registerPolygonGraphic(), container.load(polygonModule), container.load(browser ? polygonCanvasPickModule : polygonMathPickModule));
34802
34465
  }
34803
- _registerPolygon.__loaded = !1;
34804
- var registerPolygon = _registerPolygon;
34805
34466
 
34806
- function _registerPyramid3d() {
34807
- _registerPyramid3d.__loaded || (_registerPyramid3d.__loaded = !0, registerPyramid3dGraphic(), container.load(pyramid3dModule), container.load(pyramid3dCanvasPickModule));
34467
+ var loaded$7 = !1;
34468
+ function registerPyramid3d() {
34469
+ loaded$7 || (loaded$7 = !0, registerPyramid3dGraphic(), container.load(pyramid3dModule), container.load(pyramid3dCanvasPickModule));
34808
34470
  }
34809
- _registerPyramid3d.__loaded = !1;
34810
- var registerPyramid3d = _registerPyramid3d;
34811
34471
 
34812
- function _registerRect() {
34813
- _registerRect.__loaded || (_registerRect.__loaded = !0, registerRectGraphic(), container.load(rectModule), container.load(browser ? rectCanvasPickModule : rectMathPickModule));
34472
+ var loaded$6 = !1;
34473
+ function registerRect() {
34474
+ loaded$6 || (loaded$6 = !0, registerRectGraphic(), container.load(rectModule), container.load(browser ? rectCanvasPickModule : rectMathPickModule));
34814
34475
  }
34815
- _registerRect.__loaded = !1;
34816
- var registerRect = _registerRect;
34817
34476
 
34818
- function _registerRect3d() {
34819
- _registerRect3d.__loaded || (_registerRect3d.__loaded = !0, registerRect3dGraphic(), container.load(rect3dModule), container.load(rect3dCanvasPickModule));
34477
+ var loaded$5 = !1;
34478
+ function registerRect3d() {
34479
+ loaded$5 || (loaded$5 = !0, registerRect3dGraphic(), container.load(rect3dModule), container.load(rect3dCanvasPickModule));
34820
34480
  }
34821
- _registerRect3d.__loaded = !1;
34822
- var registerRect3d = _registerRect3d;
34823
34481
 
34824
- function _registerRichtext() {
34825
- _registerRichtext.__loaded || (_registerRichtext.__loaded = !0, registerRichtextGraphic(), container.load(richtextModule), container.load(browser ? richtextCanvasPickModule : richTextMathPickModule));
34482
+ var loaded$4 = !1;
34483
+ function registerRichtext() {
34484
+ loaded$4 || (loaded$4 = !0, registerRichtextGraphic(), container.load(richtextModule), container.load(browser ? richtextCanvasPickModule : richTextMathPickModule));
34826
34485
  }
34827
- _registerRichtext.__loaded = !1;
34828
- var registerRichtext = _registerRichtext;
34829
34486
 
34830
- function _registerShadowRoot() {
34831
- _registerShadowRoot.__loaded || (_registerShadowRoot.__loaded = !0, registerShadowRootGraphic());
34487
+ var loaded$3 = !1;
34488
+ function registerShadowRoot() {
34489
+ loaded$3 || (loaded$3 = !0, registerShadowRootGraphic());
34832
34490
  }
34833
- _registerShadowRoot.__loaded = !1;
34834
- var registerShadowRoot = _registerShadowRoot;
34835
34491
 
34836
- function _registerSymbol() {
34837
- _registerSymbol.__loaded || (_registerSymbol.__loaded = !0, registerSymbolGraphic(), container.load(symbolModule), container.load(browser ? symbolCanvasPickModule : symbolMathPickModule));
34492
+ var loaded$2 = !1;
34493
+ function registerSymbol() {
34494
+ loaded$2 || (loaded$2 = !0, registerSymbolGraphic(), container.load(symbolModule), container.load(browser ? symbolCanvasPickModule : symbolMathPickModule));
34838
34495
  }
34839
- _registerSymbol.__loaded = !1;
34840
- var registerSymbol = _registerSymbol;
34841
34496
 
34842
- function _registerText() {
34843
- _registerText.__loaded || (_registerText.__loaded = !0, registerTextGraphic(), container.load(textModule), container.load(browser ? textCanvasPickModule : textMathPickModule));
34497
+ var loaded$1 = !1;
34498
+ function registerText() {
34499
+ loaded$1 || (loaded$1 = !0, registerTextGraphic(), container.load(textModule), container.load(browser ? textCanvasPickModule : textMathPickModule));
34844
34500
  }
34845
- _registerText.__loaded = !1;
34846
- var registerText = _registerText;
34847
34501
 
34848
- function _registerWrapText() {
34849
- _registerWrapText.__loaded || (_registerWrapText.__loaded = !0, registerWrapTextGraphic());
34502
+ var loaded = !1;
34503
+ function registerWrapText() {
34504
+ loaded || (loaded = !0, registerWrapTextGraphic());
34850
34505
  }
34851
- _registerWrapText.__loaded = !1;
34852
- var registerWrapText = _registerWrapText;
34853
34506
 
34854
34507
  var roughModule = _roughModule;
34855
34508
 
34856
- const version = "0.17.19";
34509
+ const version = "0.18.0-alpha.0";
34857
34510
  preLoadAllModule();
34858
34511
  if (isBrowserEnv()) {
34859
34512
  loadBrowserEnv(container);
@@ -34930,7 +34583,6 @@
34930
34583
  exports.DefaultArcRenderContribution = DefaultArcRenderContribution;
34931
34584
  exports.DefaultAreaAllocate = DefaultAreaAllocate;
34932
34585
  exports.DefaultAreaAttribute = DefaultAreaAttribute;
34933
- exports.DefaultAreaTextureRenderContribution = DefaultAreaTextureRenderContribution;
34934
34586
  exports.DefaultAttribute = DefaultAttribute;
34935
34587
  exports.DefaultBaseBackgroundRenderContribution = DefaultBaseBackgroundRenderContribution;
34936
34588
  exports.DefaultBaseTextureRenderContribution = DefaultBaseTextureRenderContribution;
@@ -35117,7 +34769,6 @@
35117
34769
  exports.WindowHandlerContribution = WindowHandlerContribution;
35118
34770
  exports.WrapText = WrapText;
35119
34771
  exports.XMLParser = XMLParser;
35120
- exports._registerArc = _registerArc;
35121
34772
  exports.addArcToBezierPath = addArcToBezierPath$1;
35122
34773
  exports.addAttributeToPrototype = addAttributeToPrototype;
35123
34774
  exports.alignBezierCurves = alignBezierCurves;
@@ -35231,9 +34882,9 @@
35231
34882
  exports.genLinearSegments = genLinearSegments;
35232
34883
  exports.genLinearTypeSegments = genLinearTypeSegments;
35233
34884
  exports.genMonotoneXSegments = genMonotoneXSegments;
35234
- exports.genMonotoneXTypeSegments = genMonotoneXTypeSegments;
35235
34885
  exports.genMonotoneYSegments = genMonotoneYSegments;
35236
- exports.genMonotoneYTypeSegments = genMonotoneYTypeSegments;
34886
+ exports.genMonotpneXTypeSegments = genMonotpneXTypeSegments;
34887
+ exports.genMonotpneYTypeSegments = genMonotpneYTypeSegments;
35237
34888
  exports.genNumberType = genNumberType;
35238
34889
  exports.genStepSegments = genStepSegments;
35239
34890
  exports.genStepTypeSegments = genStepTypeSegments;