@visactor/vrender 0.17.18 → 0.17.19-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6977,7 +6977,10 @@
6977
6977
  value: function removeAllChild() {
6978
6978
  if (!this._idMap) return;
6979
6979
  var child = this._firstChild;
6980
- for (; child;) child.parent = null, child._prev = null, child._next = null, child = child._next;
6980
+ for (; child;) {
6981
+ var next = child._next;
6982
+ child.parent = null, child._prev = null, child._next = null, child = next;
6983
+ }
6981
6984
  this._firstChild = null, this._lastChild = null, this._idMap.clear(), this._structEdit = !0, this.setCount(1 - this._count);
6982
6985
  }
6983
6986
  }, {
@@ -11361,15 +11364,7 @@
11361
11364
  var data = ResourceLoader.cache.get(url);
11362
11365
  data ? "fail" === data.loadState ? application.global.getRequestAnimationFrame()(function () {
11363
11366
  mark.imageLoadFail(url);
11364
- }) : "init" === data.loadState || "loading" === data.loadState ? null === (_a = data.waitingMark) || void 0 === _a || _a.push(mark) : mark && mark.imageLoadSuccess(url, data.data) : (data = {
11365
- type: "image",
11366
- loadState: "init"
11367
- }, ResourceLoader.cache.set(url, data), data.dataPromise = application.global.loadImage(url), data.dataPromise ? (data.waitingMark = [mark], data.dataPromise.then(function (res) {
11368
- var _a;
11369
- data.loadState = (null == res ? void 0 : res.data) ? "success" : "fail", data.data = null == res ? void 0 : res.data, null === (_a = data.waitingMark) || void 0 === _a || _a.map(function (mark, index) {
11370
- (null == res ? void 0 : res.data) ? (data.loadState = "success", data.data = res.data, mark.imageLoadSuccess(url, res.data)) : (data.loadState = "fail", mark.imageLoadFail(url));
11371
- });
11372
- })) : (data.loadState = "fail", mark.imageLoadFail(url)));
11367
+ }) : "init" === data.loadState || "loading" === data.loadState ? null === (_a = data.waitingMark) || void 0 === _a || _a.push(mark) : mark && mark.imageLoadSuccess(url, data.data) : ResourceLoader.loadImage(url, mark);
11373
11368
  }
11374
11369
  }, {
11375
11370
  key: "GetSvg",
@@ -11403,10 +11398,68 @@
11403
11398
  return data.data;
11404
11399
  }));
11405
11400
  }
11401
+ }, {
11402
+ key: "loading",
11403
+ value: function loading() {
11404
+ setTimeout(function () {
11405
+ if (!ResourceLoader.isLoading && ResourceLoader.toLoadAueue.length) {
11406
+ ResourceLoader.isLoading = !0;
11407
+ var tasks = ResourceLoader.toLoadAueue.splice(0, 10),
11408
+ promises = [];
11409
+ tasks.forEach(function (task) {
11410
+ var url = task.url,
11411
+ marks = task.marks,
11412
+ data = {
11413
+ type: "image",
11414
+ loadState: "init"
11415
+ };
11416
+ if (ResourceLoader.cache.set(url, data), data.dataPromise = application.global.loadImage(url), data.dataPromise) {
11417
+ data.waitingMark = marks;
11418
+ var end = data.dataPromise.then(function (res) {
11419
+ var _a;
11420
+ data.loadState = (null == res ? void 0 : res.data) ? "success" : "fail", data.data = null == res ? void 0 : res.data, null === (_a = data.waitingMark) || void 0 === _a || _a.map(function (mark, index) {
11421
+ (null == res ? void 0 : res.data) ? (data.loadState = "success", data.data = res.data, mark.imageLoadSuccess(url, res.data)) : (data.loadState = "fail", mark.imageLoadFail(url));
11422
+ });
11423
+ });
11424
+ promises.push(end);
11425
+ } else data.loadState = "fail", marks.forEach(function (mark) {
11426
+ return mark.imageLoadFail(url);
11427
+ });
11428
+ }), Promise.all(promises).then(function () {
11429
+ ResourceLoader.isLoading = !1, ResourceLoader.loading();
11430
+ })["catch"](function (error) {
11431
+ console.error(error), ResourceLoader.isLoading = !1, ResourceLoader.loading();
11432
+ });
11433
+ }
11434
+ }, 0);
11435
+ }
11436
+ }, {
11437
+ key: "loadImage",
11438
+ value: function loadImage(url, mark) {
11439
+ var index = getIndex(url, ResourceLoader.toLoadAueue);
11440
+ if (-1 !== index) return ResourceLoader.toLoadAueue[index].marks.push(mark), void ResourceLoader.loading();
11441
+ ResourceLoader.toLoadAueue.push({
11442
+ url: url,
11443
+ marks: [mark]
11444
+ }), ResourceLoader.loading();
11445
+ }
11446
+ }, {
11447
+ key: "improveImageLoading",
11448
+ value: function improveImageLoading(url) {
11449
+ var index = getIndex(url, ResourceLoader.toLoadAueue);
11450
+ if (-1 !== index) {
11451
+ var elememt = ResourceLoader.toLoadAueue.splice(index, 1);
11452
+ ResourceLoader.toLoadAueue.unshift(elememt[0]);
11453
+ }
11454
+ }
11406
11455
  }]);
11407
11456
  return ResourceLoader;
11408
11457
  }();
11409
- ResourceLoader.cache = new Map();
11458
+ function getIndex(url, arr) {
11459
+ for (var i = 0; i < arr.length; i++) if (arr[i].url === url) return i;
11460
+ return -1;
11461
+ }
11462
+ ResourceLoader.cache = new Map(), ResourceLoader.isLoading = !1, ResourceLoader.toLoadAueue = [];
11410
11463
 
11411
11464
  var tempMatrix = new Matrix(),
11412
11465
  tempBounds$1 = new AABBBounds();
@@ -12192,7 +12245,7 @@
12192
12245
  data: "init",
12193
12246
  state: null
12194
12247
  };
12195
- this.resources.set(url, cache), "string" == typeof image ? (cache.state = "loading", image.startsWith("<svg") ? (ResourceLoader.GetSvg(image, this), this.backgroundImg = this.backgroundImg || background) : (isValidUrl$1(image) || image.includes("/") || isBase64$1(image)) && (ResourceLoader.GetImage(image, this), this.backgroundImg = this.backgroundImg || background)) : (cache.state = "success", cache.data = image, this.backgroundImg = this.backgroundImg || background);
12248
+ this.resources.set(url, cache), "string" == typeof image ? (cache.state = "loading", image.startsWith("<svg") ? (ResourceLoader.GetSvg(image, this), this.backgroundImg = this.backgroundImg || background) : (isValidUrl$1(image) || image.includes("/") || isBase64$1(image)) && (ResourceLoader.GetImage(image, this), this.backgroundImg = this.backgroundImg || background)) : isObject$1(image) ? (cache.state = "success", cache.data = image, this.backgroundImg = this.backgroundImg || background) : cache.state = "fail";
12196
12249
  }
