@visactor/vrender 0.17.18-alpha.0 → 0.17.18-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/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.js +263 -255
- package/dist/index.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -6976,7 +6976,10 @@
|
|
|
6976
6976
|
value: function removeAllChild() {
|
|
6977
6977
|
if (!this._idMap) return;
|
|
6978
6978
|
var child = this._firstChild;
|
|
6979
|
-
for (; child;)
|
|
6979
|
+
for (; child;) {
|
|
6980
|
+
var next = child._next;
|
|
6981
|
+
child.parent = null, child._prev = null, child._next = null, child = next;
|
|
6982
|
+
}
|
|
6980
6983
|
this._firstChild = null, this._lastChild = null, this._idMap.clear(), this._structEdit = !0, this.setCount(1 - this._count);
|
|
6981
6984
|
}
|
|
6982
6985
|
}, {
|
|
@@ -21283,6 +21286,241 @@
|
|
|
21283
21286
|
},
|
|
21284
21287
|
__metadata$$ = undefined && undefined.__metadata || function (k, v) {
|
|
21285
21288
|
if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
21289
|
+
};
|
|
21290
|
+
var DrawItemInterceptor = Symbol["for"]("DrawItemInterceptor");
|
|
21291
|
+
var tempDirtyBounds = new AABBBounds();
|
|
21292
|
+
var ShadowRootDrawItemInterceptorContribution = /*#__PURE__*/function () {
|
|
21293
|
+
function ShadowRootDrawItemInterceptorContribution() {
|
|
21294
|
+
_classCallCheck(this, ShadowRootDrawItemInterceptorContribution);
|
|
21295
|
+
this.order = 1;
|
|
21296
|
+
}
|
|
21297
|
+
_createClass(ShadowRootDrawItemInterceptorContribution, [{
|
|
21298
|
+
key: "afterDrawItem",
|
|
21299
|
+
value: function afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
21300
|
+
return (graphic.attribute.shadowRootIdx > 0 || !graphic.attribute.shadowRootIdx) && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
|
|
21301
|
+
}
|
|
21302
|
+
}, {
|
|
21303
|
+
key: "beforeDrawItem",
|
|
21304
|
+
value: function beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
21305
|
+
return graphic.attribute.shadowRootIdx < 0 && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
|
|
21306
|
+
}
|
|
21307
|
+
}, {
|
|
21308
|
+
key: "drawItem",
|
|
21309
|
+
value: function drawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
21310
|
+
if (!graphic.shadowRoot) return !1;
|
|
21311
|
+
var context = drawContext.context;
|
|
21312
|
+
if (context.highPerformanceSave(), context.transformFromMatrix(graphic.transMatrix, !0), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds) {
|
|
21313
|
+
tempDirtyBounds.copy(drawContribution.dirtyBounds);
|
|
21314
|
+
var m = graphic.globalTransMatrix.getInverse();
|
|
21315
|
+
drawContribution.dirtyBounds.copy(drawContribution.backupDirtyBounds).transformWithMatrix(m);
|
|
21316
|
+
}
|
|
21317
|
+
return drawContribution.renderGroup(graphic.shadowRoot, drawContext, graphic.parent.globalTransMatrix), context.highPerformanceRestore(), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds && drawContribution.dirtyBounds.copy(tempDirtyBounds), !0;
|
|
21318
|
+
}
|
|
21319
|
+
}]);
|
|
21320
|
+
return ShadowRootDrawItemInterceptorContribution;
|
|
21321
|
+
}();
|
|
21322
|
+
var DebugDrawItemInterceptorContribution = /*#__PURE__*/function () {
|
|
21323
|
+
function DebugDrawItemInterceptorContribution() {
|
|
21324
|
+
_classCallCheck(this, DebugDrawItemInterceptorContribution);
|
|
21325
|
+
this.order = 1;
|
|
21326
|
+
}
|
|
21327
|
+
_createClass(DebugDrawItemInterceptorContribution, [{
|
|
21328
|
+
key: "afterDrawItem",
|
|
21329
|
+
value: function afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
21330
|
+
return graphic.attribute._debug_bounds && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
|
|
21331
|
+
}
|
|
21332
|
+
}, {
|
|
21333
|
+
key: "drawItem",
|
|
21334
|
+
value: function drawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
21335
|
+
if (!graphic.attribute._debug_bounds) return !1;
|
|
21336
|
+
var context = drawContext.context;
|
|
21337
|
+
context.highPerformanceSave(), graphic.parent && context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), graphic.glyphHost && graphic.glyphHost.parent && context.setTransformFromMatrix(graphic.glyphHost.parent.globalTransMatrix, !0);
|
|
21338
|
+
var b = graphic.AABBBounds;
|
|
21339
|
+
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;
|
|
21340
|
+
}
|
|
21341
|
+
}]);
|
|
21342
|
+
return DebugDrawItemInterceptorContribution;
|
|
21343
|
+
}();
|
|
21344
|
+
exports.CommonDrawItemInterceptorContribution = /*#__PURE__*/function () {
|
|
21345
|
+
function CommonDrawItemInterceptorContribution() {
|
|
21346
|
+
_classCallCheck(this, CommonDrawItemInterceptorContribution);
|
|
21347
|
+
this.order = 1, this.interceptors = [new ShadowRootDrawItemInterceptorContribution(), new Canvas3DDrawItemInterceptor(), new InteractiveDrawItemInterceptorContribution(), new DebugDrawItemInterceptorContribution()];
|
|
21348
|
+
}
|
|
21349
|
+
_createClass(CommonDrawItemInterceptorContribution, [{
|
|
21350
|
+
key: "afterDrawItem",
|
|
21351
|
+
value: function afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
21352
|
+
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;
|
|
21353
|
+
return !1;
|
|
21354
|
+
}
|
|
21355
|
+
}, {
|
|
21356
|
+
key: "beforeDrawItem",
|
|
21357
|
+
value: function beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
21358
|
+
if ((!graphic.in3dMode || drawContext.in3dInterceptor) && !graphic.shadowRoot && !(graphic.baseGraphic || graphic.attribute.globalZIndex || graphic.interactiveGraphic)) return !1;
|
|
21359
|
+
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;
|
|
21360
|
+
return !1;
|
|
21361
|
+
}
|
|
21362
|
+
}]);
|
|
21363
|
+
return CommonDrawItemInterceptorContribution;
|
|
21364
|
+
}();
|
|
21365
|
+
exports.CommonDrawItemInterceptorContribution = __decorate$1j([injectable(), __metadata$$("design:paramtypes", [])], exports.CommonDrawItemInterceptorContribution);
|
|
21366
|
+
var InteractiveDrawItemInterceptorContribution = /*#__PURE__*/function () {
|
|
21367
|
+
function InteractiveDrawItemInterceptorContribution() {
|
|
21368
|
+
_classCallCheck(this, InteractiveDrawItemInterceptorContribution);
|
|
21369
|
+
this.order = 1;
|
|
21370
|
+
}
|
|
21371
|
+
_createClass(InteractiveDrawItemInterceptorContribution, [{
|
|
21372
|
+
key: "beforeDrawItem",
|
|
21373
|
+
value: function beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
21374
|
+
return !this.processing && (graphic.baseGraphic ? this.beforeDrawInteractive(graphic, renderService, drawContext, drawContribution, params) : this.beforeSetInteractive(graphic, renderService, drawContext, drawContribution, params));
|
|
21375
|
+
}
|
|
21376
|
+
}, {
|
|
21377
|
+
key: "beforeSetInteractive",
|
|
21378
|
+
value: function beforeSetInteractive(graphic, renderService, drawContext, drawContribution, params) {
|
|
21379
|
+
var interactiveGraphic = graphic.interactiveGraphic;
|
|
21380
|
+
if (graphic.attribute.globalZIndex) {
|
|
21381
|
+
interactiveGraphic || (interactiveGraphic = graphic.clone(), graphic.interactiveGraphic = interactiveGraphic, interactiveGraphic.baseGraphic = graphic), interactiveGraphic.setAttributes({
|
|
21382
|
+
globalZIndex: 0,
|
|
21383
|
+
zIndex: graphic.attribute.globalZIndex
|
|
21384
|
+
}, !1, {
|
|
21385
|
+
skipUpdateCallback: !0
|
|
21386
|
+
}), drawContext.stage.tryInitInteractiveLayer();
|
|
21387
|
+
var interactiveLayer = drawContext.stage.getLayer("_builtin_interactive");
|
|
21388
|
+
if (interactiveLayer) {
|
|
21389
|
+
this.getShadowRoot(interactiveLayer).add(interactiveGraphic);
|
|
21390
|
+
}
|
|
21391
|
+
return !0;
|
|
21392
|
+
}
|
|
21393
|
+
if (interactiveGraphic) {
|
|
21394
|
+
drawContext.stage.tryInitInteractiveLayer();
|
|
21395
|
+
var _interactiveLayer = drawContext.stage.getLayer("_builtin_interactive");
|
|
21396
|
+
if (_interactiveLayer) {
|
|
21397
|
+
this.getShadowRoot(_interactiveLayer).removeChild(interactiveGraphic);
|
|
21398
|
+
}
|
|
21399
|
+
graphic.interactiveGraphic = null, interactiveGraphic.baseGraphic = null;
|
|
21400
|
+
}
|
|
21401
|
+
return !1;
|
|
21402
|
+
}
|
|
21403
|
+
}, {
|
|
21404
|
+
key: "beforeDrawInteractive",
|
|
21405
|
+
value: function beforeDrawInteractive(graphic, renderService, drawContext, drawContribution, params) {
|
|
21406
|
+
var baseGraphic = graphic.baseGraphic;
|
|
21407
|
+
if (baseGraphic) {
|
|
21408
|
+
this.processing = !0;
|
|
21409
|
+
var context = drawContext.context;
|
|
21410
|
+
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;
|
|
21411
|
+
}
|
|
21412
|
+
return !1;
|
|
21413
|
+
}
|
|
21414
|
+
}, {
|
|
21415
|
+
key: "getShadowRoot",
|
|
21416
|
+
value: function getShadowRoot(interactiveLayer) {
|
|
21417
|
+
var _a;
|
|
21418
|
+
var group = interactiveLayer.getElementById("_interactive_group");
|
|
21419
|
+
return group || (group = graphicCreator.CreateGraphic("group", {}), group.id = "_interactive_group", interactiveLayer.add(group)), null !== (_a = group.shadowRoot) && void 0 !== _a ? _a : group.attachShadow();
|
|
21420
|
+
}
|
|
21421
|
+
}]);
|
|
21422
|
+
return InteractiveDrawItemInterceptorContribution;
|
|
21423
|
+
}();
|
|
21424
|
+
var Canvas3DDrawItemInterceptor = /*#__PURE__*/function () {
|
|
21425
|
+
function Canvas3DDrawItemInterceptor() {
|
|
21426
|
+
_classCallCheck(this, Canvas3DDrawItemInterceptor);
|
|
21427
|
+
this.order = 1;
|
|
21428
|
+
}
|
|
21429
|
+
_createClass(Canvas3DDrawItemInterceptor, [{
|
|
21430
|
+
key: "beforeDrawItem",
|
|
21431
|
+
value: function beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
21432
|
+
if (!graphic.in3dMode || drawContext.in3dInterceptor) return !1;
|
|
21433
|
+
drawContext.in3dInterceptor = !0;
|
|
21434
|
+
var _renderService$drawPa = renderService.drawParams,
|
|
21435
|
+
context = _renderService$drawPa.context,
|
|
21436
|
+
stage = _renderService$drawPa.stage;
|
|
21437
|
+
context.canvas;
|
|
21438
|
+
context.save(), this.initCanvasCtx(context), context.camera = stage.camera;
|
|
21439
|
+
var m = context.currentMatrix;
|
|
21440
|
+
m.a /= context.dpr, m.b /= context.dpr, m.c /= context.dpr, m.d /= context.dpr, m.e /= context.dpr, m.f /= context.dpr;
|
|
21441
|
+
var matrix = mat4Allocate.allocate();
|
|
21442
|
+
mat3Tomat4(matrix, m);
|
|
21443
|
+
var lastModelMatrix = context.modelMatrix;
|
|
21444
|
+
if (lastModelMatrix) {
|
|
21445
|
+
if (matrix) {
|
|
21446
|
+
var _m = mat4Allocate.allocate();
|
|
21447
|
+
context.modelMatrix = multiplyMat4Mat4(_m, lastModelMatrix, matrix);
|
|
21448
|
+
}
|
|
21449
|
+
} else context.modelMatrix = matrix;
|
|
21450
|
+
if (context.setTransform(1, 0, 0, 1, 0, 0, !0), graphic.isContainer) {
|
|
21451
|
+
var isPie = !1,
|
|
21452
|
+
is3d = !1;
|
|
21453
|
+
if (graphic.forEachChildren(function (c) {
|
|
21454
|
+
return isPie = c.numberType === ARC3D_NUMBER_TYPE, !isPie;
|
|
21455
|
+
}), graphic.forEachChildren(function (c) {
|
|
21456
|
+
return is3d = !!c.findFace, !is3d;
|
|
21457
|
+
}), isPie) {
|
|
21458
|
+
var children = graphic.getChildren(),
|
|
21459
|
+
sortedChildren = _toConsumableArray(children);
|
|
21460
|
+
sortedChildren.sort(function (a, b) {
|
|
21461
|
+
var _a, _b, _c, _d;
|
|
21462
|
+
var angle1 = ((null !== (_a = a.attribute.startAngle) && void 0 !== _a ? _a : 0) + (null !== (_b = a.attribute.endAngle) && void 0 !== _b ? _b : 0)) / 2,
|
|
21463
|
+
angle2 = ((null !== (_c = b.attribute.startAngle) && void 0 !== _c ? _c : 0) + (null !== (_d = b.attribute.endAngle) && void 0 !== _d ? _d : 0)) / 2;
|
|
21464
|
+
for (; angle1 < 0;) angle1 += pi2;
|
|
21465
|
+
for (; angle2 < 0;) angle2 += pi2;
|
|
21466
|
+
return angle2 - angle1;
|
|
21467
|
+
}), sortedChildren.forEach(function (c) {
|
|
21468
|
+
c._next = null, c._prev = null;
|
|
21469
|
+
}), graphic.removeAllChild(), graphic.update(), sortedChildren.forEach(function (c) {
|
|
21470
|
+
graphic.appendChild(c);
|
|
21471
|
+
});
|
|
21472
|
+
var _m2 = graphic.parent.globalTransMatrix;
|
|
21473
|
+
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) {
|
|
21474
|
+
c._next = null, c._prev = null;
|
|
21475
|
+
}), children.forEach(function (c) {
|
|
21476
|
+
graphic.appendChild(c);
|
|
21477
|
+
});
|
|
21478
|
+
} else if (is3d) {
|
|
21479
|
+
var _children = graphic.getChildren(),
|
|
21480
|
+
zChildren = _children.map(function (g) {
|
|
21481
|
+
return {
|
|
21482
|
+
ave_z: g.findFace().vertices.map(function (v) {
|
|
21483
|
+
var _a;
|
|
21484
|
+
return context.view(v[0], v[1], null !== (_a = v[2] + g.attribute.z) && void 0 !== _a ? _a : 0)[2];
|
|
21485
|
+
}).reduce(function (a, b) {
|
|
21486
|
+
return a + b;
|
|
21487
|
+
}, 0),
|
|
21488
|
+
g: g
|
|
21489
|
+
};
|
|
21490
|
+
});
|
|
21491
|
+
zChildren.sort(function (a, b) {
|
|
21492
|
+
return b.ave_z - a.ave_z;
|
|
21493
|
+
}), graphic.removeAllChild(), zChildren.forEach(function (i) {
|
|
21494
|
+
i.g._next = null, i.g._prev = null;
|
|
21495
|
+
}), graphic.update(), zChildren.forEach(function (i) {
|
|
21496
|
+
graphic.add(i.g);
|
|
21497
|
+
}), drawContribution.renderGroup(graphic, drawContext, graphic.parent.globalTransMatrix, !0), graphic.removeAllChild(), _children.forEach(function (g) {
|
|
21498
|
+
g._next = null, g._prev = null;
|
|
21499
|
+
}), graphic.update(), _children.forEach(function (g) {
|
|
21500
|
+
graphic.add(g);
|
|
21501
|
+
});
|
|
21502
|
+
} else drawContribution.renderGroup(graphic, drawContext, graphic.parent.globalTransMatrix);
|
|
21503
|
+
} else drawContribution.renderItem(graphic, drawContext);
|
|
21504
|
+
return context.camera = null, context.restore(), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, drawContext.in3dInterceptor = !1, !0;
|
|
21505
|
+
}
|
|
21506
|
+
}, {
|
|
21507
|
+
key: "initCanvasCtx",
|
|
21508
|
+
value: function initCanvasCtx(context) {
|
|
21509
|
+
context.setTransformForCurrent();
|
|
21510
|
+
}
|
|
21511
|
+
}]);
|
|
21512
|
+
return Canvas3DDrawItemInterceptor;
|
|
21513
|
+
}();
|
|
21514
|
+
|
|
21515
|
+
var __decorate$1i = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
21516
|
+
var d,
|
|
21517
|
+
c = arguments.length,
|
|
21518
|
+
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
21519
|
+
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);
|
|
21520
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21521
|
+
},
|
|
21522
|
+
__metadata$_ = undefined && undefined.__metadata || function (k, v) {
|
|
21523
|
+
if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
21286
21524
|
},
|
|
21287
21525
|
__param$E = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
21288
21526
|
return function (target, key) {
|
|
@@ -21341,7 +21579,7 @@
|
|
|
21341
21579
|
}]);
|
|
21342
21580
|
return DefaultRenderService;
|
|
21343
21581
|
}();
|
|
21344
|
-
exports.DefaultRenderService = __decorate$
|
|
21582
|
+
exports.DefaultRenderService = __decorate$1i([injectable(), __param$E(0, inject(DrawContribution)), __metadata$_("design:paramtypes", [Object])], exports.DefaultRenderService);
|
|
21345
21583
|
|
|
21346
21584
|
var renderModule$1 = new ContainerModule(function (bind) {
|
|
21347
21585
|
bind(RenderService).to(exports.DefaultRenderService).inSingletonScope();
|
|
@@ -21352,7 +21590,7 @@
|
|
|
21352
21590
|
var BoundsPicker = Symbol["for"]("BoundsPicker");
|
|
21353
21591
|
var GlobalPickerService = Symbol["for"]("GlobalPickerService");
|
|
21354
21592
|
|
|
21355
|
-
var __decorate$
|
|
21593
|
+
var __decorate$1h = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
21356
21594
|
var d,
|
|
21357
21595
|
c = arguments.length,
|
|
21358
21596
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -21393,7 +21631,7 @@
|
|
|
21393
21631
|
}]);
|
|
21394
21632
|
return ShadowRootPickItemInterceptorContribution;
|
|
21395
21633
|
}();
|
|
21396
|
-
exports.ShadowRootPickItemInterceptorContribution = __decorate$
|
|
21634
|
+
exports.ShadowRootPickItemInterceptorContribution = __decorate$1h([injectable()], exports.ShadowRootPickItemInterceptorContribution);
|
|
21397
21635
|
exports.InteractivePickItemInterceptorContribution = /*#__PURE__*/function () {
|
|
21398
21636
|
function InteractivePickItemInterceptorContribution() {
|
|
21399
21637
|
_classCallCheck(this, InteractivePickItemInterceptorContribution);
|
|
@@ -21417,7 +21655,7 @@
|
|
|
21417
21655
|
}]);
|
|
21418
21656
|
return InteractivePickItemInterceptorContribution;
|
|
21419
21657
|
}();
|
|
21420
|
-
exports.InteractivePickItemInterceptorContribution = __decorate$
|
|
21658
|
+
exports.InteractivePickItemInterceptorContribution = __decorate$1h([injectable()], exports.InteractivePickItemInterceptorContribution);
|
|
21421
21659
|
exports.Canvas3DPickItemInterceptor = /*#__PURE__*/function () {
|
|
21422
21660
|
function Canvas3DPickItemInterceptor() {
|
|
21423
21661
|
_classCallCheck(this, Canvas3DPickItemInterceptor);
|
|
@@ -21494,7 +21732,7 @@
|
|
|
21494
21732
|
}]);
|
|
21495
21733
|
return Canvas3DPickItemInterceptor;
|
|
21496
21734
|
}();
|
|
21497
|
-
exports.Canvas3DPickItemInterceptor = __decorate$
|
|
21735
|
+
exports.Canvas3DPickItemInterceptor = __decorate$1h([injectable()], exports.Canvas3DPickItemInterceptor);
|
|
21498
21736
|
|
|
21499
21737
|
var pickModule = new ContainerModule(function (bind, unbind, isBound) {
|
|
21500
21738
|
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);
|
|
@@ -21507,14 +21745,14 @@
|
|
|
21507
21745
|
var AutoEnablePlugins = Symbol["for"]("AutoEnablePlugins");
|
|
21508
21746
|
var PluginService = Symbol["for"]("PluginService");
|
|
21509
21747
|
|
|
21510
|
-
var __decorate$
|
|
21748
|
+
var __decorate$1g = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
21511
21749
|
var d,
|
|
21512
21750
|
c = arguments.length,
|
|
21513
21751
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
21514
21752
|
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);
|
|
21515
21753
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21516
21754
|
},
|
|
21517
|
-
__metadata$
|
|
21755
|
+
__metadata$Z = undefined && undefined.__metadata || function (k, v) {
|
|
21518
21756
|
if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
21519
21757
|
},
|
|
21520
21758
|
__param$D = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
@@ -21570,7 +21808,7 @@
|
|
|
21570
21808
|
}]);
|
|
21571
21809
|
return DefaultPluginService;
|
|
21572
21810
|
}();
|
|
21573
|
-
DefaultPluginService = __decorate$
|
|
21811
|
+
DefaultPluginService = __decorate$1g([injectable(), __param$D(0, inject(ContributionProvider)), __param$D(0, named(AutoEnablePlugins)), __metadata$Z("design:paramtypes", [Object])], DefaultPluginService);
|
|
21574
21812
|
|
|
21575
21813
|
var pluginModule = new ContainerModule(function (bind) {
|
|
21576
21814
|
bind(PluginService).to(DefaultPluginService), bindContributionProviderNoSingletonScope(bind, AutoEnablePlugins);
|
|
@@ -21584,14 +21822,14 @@
|
|
|
21584
21822
|
bind(TextMeasureContribution).to(exports.DefaultTextMeasureContribution).inSingletonScope(), bindContributionProvider(bind, TextMeasureContribution);
|
|
21585
21823
|
});
|
|
21586
21824
|
|
|
21587
|
-
var __decorate$
|
|
21825
|
+
var __decorate$1f = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
21588
21826
|
var d,
|
|
21589
21827
|
c = arguments.length,
|
|
21590
21828
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
21591
21829
|
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);
|
|
21592
21830
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21593
21831
|
},
|
|
21594
|
-
__metadata$
|
|
21832
|
+
__metadata$Y = undefined && undefined.__metadata || function (k, v) {
|
|
21595
21833
|
if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
21596
21834
|
};
|
|
21597
21835
|
var CanvasLayerHandlerContribution = /*#__PURE__*/function () {
|
|
@@ -21685,16 +21923,16 @@
|
|
|
21685
21923
|
}]);
|
|
21686
21924
|
return CanvasLayerHandlerContribution;
|
|
21687
21925
|
}();
|
|
21688
|
-
CanvasLayerHandlerContribution = __decorate$
|
|
21926
|
+
CanvasLayerHandlerContribution = __decorate$1f([injectable(), __metadata$Y("design:paramtypes", [])], CanvasLayerHandlerContribution);
|
|
21689
21927
|
|
|
21690
|
-
var __decorate$
|
|
21928
|
+
var __decorate$1e = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
21691
21929
|
var d,
|
|
21692
21930
|
c = arguments.length,
|
|
21693
21931
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
21694
21932
|
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);
|
|
21695
21933
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21696
21934
|
},
|
|
21697
|
-
__metadata$
|
|
21935
|
+
__metadata$X = undefined && undefined.__metadata || function (k, v) {
|
|
21698
21936
|
if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
21699
21937
|
};
|
|
21700
21938
|
var EmptyLayerHandlerContribution = /*#__PURE__*/function () {
|
|
@@ -21752,16 +21990,16 @@
|
|
|
21752
21990
|
}]);
|
|
21753
21991
|
return EmptyLayerHandlerContribution;
|
|
21754
21992
|
}();
|
|
21755
|
-
EmptyLayerHandlerContribution = __decorate$
|
|
21993
|
+
EmptyLayerHandlerContribution = __decorate$1e([injectable(), __metadata$X("design:paramtypes", [])], EmptyLayerHandlerContribution);
|
|
21756
21994
|
|
|
21757
|
-
var __decorate$
|
|
21995
|
+
var __decorate$1d = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
21758
21996
|
var d,
|
|
21759
21997
|
c = arguments.length,
|
|
21760
21998
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
21761
21999
|
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);
|
|
21762
22000
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21763
22001
|
},
|
|
21764
|
-
__metadata$
|
|
22002
|
+
__metadata$W = undefined && undefined.__metadata || function (k, v) {
|
|
21765
22003
|
if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
21766
22004
|
};
|
|
21767
22005
|
var OffscreenLayerHandlerContribution = /*#__PURE__*/function () {
|
|
@@ -21848,7 +22086,7 @@
|
|
|
21848
22086
|
}]);
|
|
21849
22087
|
return OffscreenLayerHandlerContribution;
|
|
21850
22088
|
}();
|
|
21851
|
-
OffscreenLayerHandlerContribution = __decorate$
|
|
22089
|
+
OffscreenLayerHandlerContribution = __decorate$1d([injectable(), __metadata$W("design:paramtypes", [])], OffscreenLayerHandlerContribution);
|
|
21852
22090
|
|
|
21853
22091
|
var layerHandlerModules = new ContainerModule(function (bind) {
|
|
21854
22092
|
bind(CanvasLayerHandlerContribution).toSelf(), bind(OffscreenLayerHandlerContribution).toSelf(), bind(EmptyLayerHandlerContribution).toSelf(), bind(StaticLayerHandlerContribution).toService(CanvasLayerHandlerContribution), bind(DynamicLayerHandlerContribution).toService(OffscreenLayerHandlerContribution), bind(VirtualLayerHandlerContribution).toService(EmptyLayerHandlerContribution);
|
|
@@ -21975,241 +22213,6 @@
|
|
|
21975
22213
|
return result;
|
|
21976
22214
|
}
|
|
21977
22215
|
|
|
21978
|
-
var __decorate$1d = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
21979
|
-
var d,
|
|
21980
|
-
c = arguments.length,
|
|
21981
|
-
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
21982
|
-
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);
|
|
21983
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21984
|
-
},
|
|
21985
|
-
__metadata$W = undefined && undefined.__metadata || function (k, v) {
|
|
21986
|
-
if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
21987
|
-
};
|
|
21988
|
-
var DrawItemInterceptor = Symbol["for"]("DrawItemInterceptor");
|
|
21989
|
-
var tempDirtyBounds = new AABBBounds();
|
|
21990
|
-
var ShadowRootDrawItemInterceptorContribution = /*#__PURE__*/function () {
|
|
21991
|
-
function ShadowRootDrawItemInterceptorContribution() {
|
|
21992
|
-
_classCallCheck(this, ShadowRootDrawItemInterceptorContribution);
|
|
21993
|
-
this.order = 1;
|
|
21994
|
-
}
|
|
21995
|
-
_createClass(ShadowRootDrawItemInterceptorContribution, [{
|
|
21996
|
-
key: "afterDrawItem",
|
|
21997
|
-
value: function afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
21998
|
-
return (graphic.attribute.shadowRootIdx > 0 || !graphic.attribute.shadowRootIdx) && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
|
|
21999
|
-
}
|
|
22000
|
-
}, {
|
|
22001
|
-
key: "beforeDrawItem",
|
|
22002
|
-
value: function beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
22003
|
-
return graphic.attribute.shadowRootIdx < 0 && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
|
|
22004
|
-
}
|
|
22005
|
-
}, {
|
|
22006
|
-
key: "drawItem",
|
|
22007
|
-
value: function drawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
22008
|
-
if (!graphic.shadowRoot) return !1;
|
|
22009
|
-
var context = drawContext.context;
|
|
22010
|
-
if (context.highPerformanceSave(), context.transformFromMatrix(graphic.transMatrix, !0), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds) {
|
|
22011
|
-
tempDirtyBounds.copy(drawContribution.dirtyBounds);
|
|
22012
|
-
var m = graphic.globalTransMatrix.getInverse();
|
|
22013
|
-
drawContribution.dirtyBounds.copy(drawContribution.backupDirtyBounds).transformWithMatrix(m);
|
|
22014
|
-
}
|
|
22015
|
-
return drawContribution.renderGroup(graphic.shadowRoot, drawContext, graphic.parent.globalTransMatrix), context.highPerformanceRestore(), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds && drawContribution.dirtyBounds.copy(tempDirtyBounds), !0;
|
|
22016
|
-
}
|
|
22017
|
-
}]);
|
|
22018
|
-
return ShadowRootDrawItemInterceptorContribution;
|
|
22019
|
-
}();
|
|
22020
|
-
var DebugDrawItemInterceptorContribution = /*#__PURE__*/function () {
|
|
22021
|
-
function DebugDrawItemInterceptorContribution() {
|
|
22022
|
-
_classCallCheck(this, DebugDrawItemInterceptorContribution);
|
|
22023
|
-
this.order = 1;
|
|
22024
|
-
}
|
|
22025
|
-
_createClass(DebugDrawItemInterceptorContribution, [{
|
|
22026
|
-
key: "afterDrawItem",
|
|
22027
|
-
value: function afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
22028
|
-
return graphic.attribute._debug_bounds && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
|
|
22029
|
-
}
|
|
22030
|
-
}, {
|
|
22031
|
-
key: "drawItem",
|
|
22032
|
-
value: function drawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
22033
|
-
if (!graphic.attribute._debug_bounds) return !1;
|
|
22034
|
-
var context = drawContext.context;
|
|
22035
|
-
context.highPerformanceSave(), graphic.parent && context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), graphic.glyphHost && graphic.glyphHost.parent && context.setTransformFromMatrix(graphic.glyphHost.parent.globalTransMatrix, !0);
|
|
22036
|
-
var b = graphic.AABBBounds;
|
|
22037
|
-
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;
|
|
22038
|
-
}
|
|
22039
|
-
}]);
|
|
22040
|
-
return DebugDrawItemInterceptorContribution;
|
|
22041
|
-
}();
|
|
22042
|
-
var CommonDrawItemInterceptorContribution = /*#__PURE__*/function () {
|
|
22043
|
-
function CommonDrawItemInterceptorContribution() {
|
|
22044
|
-
_classCallCheck(this, CommonDrawItemInterceptorContribution);
|
|
22045
|
-
this.order = 1, this.interceptors = [new ShadowRootDrawItemInterceptorContribution(), new Canvas3DDrawItemInterceptor(), new InteractiveDrawItemInterceptorContribution(), new DebugDrawItemInterceptorContribution()];
|
|
22046
|
-
}
|
|
22047
|
-
_createClass(CommonDrawItemInterceptorContribution, [{
|
|
22048
|
-
key: "afterDrawItem",
|
|
22049
|
-
value: function afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
22050
|
-
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;
|
|
22051
|
-
return !1;
|
|
22052
|
-
}
|
|
22053
|
-
}, {
|
|
22054
|
-
key: "beforeDrawItem",
|
|
22055
|
-
value: function beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
22056
|
-
if ((!graphic.in3dMode || drawContext.in3dInterceptor) && !graphic.shadowRoot && !(graphic.baseGraphic || graphic.attribute.globalZIndex || graphic.interactiveGraphic)) return !1;
|
|
22057
|
-
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;
|
|
22058
|
-
return !1;
|
|
22059
|
-
}
|
|
22060
|
-
}]);
|
|
22061
|
-
return CommonDrawItemInterceptorContribution;
|
|
22062
|
-
}();
|
|
22063
|
-
CommonDrawItemInterceptorContribution = __decorate$1d([injectable(), __metadata$W("design:paramtypes", [])], CommonDrawItemInterceptorContribution);
|
|
22064
|
-
var InteractiveDrawItemInterceptorContribution = /*#__PURE__*/function () {
|
|
22065
|
-
function InteractiveDrawItemInterceptorContribution() {
|
|
22066
|
-
_classCallCheck(this, InteractiveDrawItemInterceptorContribution);
|
|
22067
|
-
this.order = 1;
|
|
22068
|
-
}
|
|
22069
|
-
_createClass(InteractiveDrawItemInterceptorContribution, [{
|
|
22070
|
-
key: "beforeDrawItem",
|
|
22071
|
-
value: function beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
22072
|
-
return !this.processing && (graphic.baseGraphic ? this.beforeDrawInteractive(graphic, renderService, drawContext, drawContribution, params) : this.beforeSetInteractive(graphic, renderService, drawContext, drawContribution, params));
|
|
22073
|
-
}
|
|
22074
|
-
}, {
|
|
22075
|
-
key: "beforeSetInteractive",
|
|
22076
|
-
value: function beforeSetInteractive(graphic, renderService, drawContext, drawContribution, params) {
|
|
22077
|
-
var interactiveGraphic = graphic.interactiveGraphic;
|
|
22078
|
-
if (graphic.attribute.globalZIndex) {
|
|
22079
|
-
interactiveGraphic || (interactiveGraphic = graphic.clone(), graphic.interactiveGraphic = interactiveGraphic, interactiveGraphic.baseGraphic = graphic), interactiveGraphic.setAttributes({
|
|
22080
|
-
globalZIndex: 0,
|
|
22081
|
-
zIndex: graphic.attribute.globalZIndex
|
|
22082
|
-
}, !1, {
|
|
22083
|
-
skipUpdateCallback: !0
|
|
22084
|
-
}), drawContext.stage.tryInitInteractiveLayer();
|
|
22085
|
-
var interactiveLayer = drawContext.stage.getLayer("_builtin_interactive");
|
|
22086
|
-
if (interactiveLayer) {
|
|
22087
|
-
this.getShadowRoot(interactiveLayer).add(interactiveGraphic);
|
|
22088
|
-
}
|
|
22089
|
-
return !0;
|
|
22090
|
-
}
|
|
22091
|
-
if (interactiveGraphic) {
|
|
22092
|
-
drawContext.stage.tryInitInteractiveLayer();
|
|
22093
|
-
var _interactiveLayer = drawContext.stage.getLayer("_builtin_interactive");
|
|
22094
|
-
if (_interactiveLayer) {
|
|
22095
|
-
this.getShadowRoot(_interactiveLayer).removeChild(interactiveGraphic);
|
|
22096
|
-
}
|
|
22097
|
-
graphic.interactiveGraphic = null, interactiveGraphic.baseGraphic = null;
|
|
22098
|
-
}
|
|
22099
|
-
return !1;
|
|
22100
|
-
}
|
|
22101
|
-
}, {
|
|
22102
|
-
key: "beforeDrawInteractive",
|
|
22103
|
-
value: function beforeDrawInteractive(graphic, renderService, drawContext, drawContribution, params) {
|
|
22104
|
-
var baseGraphic = graphic.baseGraphic;
|
|
22105
|
-
if (baseGraphic) {
|
|
22106
|
-
this.processing = !0;
|
|
22107
|
-
var context = drawContext.context;
|
|
22108
|
-
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;
|
|
22109
|
-
}
|
|
22110
|
-
return !1;
|
|
22111
|
-
}
|
|
22112
|
-
}, {
|
|
22113
|
-
key: "getShadowRoot",
|
|
22114
|
-
value: function getShadowRoot(interactiveLayer) {
|
|
22115
|
-
var _a;
|
|
22116
|
-
var group = interactiveLayer.getElementById("_interactive_group");
|
|
22117
|
-
return group || (group = graphicCreator.CreateGraphic("group", {}), group.id = "_interactive_group", interactiveLayer.add(group)), null !== (_a = group.shadowRoot) && void 0 !== _a ? _a : group.attachShadow();
|
|
22118
|
-
}
|
|
22119
|
-
}]);
|
|
22120
|
-
return InteractiveDrawItemInterceptorContribution;
|
|
22121
|
-
}();
|
|
22122
|
-
var Canvas3DDrawItemInterceptor = /*#__PURE__*/function () {
|
|
22123
|
-
function Canvas3DDrawItemInterceptor() {
|
|
22124
|
-
_classCallCheck(this, Canvas3DDrawItemInterceptor);
|
|
22125
|
-
this.order = 1;
|
|
22126
|
-
}
|
|
22127
|
-
_createClass(Canvas3DDrawItemInterceptor, [{
|
|
22128
|
-
key: "beforeDrawItem",
|
|
22129
|
-
value: function beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
22130
|
-
if (!graphic.in3dMode || drawContext.in3dInterceptor) return !1;
|
|
22131
|
-
drawContext.in3dInterceptor = !0;
|
|
22132
|
-
var _renderService$drawPa = renderService.drawParams,
|
|
22133
|
-
context = _renderService$drawPa.context,
|
|
22134
|
-
stage = _renderService$drawPa.stage;
|
|
22135
|
-
context.canvas;
|
|
22136
|
-
context.save(), this.initCanvasCtx(context), context.camera = stage.camera;
|
|
22137
|
-
var m = context.currentMatrix;
|
|
22138
|
-
m.a /= context.dpr, m.b /= context.dpr, m.c /= context.dpr, m.d /= context.dpr, m.e /= context.dpr, m.f /= context.dpr;
|
|
22139
|
-
var matrix = mat4Allocate.allocate();
|
|
22140
|
-
mat3Tomat4(matrix, m);
|
|
22141
|
-
var lastModelMatrix = context.modelMatrix;
|
|
22142
|
-
if (lastModelMatrix) {
|
|
22143
|
-
if (matrix) {
|
|
22144
|
-
var _m = mat4Allocate.allocate();
|
|
22145
|
-
context.modelMatrix = multiplyMat4Mat4(_m, lastModelMatrix, matrix);
|
|
22146
|
-
}
|
|
22147
|
-
} else context.modelMatrix = matrix;
|
|
22148
|
-
if (context.setTransform(1, 0, 0, 1, 0, 0, !0), graphic.isContainer) {
|
|
22149
|
-
var isPie = !1,
|
|
22150
|
-
is3d = !1;
|
|
22151
|
-
if (graphic.forEachChildren(function (c) {
|
|
22152
|
-
return isPie = c.numberType === ARC3D_NUMBER_TYPE, !isPie;
|
|
22153
|
-
}), graphic.forEachChildren(function (c) {
|
|
22154
|
-
return is3d = !!c.findFace, !is3d;
|
|
22155
|
-
}), isPie) {
|
|
22156
|
-
var children = graphic.getChildren(),
|
|
22157
|
-
sortedChildren = _toConsumableArray(children);
|
|
22158
|
-
sortedChildren.sort(function (a, b) {
|
|
22159
|
-
var _a, _b, _c, _d;
|
|
22160
|
-
var angle1 = ((null !== (_a = a.attribute.startAngle) && void 0 !== _a ? _a : 0) + (null !== (_b = a.attribute.endAngle) && void 0 !== _b ? _b : 0)) / 2,
|
|
22161
|
-
angle2 = ((null !== (_c = b.attribute.startAngle) && void 0 !== _c ? _c : 0) + (null !== (_d = b.attribute.endAngle) && void 0 !== _d ? _d : 0)) / 2;
|
|
22162
|
-
for (; angle1 < 0;) angle1 += pi2;
|
|
22163
|
-
for (; angle2 < 0;) angle2 += pi2;
|
|
22164
|
-
return angle2 - angle1;
|
|
22165
|
-
}), sortedChildren.forEach(function (c) {
|
|
22166
|
-
c._next = null, c._prev = null;
|
|
22167
|
-
}), graphic.removeAllChild(), graphic.update(), sortedChildren.forEach(function (c) {
|
|
22168
|
-
graphic.appendChild(c);
|
|
22169
|
-
});
|
|
22170
|
-
var _m2 = graphic.parent.globalTransMatrix;
|
|
22171
|
-
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) {
|
|
22172
|
-
c._next = null, c._prev = null;
|
|
22173
|
-
}), children.forEach(function (c) {
|
|
22174
|
-
graphic.appendChild(c);
|
|
22175
|
-
});
|
|
22176
|
-
} else if (is3d) {
|
|
22177
|
-
var _children = graphic.getChildren(),
|
|
22178
|
-
zChildren = _children.map(function (g) {
|
|
22179
|
-
return {
|
|
22180
|
-
ave_z: g.findFace().vertices.map(function (v) {
|
|
22181
|
-
var _a;
|
|
22182
|
-
return context.view(v[0], v[1], null !== (_a = v[2] + g.attribute.z) && void 0 !== _a ? _a : 0)[2];
|
|
22183
|
-
}).reduce(function (a, b) {
|
|
22184
|
-
return a + b;
|
|
22185
|
-
}, 0),
|
|
22186
|
-
g: g
|
|
22187
|
-
};
|
|
22188
|
-
});
|
|
22189
|
-
zChildren.sort(function (a, b) {
|
|
22190
|
-
return b.ave_z - a.ave_z;
|
|
22191
|
-
}), graphic.removeAllChild(), zChildren.forEach(function (i) {
|
|
22192
|
-
i.g._next = null, i.g._prev = null;
|
|
22193
|
-
}), graphic.update(), zChildren.forEach(function (i) {
|
|
22194
|
-
graphic.add(i.g);
|
|
22195
|
-
}), drawContribution.renderGroup(graphic, drawContext, graphic.parent.globalTransMatrix, !0), graphic.removeAllChild(), _children.forEach(function (g) {
|
|
22196
|
-
g._next = null, g._prev = null;
|
|
22197
|
-
}), graphic.update(), _children.forEach(function (g) {
|
|
22198
|
-
graphic.add(g);
|
|
22199
|
-
});
|
|
22200
|
-
} else drawContribution.renderGroup(graphic, drawContext, graphic.parent.globalTransMatrix);
|
|
22201
|
-
} else drawContribution.renderItem(graphic, drawContext);
|
|
22202
|
-
return context.camera = null, context.restore(), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, drawContext.in3dInterceptor = !1, !0;
|
|
22203
|
-
}
|
|
22204
|
-
}, {
|
|
22205
|
-
key: "initCanvasCtx",
|
|
22206
|
-
value: function initCanvasCtx(context) {
|
|
22207
|
-
context.setTransformForCurrent();
|
|
22208
|
-
}
|
|
22209
|
-
}]);
|
|
22210
|
-
return Canvas3DDrawItemInterceptor;
|
|
22211
|
-
}();
|
|
22212
|
-
|
|
22213
22216
|
var __decorate$1c = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
22214
22217
|
var d,
|
|
22215
22218
|
c = arguments.length,
|
|
@@ -23043,7 +23046,7 @@
|
|
|
23043
23046
|
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);
|
|
23044
23047
|
|
|
23045
23048
|
var renderModule = new ContainerModule(function (bind) {
|
|
23046
|
-
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);
|
|
23049
|
+
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);
|
|
23047
23050
|
});
|
|
23048
23051
|
|
|
23049
23052
|
function load(container) {
|
|
@@ -34845,7 +34848,7 @@
|
|
|
34845
34848
|
|
|
34846
34849
|
var roughModule = _roughModule;
|
|
34847
34850
|
|
|
34848
|
-
const version = "0.17.18-alpha.
|
|
34851
|
+
const version = "0.17.18-alpha.1";
|
|
34849
34852
|
preLoadAllModule();
|
|
34850
34853
|
if (isBrowserEnv()) {
|
|
34851
34854
|
loadBrowserEnv(container);
|
|
@@ -34896,6 +34899,7 @@
|
|
|
34896
34899
|
exports.BoundsContext = BoundsContext;
|
|
34897
34900
|
exports.BoundsPicker = BoundsPicker;
|
|
34898
34901
|
exports.CIRCLE_NUMBER_TYPE = CIRCLE_NUMBER_TYPE;
|
|
34902
|
+
exports.Canvas3DDrawItemInterceptor = Canvas3DDrawItemInterceptor;
|
|
34899
34903
|
exports.CanvasFactory = CanvasFactory;
|
|
34900
34904
|
exports.CanvasTextLayout = CanvasTextLayout;
|
|
34901
34905
|
exports.CbAnimate = CbAnimate;
|
|
@@ -34917,6 +34921,7 @@
|
|
|
34917
34921
|
exports.CustomEvent = CustomEvent;
|
|
34918
34922
|
exports.CustomPath2D = CustomPath2D;
|
|
34919
34923
|
exports.CustomSymbolClass = CustomSymbolClass;
|
|
34924
|
+
exports.DebugDrawItemInterceptorContribution = DebugDrawItemInterceptorContribution;
|
|
34920
34925
|
exports.DefaultArcAllocate = DefaultArcAllocate;
|
|
34921
34926
|
exports.DefaultArcAttribute = DefaultArcAttribute;
|
|
34922
34927
|
exports.DefaultArcRenderContribution = DefaultArcRenderContribution;
|
|
@@ -34970,6 +34975,7 @@
|
|
|
34970
34975
|
exports.DefaultTransform = DefaultTransform;
|
|
34971
34976
|
exports.DragNDrop = DragNDrop;
|
|
34972
34977
|
exports.DrawContribution = DrawContribution;
|
|
34978
|
+
exports.DrawItemInterceptor = DrawItemInterceptor;
|
|
34973
34979
|
exports.DynamicLayerHandlerContribution = DynamicLayerHandlerContribution;
|
|
34974
34980
|
exports.EnvContribution = EnvContribution;
|
|
34975
34981
|
exports.EventManager = EventManager;
|
|
@@ -35008,6 +35014,7 @@
|
|
|
35008
35014
|
exports.IncreaseCount = IncreaseCount;
|
|
35009
35015
|
exports.IncrementalDrawContribution = IncrementalDrawContribution;
|
|
35010
35016
|
exports.InputText = InputText;
|
|
35017
|
+
exports.InteractiveDrawItemInterceptorContribution = InteractiveDrawItemInterceptorContribution;
|
|
35011
35018
|
exports.InteractiveSubRenderContribution = InteractiveSubRenderContribution;
|
|
35012
35019
|
exports.LINE_NUMBER_TYPE = LINE_NUMBER_TYPE;
|
|
35013
35020
|
exports.Layer = Layer;
|
|
@@ -35069,6 +35076,7 @@
|
|
|
35069
35076
|
exports.SYMBOL_NUMBER_TYPE = SYMBOL_NUMBER_TYPE;
|
|
35070
35077
|
exports.SegContext = SegContext;
|
|
35071
35078
|
exports.ShadowRoot = ShadowRoot;
|
|
35079
|
+
exports.ShadowRootDrawItemInterceptorContribution = ShadowRootDrawItemInterceptorContribution;
|
|
35072
35080
|
exports.Stage = Stage;
|
|
35073
35081
|
exports.StaticLayerHandlerContribution = StaticLayerHandlerContribution;
|
|
35074
35082
|
exports.Step = Step$1;
|