12197
12250
  }, {
12198
12251
  key: "imageLoadSuccess",
@@ -21199,7 +21252,9 @@
21199
21252
  value: function draw(image, renderService, drawContext) {
21200
21253
  var url = image.attribute.image;
21201
21254
  if (!url || !image.resources) return;
21202
- if ("success" !== image.resources.get(url).state) return;
21255
+ var res = image.resources.get(url);
21256
+ if ("loading" === res.state && isString$1(url)) return void ResourceLoader.improveImageLoading(url);
21257
+ if ("success" !== res.state) return;
21203
21258
  var context = renderService.drawParams.context;
21204
21259
  if (!context) return;
21205
21260
  var imageAttribute = getTheme(image).image;
@@ -21240,6 +21295,241 @@
21240
21295
  },
21241
21296
  __metadata$$ = undefined && undefined.__metadata || function (k, v) {
21242
21297
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
21298
+ };
21299
+ var DrawItemInterceptor = Symbol["for"]("DrawItemInterceptor");
21300
+ var tempDirtyBounds = new AABBBounds();
21301
+ var ShadowRootDrawItemInterceptorContribution = /*#__PURE__*/function () {
21302
+ function ShadowRootDrawItemInterceptorContribution() {
21303
+ _classCallCheck(this, ShadowRootDrawItemInterceptorContribution);
21304
+ this.order = 1;
21305
+ }
21306
+ _createClass(ShadowRootDrawItemInterceptorContribution, [{
21307
+ key: "afterDrawItem",
21308
+ value: function afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21309
+ return (graphic.attribute.shadowRootIdx > 0 || !graphic.attribute.shadowRootIdx) && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
21310
+ }
21311
+ }, {
21312
+ key: "beforeDrawItem",
21313
+ value: function beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21314
+ return graphic.attribute.shadowRootIdx < 0 && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
21315
+ }
21316
+ }, {
21317
+ key: "drawItem",
21318
+ value: function drawItem(graphic, renderService, drawContext, drawContribution, params) {
21319
+ if (!graphic.shadowRoot) return !1;
21320
+ var context = drawContext.context;
21321
+ if (context.highPerformanceSave(), context.transformFromMatrix(graphic.transMatrix, !0), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds) {
21322
+ tempDirtyBounds.copy(drawContribution.dirtyBounds);
21323
+ var m = graphic.globalTransMatrix.getInverse();
21324
+ drawContribution.dirtyBounds.copy(drawContribution.backupDirtyBounds).transformWithMatrix(m);
21325
+ }
21326
+ return drawContribution.renderGroup(graphic.shadowRoot, drawContext, graphic.parent.globalTransMatrix), context.highPerformanceRestore(), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds && drawContribution.dirtyBounds.copy(tempDirtyBounds), !0;
21327
+ }
21328
+ }]);
21329
+ return ShadowRootDrawItemInterceptorContribution;
21330
+ }();
21331
+ var DebugDrawItemInterceptorContribution = /*#__PURE__*/function () {
21332
+ function DebugDrawItemInterceptorContribution() {
21333
+ _classCallCheck(this, DebugDrawItemInterceptorContribution);
21334
+ this.order = 1;
21335
+ }
21336
+ _createClass(DebugDrawItemInterceptorContribution, [{
21337
+ key: "afterDrawItem",
21338
+ value: function afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21339
+ return graphic.attribute._debug_bounds && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
21340
+ }
21341
+ }, {
21342
+ key: "drawItem",
21343
+ value: function drawItem(graphic, renderService, drawContext, drawContribution, params) {
21344
+ if (!graphic.attribute._debug_bounds) return !1;
21345
+ var context = drawContext.context;
21346
+ context.highPerformanceSave(), graphic.parent && context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), graphic.glyphHost && graphic.glyphHost.parent && context.setTransformFromMatrix(graphic.glyphHost.parent.globalTransMatrix, !0);
21347
+ var b = graphic.AABBBounds;
21348
+ return !0 !== graphic.attribute._debug_bounds && graphic.attribute._debug_bounds(context, graphic), context.strokeRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore(), !0;
21349
+ }
21350
+ }]);
21351
+ return DebugDrawItemInterceptorContribution;
21352
+ }();
21353
+ exports.CommonDrawItemInterceptorContribution = /*#__PURE__*/function () {
21354
+ function CommonDrawItemInterceptorContribution() {
21355
+ _classCallCheck(this, CommonDrawItemInterceptorContribution);
21356
+ this.order = 1, this.interceptors = [new ShadowRootDrawItemInterceptorContribution(), new Canvas3DDrawItemInterceptor(), new InteractiveDrawItemInterceptorContribution(), new DebugDrawItemInterceptorContribution()];
21357
+ }
21358
+ _createClass(CommonDrawItemInterceptorContribution, [{
21359
+ key: "afterDrawItem",
21360
+ value: function afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21361
+ for (var i = 0; i < this.interceptors.length; i++) if (this.interceptors[i].afterDrawItem && this.interceptors[i].afterDrawItem(graphic, renderService, drawContext, drawContribution, params)) return !0;
21362
+ return !1;
21363
+ }
21364
+ }, {
21365
+ key: "beforeDrawItem",
21366
+ value: function beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21367
+ if ((!graphic.in3dMode || drawContext.in3dInterceptor) && !graphic.shadowRoot && !(graphic.baseGraphic || graphic.attribute.globalZIndex || graphic.interactiveGraphic)) return !1;
21368
+ for (var i = 0; i < this.interceptors.length; i++) if (this.interceptors[i].beforeDrawItem && this.interceptors[i].beforeDrawItem(graphic, renderService, drawContext, drawContribution, params)) return !0;
21369
+ return !1;
21370
+ }
21371
+ }]);
21372
+ return CommonDrawItemInterceptorContribution;
21373
+ }();
21374
+ exports.CommonDrawItemInterceptorContribution = __decorate$1j([injectable(), __metadata$$("design:paramtypes", [])], exports.CommonDrawItemInterceptorContribution);
21375
+ var InteractiveDrawItemInterceptorContribution = /*#__PURE__*/function () {
21376
+ function InteractiveDrawItemInterceptorContribution() {
21377
+ _classCallCheck(this, InteractiveDrawItemInterceptorContribution);
21378
+ this.order = 1;
21379
+ }
21380
+ _createClass(InteractiveDrawItemInterceptorContribution, [{
21381
+ key: "beforeDrawItem",
21382
+ value: function beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21383
+ return !this.processing && (graphic.baseGraphic ? this.beforeDrawInteractive(graphic, renderService, drawContext, drawContribution, params) : this.beforeSetInteractive(graphic, renderService, drawContext, drawContribution, params));
21384
+ }
21385
+ }, {
21386
+ key: "beforeSetInteractive",
21387
+ value: function beforeSetInteractive(graphic, renderService, drawContext, drawContribution, params) {
21388
+ var interactiveGraphic = graphic.interactiveGraphic;
21389
+ if (graphic.attribute.globalZIndex) {
21390
+ interactiveGraphic || (interactiveGraphic = graphic.clone(), graphic.interactiveGraphic = interactiveGraphic, interactiveGraphic.baseGraphic = graphic), interactiveGraphic.setAttributes({
21391
+ globalZIndex: 0,
21392
+ zIndex: graphic.attribute.globalZIndex
21393
+ }, !1, {
21394
+ skipUpdateCallback: !0
21395
+ }), drawContext.stage.tryInitInteractiveLayer();
21396
+ var interactiveLayer = drawContext.stage.getLayer("_builtin_interactive");
21397
+ if (interactiveLayer) {
21398
+ this.getShadowRoot(interactiveLayer).add(interactiveGraphic);
21399
+ }
21400
+ return !0;
21401
+ }
21402
+ if (interactiveGraphic) {
21403
+ drawContext.stage.tryInitInteractiveLayer();
21404
+ var _interactiveLayer = drawContext.stage.getLayer("_builtin_interactive");
21405
+ if (_interactiveLayer) {
21406
+ this.getShadowRoot(_interactiveLayer).removeChild(interactiveGraphic);
21407
+ }
21408
+ graphic.interactiveGraphic = null, interactiveGraphic.baseGraphic = null;
21409
+ }
21410
+ return !1;
21411
+ }
21412
+ }, {
21413
+ key: "beforeDrawInteractive",
21414
+ value: function beforeDrawInteractive(graphic, renderService, drawContext, drawContribution, params) {
21415
+ var baseGraphic = graphic.baseGraphic;
21416
+ if (baseGraphic) {
21417
+ this.processing = !0;
21418
+ var context = drawContext.context;
21419
+ return context.highPerformanceSave(), context.setTransformFromMatrix(baseGraphic.parent.globalTransMatrix, !0), baseGraphic.isContainer ? drawContribution.renderGroup(baseGraphic, drawContext, baseGraphic.parent.globalTransMatrix) : drawContribution.renderItem(baseGraphic, drawContext), context.highPerformanceRestore(), this.processing = !1, !0;
21420
+ }
21421
+ return !1;
21422
+ }
21423
+ }, {
21424
+ key: "getShadowRoot",
21425
+ value: function getShadowRoot(interactiveLayer) {
21426
+ var _a;
21427
+ var group = interactiveLayer.getElementById("_interactive_group");
21428
+ return group || (group = graphicCreator.CreateGraphic("group", {}), group.id = "_interactive_group", interactiveLayer.add(group)), null !== (_a = group.shadowRoot) && void 0 !== _a ? _a : group.attachShadow();
21429
+ }
21430
+ }]);
21431
+ return InteractiveDrawItemInterceptorContribution;
21432
+ }();
21433
+ var Canvas3DDrawItemInterceptor = /*#__PURE__*/function () {
21434
+ function Canvas3DDrawItemInterceptor() {
21435
+ _classCallCheck(this, Canvas3DDrawItemInterceptor);
21436
+ this.order = 1;
21437
+ }
21438
+ _createClass(Canvas3DDrawItemInterceptor, [{
21439
+ key: "beforeDrawItem",
21440
+ value: function beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21441
+ if (!graphic.in3dMode || drawContext.in3dInterceptor) return !1;
21442
+ drawContext.in3dInterceptor = !0;
21443
+ var _renderService$drawPa = renderService.drawParams,
21444
+ context = _renderService$drawPa.context,
21445
+ stage = _renderService$drawPa.stage;
21446
+ context.canvas;
21447
+ context.save(), this.initCanvasCtx(context), context.camera = stage.camera;
21448
+ var m = context.currentMatrix;
21449
+ m.a /= context.dpr, m.b /= context.dpr, m.c /= context.dpr, m.d /= context.dpr, m.e /= context.dpr, m.f /= context.dpr;
21450
+ var matrix = mat4Allocate.allocate();
21451
+ mat3Tomat4(matrix, m);
21452
+ var lastModelMatrix = context.modelMatrix;
21453
+ if (lastModelMatrix) {
21454
+ if (matrix) {
21455
+ var _m = mat4Allocate.allocate();
21456
+ context.modelMatrix = multiplyMat4Mat4(_m, lastModelMatrix, matrix);
21457
+ }
21458
+ } else context.modelMatrix = matrix;
21459
+ if (context.setTransform(1, 0, 0, 1, 0, 0, !0), graphic.isContainer) {
21460
+ var isPie = !1,
21461
+ is3d = !1;
21462
+ if (graphic.forEachChildren(function (c) {
21463
+ return isPie = c.numberType === ARC3D_NUMBER_TYPE, !isPie;
21464
+ }), graphic.forEachChildren(function (c) {
21465
+ return is3d = !!c.findFace, !is3d;
21466
+ }), isPie) {
21467
+ var children = graphic.getChildren(),
21468
+ sortedChildren = _toConsumableArray(children);
21469
+ sortedChildren.sort(function (a, b) {
21470
+ var _a, _b, _c, _d;
21471
+ var angle1 = ((null !== (_a = a.attribute.startAngle) && void 0 !== _a ? _a : 0) + (null !== (_b = a.attribute.endAngle) && void 0 !== _b ? _b : 0)) / 2,
21472
+ angle2 = ((null !== (_c = b.attribute.startAngle) && void 0 !== _c ? _c : 0) + (null !== (_d = b.attribute.endAngle) && void 0 !== _d ? _d : 0)) / 2;
21473
+ for (; angle1 < 0;) angle1 += pi2;
21474
+ for (; angle2 < 0;) angle2 += pi2;
21475
+ return angle2 - angle1;
21476
+ }), sortedChildren.forEach(function (c) {
21477
+ c._next = null, c._prev = null;
21478
+ }), graphic.removeAllChild(), graphic.update(), sortedChildren.forEach(function (c) {
21479
+ graphic.appendChild(c);
21480
+ });
21481
+ var _m2 = graphic.parent.globalTransMatrix;
21482
+ drawContext.hack_pieFace = "outside", drawContribution.renderGroup(graphic, drawContext, _m2), drawContext.hack_pieFace = "inside", drawContribution.renderGroup(graphic, drawContext, _m2), drawContext.hack_pieFace = "top", drawContribution.renderGroup(graphic, drawContext, _m2), graphic.removeAllChild(), children.forEach(function (c) {
21483
+ c._next = null, c._prev = null;
21484
+ }), children.forEach(function (c) {
21485
+ graphic.appendChild(c);
21486
+ });
21487
+ } else if (is3d) {
21488
+ var _children = graphic.getChildren(),
21489
+ zChildren = _children.map(function (g) {
21490
+ return {
21491
+ ave_z: g.findFace().vertices.map(function (v) {
21492
+ var _a;
21493
+ return context.view(v[0], v[1], null !== (_a = v[2] + g.attribute.z) && void 0 !== _a ? _a : 0)[2];
21494
+ }).reduce(function (a, b) {
21495
+ return a + b;
21496
+ }, 0),
21497
+ g: g
21498
+ };
21499
+ });
21500
+ zChildren.sort(function (a, b) {
21501
+ return b.ave_z - a.ave_z;
21502
+ }), graphic.removeAllChild(), zChildren.forEach(function (i) {
21503
+ i.g._next = null, i.g._prev = null;
21504
+ }), graphic.update(), zChildren.forEach(function (i) {
21505
+ graphic.add(i.g);
21506
+ }), drawContribution.renderGroup(graphic, drawContext, graphic.parent.globalTransMatrix, !0), graphic.removeAllChild(), _children.forEach(function (g) {
21507
+ g._next = null, g._prev = null;
21508
+ }), graphic.update(), _children.forEach(function (g) {
21509
+ graphic.add(g);
21510
+ });
21511
+ } else drawContribution.renderGroup(graphic, drawContext, graphic.parent.globalTransMatrix);
21512
+ } else drawContribution.renderItem(graphic, drawContext);
21513
+ return context.camera = null, context.restore(), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, drawContext.in3dInterceptor = !1, !0;
21514
+ }
21515
+ }, {
21516
+ key: "initCanvasCtx",
21517
+ value: function initCanvasCtx(context) {
21518
+ context.setTransformForCurrent();
21519
+ }
21520
+ }]);
21521
+ return Canvas3DDrawItemInterceptor;
21522
+ }();
21523
+
21524
+ var __decorate$1i = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21525
+ var d,
21526
+ c = arguments.length,
21527
+ r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
21528
+ if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
21529
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
21530
+ },
21531
+ __metadata$_ = undefined && undefined.__metadata || function (k, v) {
21532
+ if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
21243
21533
  },
21244
21534
  __param$E = undefined && undefined.__param || function (paramIndex, decorator) {
21245
21535
  return function (target, key) {
@@ -21298,7 +21588,7 @@
21298
21588
  }]);
21299
21589
  return DefaultRenderService;
21300
21590
  }();
21301
- exports.DefaultRenderService = __decorate$1j([injectable(), __param$E(0, inject(DrawContribution)), __metadata$$("design:paramtypes", [Object])], exports.DefaultRenderService);
21591
+ exports.DefaultRenderService = __decorate$1i([injectable(), __param$E(0, inject(DrawContribution)), __metadata$_("design:paramtypes", [Object])], exports.DefaultRenderService);
21302
21592
 
21303
21593
  var renderModule$1 = new ContainerModule(function (bind) {
21304
21594
  bind(RenderService).to(exports.DefaultRenderService).inSingletonScope();
@@ -21309,7 +21599,7 @@
21309
21599
  var BoundsPicker = Symbol["for"]("BoundsPicker");
21310
21600
  var GlobalPickerService = Symbol["for"]("GlobalPickerService");
21311
21601
 
21312
- var __decorate$1i = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21602
+ var __decorate$1h = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21313
21603
  var d,
21314
21604
  c = arguments.length,
21315
21605
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
@@ -21350,7 +21640,7 @@
21350
21640
  }]);
21351
21641
  return ShadowRootPickItemInterceptorContribution;
21352
21642
  }();
21353
- exports.ShadowRootPickItemInterceptorContribution = __decorate$1i([injectable()], exports.ShadowRootPickItemInterceptorContribution);
21643
+ exports.ShadowRootPickItemInterceptorContribution = __decorate$1h([injectable()], exports.ShadowRootPickItemInterceptorContribution);
21354
21644
  exports.InteractivePickItemInterceptorContribution = /*#__PURE__*/function () {
21355
21645
  function InteractivePickItemInterceptorContribution() {
21356
21646
  _classCallCheck(this, InteractivePickItemInterceptorContribution);
@@ -21374,7 +21664,7 @@
21374
21664
  }]);
21375
21665
  return InteractivePickItemInterceptorContribution;
21376
21666
  }();
21377
- exports.InteractivePickItemInterceptorContribution = __decorate$1i([injectable()], exports.InteractivePickItemInterceptorContribution);
21667
+ exports.InteractivePickItemInterceptorContribution = __decorate$1h([injectable()], exports.InteractivePickItemInterceptorContribution);
21378
21668
  exports.Canvas3DPickItemInterceptor = /*#__PURE__*/function () {
21379
21669
  function Canvas3DPickItemInterceptor() {
21380
21670
  _classCallCheck(this, Canvas3DPickItemInterceptor);
@@ -21451,7 +21741,7 @@
21451
21741
  }]);
21452
21742
  return Canvas3DPickItemInterceptor;
21453
21743
  }();
21454
- exports.Canvas3DPickItemInterceptor = __decorate$1i([injectable()], exports.Canvas3DPickItemInterceptor);
21744
+ exports.Canvas3DPickItemInterceptor = __decorate$1h([injectable()], exports.Canvas3DPickItemInterceptor);
21455
21745
 
21456
21746
  var pickModule = new ContainerModule(function (bind, unbind, isBound) {
21457
21747
  isBound(PickerService) || (bind(GlobalPickerService).toSelf(), bind(PickerService).toService(GlobalPickerService)), bind(exports.Canvas3DPickItemInterceptor).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(exports.Canvas3DPickItemInterceptor), bind(exports.ShadowRootPickItemInterceptorContribution).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(exports.ShadowRootPickItemInterceptorContribution), bind(exports.InteractivePickItemInterceptorContribution).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(exports.InteractivePickItemInterceptorContribution), bindContributionProvider(bind, PickItemInterceptor);
@@ -21464,14 +21754,14 @@
21464
21754
  var AutoEnablePlugins = Symbol["for"]("AutoEnablePlugins");
21465
21755
  var PluginService = Symbol["for"]("PluginService");
21466
21756
 
21467
- var __decorate$1h = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21757
+ var __decorate$1g = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21468
21758
  var d,
21469
21759
  c = arguments.length,
21470
21760
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
21471
21761
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
21472
21762
  return c > 3 && r && Object.defineProperty(target, key, r), r;
21473
21763
  },
21474
- __metadata$_ = undefined && undefined.__metadata || function (k, v) {
21764
+ __metadata$Z = undefined && undefined.__metadata || function (k, v) {
21475
21765
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
21476
21766
  },
21477
21767
  __param$D = undefined && undefined.__param || function (paramIndex, decorator) {
@@ -21527,7 +21817,7 @@
21527
21817
  }]);
21528
21818
  return DefaultPluginService;
21529
21819
  }();
21530
- DefaultPluginService = __decorate$1h([injectable(), __param$D(0, inject(ContributionProvider)), __param$D(0, named(AutoEnablePlugins)), __metadata$_("design:paramtypes", [Object])], DefaultPluginService);
21820
+ DefaultPluginService = __decorate$1g([injectable(), __param$D(0, inject(ContributionProvider)), __param$D(0, named(AutoEnablePlugins)), __metadata$Z("design:paramtypes", [Object])], DefaultPluginService);
21531
21821
 
21532
21822
  var pluginModule = new ContainerModule(function (bind) {
21533
21823
  bind(PluginService).to(DefaultPluginService), bindContributionProviderNoSingletonScope(bind, AutoEnablePlugins);
@@ -21541,14 +21831,14 @@
21541
21831
  bind(TextMeasureContribution).to(exports.DefaultTextMeasureContribution).inSingletonScope(), bindContributionProvider(bind, TextMeasureContribution);
21542
21832
  });
21543
21833
 
21544
- var __decorate$1g = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21834
+ var __decorate$1f = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21545
21835
  var d,
21546
21836
  c = arguments.length,
21547
21837
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
21548
21838
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
21549
21839
  return c > 3 && r && Object.defineProperty(target, key, r), r;
21550
21840
  },
21551
- __metadata$Z = undefined && undefined.__metadata || function (k, v) {
21841
+ __metadata$Y = undefined && undefined.__metadata || function (k, v) {
21552
21842
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
21553
21843
  };
21554
21844
  var CanvasLayerHandlerContribution = /*#__PURE__*/function () {
@@ -21642,16 +21932,16 @@
21642
21932
  }]);
21643
21933
  return CanvasLayerHandlerContribution;
21644
21934
  }();
21645
- CanvasLayerHandlerContribution = __decorate$1g([injectable(), __metadata$Z("design:paramtypes", [])], CanvasLayerHandlerContribution);
21935
+ CanvasLayerHandlerContribution = __decorate$1f([injectable(), __metadata$Y("design:paramtypes", [])], CanvasLayerHandlerContribution);
21646
21936
 
21647
- var __decorate$1f = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21937
+ var __decorate$1e = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21648
21938
  var d,
21649
21939
  c = arguments.length,
21650
21940
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
21651
21941
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
21652
21942
  return c > 3 && r && Object.defineProperty(target, key, r), r;
21653
21943
  },
21654
- __metadata$Y = undefined && undefined.__metadata || function (k, v) {
21944
+ __metadata$X = undefined && undefined.__metadata || function (k, v) {
21655
21945
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
21656
21946
  };
21657
21947
  var EmptyLayerHandlerContribution = /*#__PURE__*/function () {
@@ -21709,16 +21999,16 @@
21709
21999
  }]);
21710
22000
  return EmptyLayerHandlerContribution;
21711
22001
  }();
21712
- EmptyLayerHandlerContribution = __decorate$1f([injectable(), __metadata$Y("design:paramtypes", [])], EmptyLayerHandlerContribution);
22002
+ EmptyLayerHandlerContribution = __decorate$1e([injectable(), __metadata$X("design:paramtypes", [])], EmptyLayerHandlerContribution);
21713
22003
 
21714
- var __decorate$1e = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22004
+ var __decorate$1d = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21715
22005
  var d,
21716
22006
  c = arguments.length,
21717
22007
  r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
21718
22008
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
21719
22009
  return c > 3 && r && Object.defineProperty(target, key, r), r;
21720
22010
  },
21721
- __metadata$X = undefined && undefined.__metadata || function (k, v) {
22011
+ __metadata$W = undefined && undefined.__metadata || function (k, v) {
21722
22012
  if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
21723
22013
  };
21724
22014
  var OffscreenLayerHandlerContribution = /*#__PURE__*/function () {
@@ -21805,7 +22095,7 @@
21805
22095
  }]);
21806
22096
  return OffscreenLayerHandlerContribution;
21807
22097
  }();
21808
- OffscreenLayerHandlerContribution = __decorate$1e([injectable(), __metadata$X("design:paramtypes", [])], OffscreenLayerHandlerContribution);
22098
+ OffscreenLayerHandlerContribution = __decorate$1d([injectable(), __metadata$W("design:paramtypes", [])], OffscreenLayerHandlerContribution);
21809
22099
 
21810
22100
  var layerHandlerModules = new ContainerModule(function (bind) {
21811
22101
  bind(CanvasLayerHandlerContribution).toSelf(), bind(OffscreenLayerHandlerContribution).toSelf(), bind(EmptyLayerHandlerContribution).toSelf(), bind(StaticLayerHandlerContribution).toService(CanvasLayerHandlerContribution), bind(DynamicLayerHandlerContribution).toService(OffscreenLayerHandlerContribution), bind(VirtualLayerHandlerContribution).toService(EmptyLayerHandlerContribution);
@@ -21932,241 +22222,6 @@
21932
22222
  return result;
21933
22223
  }
21934
22224
 
21935
- var __decorate$1d = undefined && undefined.__decorate || function (decorators, target, key, desc) {
21936
- var d,
21937
- c = arguments.length,
21938
- r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
21939
- if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
21940
- return c > 3 && r && Object.defineProperty(target, key, r), r;
21941
- },
21942
- __metadata$W = undefined && undefined.__metadata || function (k, v) {
21943
- if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
21944
- };
21945
- var DrawItemInterceptor = Symbol["for"]("DrawItemInterceptor");
21946
- var tempDirtyBounds = new AABBBounds();
21947
- var ShadowRootDrawItemInterceptorContribution = /*#__PURE__*/function () {
21948
- function ShadowRootDrawItemInterceptorContribution() {
21949
- _classCallCheck(this, ShadowRootDrawItemInterceptorContribution);
21950
- this.order = 1;
21951
- }
21952
- _createClass(ShadowRootDrawItemInterceptorContribution, [{
21953
- key: "afterDrawItem",
21954
- value: function afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21955
- return (graphic.attribute.shadowRootIdx > 0 || !graphic.attribute.shadowRootIdx) && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
21956
- }
21957
- }, {
21958
- key: "beforeDrawItem",
21959
- value: function beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21960
- return graphic.attribute.shadowRootIdx < 0 && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
21961
- }
21962
- }, {
21963
- key: "drawItem",
21964
- value: function drawItem(graphic, renderService, drawContext, drawContribution, params) {
21965
- if (!graphic.shadowRoot) return !1;
21966
- var context = drawContext.context;
21967
- if (context.highPerformanceSave(), context.transformFromMatrix(graphic.transMatrix, !0), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds) {
21968
- tempDirtyBounds.copy(drawContribution.dirtyBounds);
21969
- var m = graphic.globalTransMatrix.getInverse();
21970
- drawContribution.dirtyBounds.copy(drawContribution.backupDirtyBounds).transformWithMatrix(m);
21971
- }
21972
- return drawContribution.renderGroup(graphic.shadowRoot, drawContext, graphic.parent.globalTransMatrix), context.highPerformanceRestore(), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds && drawContribution.dirtyBounds.copy(tempDirtyBounds), !0;
21973
- }
21974
- }]);
21975
- return ShadowRootDrawItemInterceptorContribution;
21976
- }();
21977
- var DebugDrawItemInterceptorContribution = /*#__PURE__*/function () {
21978
- function DebugDrawItemInterceptorContribution() {
21979
- _classCallCheck(this, DebugDrawItemInterceptorContribution);
21980
- this.order = 1;
21981
- }
21982
- _createClass(DebugDrawItemInterceptorContribution, [{
21983
- key: "afterDrawItem",
21984
- value: function afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
21985
- return graphic.attribute._debug_bounds && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
21986
- }
21987
- }, {
21988
- key: "drawItem",
21989
- value: function drawItem(graphic, renderService, drawContext, drawContribution, params) {
21990
- if (!graphic.attribute._debug_bounds) return !1;
21991
- var context = drawContext.context;
21992
- context.highPerformanceSave(), graphic.parent && context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), graphic.glyphHost && graphic.glyphHost.parent && context.setTransformFromMatrix(graphic.glyphHost.parent.globalTransMatrix, !0);
21993
- var b = graphic.AABBBounds;
21994
- return !0 !== graphic.attribute._debug_bounds && graphic.attribute._debug_bounds(context, graphic), context.strokeRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore(), !0;
21995
- }
21996
- }]);
21997
- return DebugDrawItemInterceptorContribution;
21998
- }();
21999
- var CommonDrawItemInterceptorContribution = /*#__PURE__*/function () {
22000
- function CommonDrawItemInterceptorContribution() {
22001
- _classCallCheck(this, CommonDrawItemInterceptorContribution);
22002
- this.order = 1, this.interceptors = [new ShadowRootDrawItemInterceptorContribution(), new Canvas3DDrawItemInterceptor(), new InteractiveDrawItemInterceptorContribution(), new DebugDrawItemInterceptorContribution()];
22003
- }
22004
- _createClass(CommonDrawItemInterceptorContribution, [{
22005
- key: "afterDrawItem",
22006
- value: function afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
22007
- for (var i = 0; i < this.interceptors.length; i++) if (this.interceptors[i].afterDrawItem && this.interceptors[i].afterDrawItem(graphic, renderService, drawContext, drawContribution, params)) return !0;
22008
- return !1;
22009
- }
22010
- }, {
22011
- key: "beforeDrawItem",
22012
- value: function beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
22013
- if ((!graphic.in3dMode || drawContext.in3dInterceptor) && !graphic.shadowRoot && !(graphic.baseGraphic || graphic.attribute.globalZIndex || graphic.interactiveGraphic)) return !1;
22014
- for (var i = 0; i < this.interceptors.length; i++) if (this.interceptors[i].beforeDrawItem && this.interceptors[i].beforeDrawItem(graphic, renderService, drawContext, drawContribution, params)) return !0;
22015
- return !1;
22016
- }
22017
- }]);
22018
- return CommonDrawItemInterceptorContribution;
22019
- }();
22020
- CommonDrawItemInterceptorContribution = __decorate$1d([injectable(), __metadata$W("design:paramtypes", [])], CommonDrawItemInterceptorContribution);
22021
- var InteractiveDrawItemInterceptorContribution = /*#__PURE__*/function () {
22022
- function InteractiveDrawItemInterceptorContribution() {
22023
- _classCallCheck(this, InteractiveDrawItemInterceptorContribution);
22024
- this.order = 1;
22025
- }
22026
- _createClass(InteractiveDrawItemInterceptorContribution, [{
22027
- key: "beforeDrawItem",
22028
- value: function beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
22029
- return !this.processing && (graphic.baseGraphic ? this.beforeDrawInteractive(graphic, renderService, drawContext, drawContribution, params) : this.beforeSetInteractive(graphic, renderService, drawContext, drawContribution, params));
22030
- }
22031
- }, {
22032
- key: "beforeSetInteractive",
22033
- value: function beforeSetInteractive(graphic, renderService, drawContext, drawContribution, params) {
22034
- var interactiveGraphic = graphic.interactiveGraphic;
22035
- if (graphic.attribute.globalZIndex) {
22036
- interactiveGraphic || (interactiveGraphic = graphic.clone(), graphic.interactiveGraphic = interactiveGraphic, interactiveGraphic.baseGraphic = graphic), interactiveGraphic.setAttributes({
22037
- globalZIndex: 0,
22038
- zIndex: graphic.attribute.globalZIndex
22039
- }, !1, {
22040
- skipUpdateCallback: !0
22041
- }), drawContext.stage.tryInitInteractiveLayer();
22042
- var interactiveLayer = drawContext.stage.getLayer("_builtin_interactive");
22043
- if (interactiveLayer) {
22044
- this.getShadowRoot(interactiveLayer).add(interactiveGraphic);
22045
- }
22046
- return !0;
22047
- }
22048
- if (interactiveGraphic) {
22049
- drawContext.stage.tryInitInteractiveLayer();
22050
- var _interactiveLayer = drawContext.stage.getLayer("_builtin_interactive");
22051
- if (_interactiveLayer) {
22052
- this.getShadowRoot(_interactiveLayer).removeChild(interactiveGraphic);
22053
- }
22054
- graphic.interactiveGraphic = null, interactiveGraphic.baseGraphic = null;
22055
- }
22056
- return !1;
22057
- }
22058
- }, {
22059
- key: "beforeDrawInteractive",
22060
- value: function beforeDrawInteractive(graphic, renderService, drawContext, drawContribution, params) {
22061
- var baseGraphic = graphic.baseGraphic;
22062
- if (baseGraphic) {
22063
- this.processing = !0;
22064
- var context = drawContext.context;
22065
- return context.highPerformanceSave(), context.setTransformFromMatrix(baseGraphic.parent.globalTransMatrix, !0), baseGraphic.isContainer ? drawContribution.renderGroup(baseGraphic, drawContext, baseGraphic.parent.globalTransMatrix) : drawContribution.renderItem(baseGraphic, drawContext), context.highPerformanceRestore(), this.processing = !1, !0;
22066
- }
22067
- return !1;
22068
- }
22069
- }, {
22070
- key: "getShadowRoot",
22071
- value: function getShadowRoot(interactiveLayer) {
22072
- var _a;
22073
- var group = interactiveLayer.getElementById("_interactive_group");
22074
- return group || (group = graphicCreator.CreateGraphic("group", {}), group.id = "_interactive_group", interactiveLayer.add(group)), null !== (_a = group.shadowRoot) && void 0 !== _a ? _a : group.attachShadow();
22075
- }
22076
- }]);
22077
- return InteractiveDrawItemInterceptorContribution;
22078
- }();
22079
- var Canvas3DDrawItemInterceptor = /*#__PURE__*/function () {
22080
- function Canvas3DDrawItemInterceptor() {
22081
- _classCallCheck(this, Canvas3DDrawItemInterceptor);
22082
- this.order = 1;
22083
- }
22084
- _createClass(Canvas3DDrawItemInterceptor, [{
22085
- key: "beforeDrawItem",
22086
- value: function beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
22087
- if (!graphic.in3dMode || drawContext.in3dInterceptor) return !1;
22088
- drawContext.in3dInterceptor = !0;
22089
- var _renderService$drawPa = renderService.drawParams,
22090
- context = _renderService$drawPa.context,
22091
- stage = _renderService$drawPa.stage;
22092
- context.canvas;
22093
- context.save(), this.initCanvasCtx(context), context.camera = stage.camera;
22094
- var m = context.currentMatrix;
22095
- m.a /= context.dpr, m.b /= context.dpr, m.c /= context.dpr, m.d /= context.dpr, m.e /= context.dpr, m.f /= context.dpr;
22096
- var matrix = mat4Allocate.allocate();
22097
- mat3Tomat4(matrix, m);
22098
- var lastModelMatrix = context.modelMatrix;
22099
- if (lastModelMatrix) {
22100
- if (matrix) {
22101
- var _m = mat4Allocate.allocate();
22102
- context.modelMatrix = multiplyMat4Mat4(_m, lastModelMatrix, matrix);
22103
- }
22104
- } else context.modelMatrix = matrix;
22105
- if (context.setTransform(1, 0, 0, 1, 0, 0, !0), graphic.isContainer) {
22106
- var isPie = !1,
22107
- is3d = !1;
22108
- if (graphic.forEachChildren(function (c) {
22109
- return isPie = c.numberType === ARC3D_NUMBER_TYPE, !isPie;
22110
- }), graphic.forEachChildren(function (c) {
22111
- return is3d = !!c.findFace, !is3d;
22112
- }), isPie) {
22113
- var children = graphic.getChildren(),
22114
- sortedChildren = _toConsumableArray(children);
22115
- sortedChildren.sort(function (a, b) {
22116
- var _a, _b, _c, _d;
22117
- var angle1 = ((null !== (_a = a.attribute.startAngle) && void 0 !== _a ? _a : 0) + (null !== (_b = a.attribute.endAngle) && void 0 !== _b ? _b : 0)) / 2,
22118
- angle2 = ((null !== (_c = b.attribute.startAngle) && void 0 !== _c ? _c : 0) + (null !== (_d = b.attribute.endAngle) && void 0 !== _d ? _d : 0)) / 2;
22119
- for (; angle1 < 0;) angle1 += pi2;
22120
- for (; angle2 < 0;) angle2 += pi2;
22121
- return angle2 - angle1;
22122
- }), sortedChildren.forEach(function (c) {
22123
- c._next = null, c._prev = null;
22124
- }), graphic.removeAllChild(), graphic.update(), sortedChildren.forEach(function (c) {
22125
- graphic.appendChild(c);
22126
- });
22127
- var _m2 = graphic.parent.globalTransMatrix;
22128
- drawContext.hack_pieFace = "outside", drawContribution.renderGroup(graphic, drawContext, _m2), drawContext.hack_pieFace = "inside", drawContribution.renderGroup(graphic, drawContext, _m2), drawContext.hack_pieFace = "top", drawContribution.renderGroup(graphic, drawContext, _m2), graphic.removeAllChild(), children.forEach(function (c) {
22129
- c._next = null, c._prev = null;
22130
- }), children.forEach(function (c) {
22131
- graphic.appendChild(c);
22132
- });
22133
- } else if (is3d) {
22134
- var _children = graphic.getChildren(),
22135
- zChildren = _children.map(function (g) {
22136
- return {
22137
- ave_z: g.findFace().vertices.map(function (v) {
22138
- var _a;
22139
- return context.view(v[0], v[1], null !== (_a = v[2] + g.attribute.z) && void 0 !== _a ? _a : 0)[2];
22140
- }).reduce(function (a, b) {
22141
- return a + b;
22142
- }, 0),
22143
- g: g
22144
- };
22145
- });
22146
- zChildren.sort(function (a, b) {
22147
- return b.ave_z - a.ave_z;
22148
- }), graphic.removeAllChild(), zChildren.forEach(function (i) {
22149
- i.g._next = null, i.g._prev = null;
22150
- }), graphic.update(), zChildren.forEach(function (i) {
22151
- graphic.add(i.g);
22152
- }), drawContribution.renderGroup(graphic, drawContext, graphic.parent.globalTransMatrix, !0), graphic.removeAllChild(), _children.forEach(function (g) {
22153
- g._next = null, g._prev = null;
22154
- }), graphic.update(), _children.forEach(function (g) {
22155
- graphic.add(g);
22156
- });
22157
- } else drawContribution.renderGroup(graphic, drawContext, graphic.parent.globalTransMatrix);
22158
- } else drawContribution.renderItem(graphic, drawContext);
22159
- return context.camera = null, context.restore(), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, drawContext.in3dInterceptor = !1, !0;
22160
- }
22161
- }, {
22162
- key: "initCanvasCtx",
22163
- value: function initCanvasCtx(context) {
22164
- context.setTransformForCurrent();
22165
- }
22166
- }]);
22167
- return Canvas3DDrawItemInterceptor;
22168
- }();
22169
-
22170
22225
  var __decorate$1c = undefined && undefined.__decorate || function (decorators, target, key, desc) {
22171
22226
  var d,
22172
22227
  c = arguments.length,
@@ -23000,7 +23055,7 @@
23000
23055
  DefaultIncrementalDrawContribution = __decorate$18([injectable(), __param$A(0, multiInject(GraphicRender)), __param$A(1, inject(DefaultIncrementalCanvasLineRender)), __param$A(2, inject(DefaultIncrementalCanvasAreaRender)), __param$A(3, inject(ContributionProvider)), __param$A(3, named(DrawItemInterceptor)), __metadata$T("design:paramtypes", [Array, Object, Object, Object])], DefaultIncrementalDrawContribution);
23001
23056
 
23002
23057
  var renderModule = new ContainerModule(function (bind) {
23003
- bind(DefaultBaseBackgroundRenderContribution).toSelf().inSingletonScope(), bind(DefaultBaseTextureRenderContribution).toSelf().inSingletonScope(), bind(DrawContribution).to(DefaultDrawContribution), bind(IncrementalDrawContribution).to(DefaultIncrementalDrawContribution), bind(GroupRender).to(DefaultCanvasGroupRender).inSingletonScope(), bind(GraphicRender).toService(GroupRender), bindContributionProvider(bind, GroupRenderContribution), bind(exports.DefaultBaseInteractiveRenderContribution).toSelf().inSingletonScope(), bindContributionProvider(bind, InteractiveSubRenderContribution), bindContributionProvider(bind, GraphicRender), bind(CommonDrawItemInterceptorContribution).toSelf().inSingletonScope(), bind(DrawItemInterceptor).toService(CommonDrawItemInterceptorContribution), bindContributionProvider(bind, DrawItemInterceptor);
23058
+ bind(DefaultBaseBackgroundRenderContribution).toSelf().inSingletonScope(), bind(DefaultBaseTextureRenderContribution).toSelf().inSingletonScope(), bind(DrawContribution).to(DefaultDrawContribution), bind(IncrementalDrawContribution).to(DefaultIncrementalDrawContribution), bind(GroupRender).to(DefaultCanvasGroupRender).inSingletonScope(), bind(GraphicRender).toService(GroupRender), bindContributionProvider(bind, GroupRenderContribution), bind(exports.DefaultBaseInteractiveRenderContribution).toSelf().inSingletonScope(), bindContributionProvider(bind, InteractiveSubRenderContribution), bindContributionProvider(bind, GraphicRender), bind(exports.CommonDrawItemInterceptorContribution).toSelf().inSingletonScope(), bind(DrawItemInterceptor).toService(exports.CommonDrawItemInterceptorContribution), bindContributionProvider(bind, DrawItemInterceptor);
23004
23059
  });
23005
23060
 
23006
23061
  function load(container) {
@@ -34853,7 +34908,7 @@
34853
34908
 
34854
34909
  var roughModule = _roughModule;
34855
34910
 
34856
- const version = "0.17.18";
34911
+ const version = "0.17.19-alpha.1";
34857
34912
  preLoadAllModule();
34858
34913
  if (isBrowserEnv()) {
34859
34914
  loadBrowserEnv(container);
@@ -34904,6 +34959,7 @@
34904
34959
  exports.BoundsContext = BoundsContext;
34905
34960
  exports.BoundsPicker = BoundsPicker;
34906
34961
  exports.CIRCLE_NUMBER_TYPE = CIRCLE_NUMBER_TYPE;
34962
+ exports.Canvas3DDrawItemInterceptor = Canvas3DDrawItemInterceptor;
34907
34963
  exports.CanvasFactory = CanvasFactory;
34908
34964
  exports.CanvasTextLayout = CanvasTextLayout;
34909
34965
  exports.CbAnimate = CbAnimate;
@@ -34925,6 +34981,7 @@
34925
34981
  exports.CustomEvent = CustomEvent;
34926
34982
  exports.CustomPath2D = CustomPath2D;
34927
34983
  exports.CustomSymbolClass = CustomSymbolClass;
34984
+ exports.DebugDrawItemInterceptorContribution = DebugDrawItemInterceptorContribution;
34928
34985
  exports.DefaultArcAllocate = DefaultArcAllocate;
34929
34986
  exports.DefaultArcAttribute = DefaultArcAttribute;
34930
34987
  exports.DefaultArcRenderContribution = DefaultArcRenderContribution;
@@ -34978,6 +35035,7 @@
34978
35035
  exports.DefaultTransform = DefaultTransform;
34979
35036
  exports.DragNDrop = DragNDrop;
34980
35037
  exports.DrawContribution = DrawContribution;
35038
+ exports.DrawItemInterceptor = DrawItemInterceptor;
34981
35039
  exports.DynamicLayerHandlerContribution = DynamicLayerHandlerContribution;
34982
35040
  exports.EnvContribution = EnvContribution;
34983
35041
  exports.EventManager = EventManager;
@@ -35016,6 +35074,7 @@
35016
35074
  exports.IncreaseCount = IncreaseCount;
35017
35075
  exports.IncrementalDrawContribution = IncrementalDrawContribution;
35018
35076
  exports.InputText = InputText;
35077
+ exports.InteractiveDrawItemInterceptorContribution = InteractiveDrawItemInterceptorContribution;
35019
35078
  exports.InteractiveSubRenderContribution = InteractiveSubRenderContribution;
35020
35079
  exports.LINE_NUMBER_TYPE = LINE_NUMBER_TYPE;
35021
35080
  exports.Layer = Layer;
@@ -35077,6 +35136,7 @@
35077
35136
  exports.SYMBOL_NUMBER_TYPE = SYMBOL_NUMBER_TYPE;
35078
35137
  exports.SegContext = SegContext;
35079
35138
  exports.ShadowRoot = ShadowRoot;
35139
+ exports.ShadowRootDrawItemInterceptorContribution = ShadowRootDrawItemInterceptorContribution;
35080
35140
  exports.Stage = Stage;
35081
35141
  exports.StaticLayerHandlerContribution = StaticLayerHandlerContribution;
35082
35142
  exports.Step = Step$1;