@visactor/vrender 0.19.20-alpha.2 → 0.19.20-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.es.js +125 -125
- package/dist/index.js +125 -125
- 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 +3 -3
package/dist/index.js
CHANGED
|
@@ -17237,6 +17237,100 @@
|
|
|
17237
17237
|
decorator(target, key, paramIndex);
|
|
17238
17238
|
};
|
|
17239
17239
|
};
|
|
17240
|
+
exports.DefaultCanvasGroupRender = class DefaultCanvasGroupRender {
|
|
17241
|
+
constructor(groupRenderContribitions) {
|
|
17242
|
+
this.groupRenderContribitions = groupRenderContribitions, this.numberType = GROUP_NUMBER_TYPE;
|
|
17243
|
+
}
|
|
17244
|
+
drawShape(group, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
17245
|
+
const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
|
|
17246
|
+
{
|
|
17247
|
+
fill = groupAttribute.fill,
|
|
17248
|
+
background: background,
|
|
17249
|
+
stroke = groupAttribute.stroke,
|
|
17250
|
+
opacity = groupAttribute.opacity,
|
|
17251
|
+
width = groupAttribute.width,
|
|
17252
|
+
height = groupAttribute.height,
|
|
17253
|
+
clip = groupAttribute.clip,
|
|
17254
|
+
fillOpacity = groupAttribute.fillOpacity,
|
|
17255
|
+
strokeOpacity = groupAttribute.strokeOpacity,
|
|
17256
|
+
cornerRadius = groupAttribute.cornerRadius,
|
|
17257
|
+
path = groupAttribute.path,
|
|
17258
|
+
lineWidth = groupAttribute.lineWidth,
|
|
17259
|
+
visible = groupAttribute.visible
|
|
17260
|
+
} = group.attribute,
|
|
17261
|
+
fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
|
|
17262
|
+
sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
|
|
17263
|
+
doFill = runFill(fill, background),
|
|
17264
|
+
doStroke = runStroke(stroke, lineWidth);
|
|
17265
|
+
if (!group.valid || !visible) return;
|
|
17266
|
+
if (!clip) {
|
|
17267
|
+
if (!doFill && !doStroke) return;
|
|
17268
|
+
if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
|
|
17269
|
+
}
|
|
17270
|
+
if (path && path.length && drawContext.drawContribution) {
|
|
17271
|
+
const disableFill = context.disableFill,
|
|
17272
|
+
disableStroke = context.disableStroke,
|
|
17273
|
+
disableBeginPath = context.disableBeginPath;
|
|
17274
|
+
context.disableFill = !0, context.disableStroke = !0, context.disableBeginPath = !0, path.forEach(g => {
|
|
17275
|
+
drawContext.drawContribution.getRenderContribution(g).draw(g, drawContext.renderService, drawContext, params);
|
|
17276
|
+
}), context.disableFill = disableFill, context.disableStroke = disableStroke, context.disableBeginPath = disableBeginPath;
|
|
17277
|
+
} else 0 === cornerRadius || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius));
|
|
17278
|
+
this._groupRenderContribitions || (this._groupRenderContribitions = this.groupRenderContribitions.getContributions() || [], this._groupRenderContribitions.push(defaultGroupBackgroundRenderContribution));
|
|
17279
|
+
const doFillOrStroke = {
|
|
17280
|
+
doFill: doFill,
|
|
17281
|
+
doStroke: doStroke
|
|
17282
|
+
};
|
|
17283
|
+
this._groupRenderContribitions.forEach(c => {
|
|
17284
|
+
c.time === exports.BaseRenderContributionTime.beforeFillStroke && c.drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke);
|
|
17285
|
+
}), clip && context.clip(), context.setShadowBlendStyle && context.setShadowBlendStyle(group, group.attribute, groupAttribute), doFillOrStroke.doFill && (fillCb ? fillCb(context, group.attribute, groupAttribute) : fVisible && (context.setCommonStyle(group, group.attribute, x, y, groupAttribute), context.fill())), doFillOrStroke.doStroke && (strokeCb ? strokeCb(context, group.attribute, groupAttribute) : sVisible && (context.setStrokeStyle(group, group.attribute, x, y, groupAttribute), context.stroke())), this._groupRenderContribitions.forEach(c => {
|
|
17286
|
+
c.time === exports.BaseRenderContributionTime.afterFillStroke && c.drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb);
|
|
17287
|
+
});
|
|
17288
|
+
}
|
|
17289
|
+
draw(group, renderService, drawContext, params) {
|
|
17290
|
+
const {
|
|
17291
|
+
context: context
|
|
17292
|
+
} = drawContext;
|
|
17293
|
+
if (!context) return;
|
|
17294
|
+
const {
|
|
17295
|
+
clip: clip,
|
|
17296
|
+
baseOpacity = 1
|
|
17297
|
+
} = group.attribute;
|
|
17298
|
+
clip ? context.save() : context.highPerformanceSave(), context.baseGlobalAlpha *= baseOpacity;
|
|
17299
|
+
const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
|
|
17300
|
+
lastModelMatrix = context.modelMatrix;
|
|
17301
|
+
if (context.camera) {
|
|
17302
|
+
const nextModelMatrix = mat4Allocate.allocate(),
|
|
17303
|
+
modelMatrix = mat4Allocate.allocate();
|
|
17304
|
+
getModelMatrix(modelMatrix, group, groupAttribute), multiplyMat4Mat4(nextModelMatrix, lastModelMatrix || nextModelMatrix, modelMatrix), context.modelMatrix = nextModelMatrix, mat4Allocate.free(modelMatrix), context.setTransform(1, 0, 0, 1, 0, 0, !0);
|
|
17305
|
+
} else context.transformFromMatrix(group.transMatrix, !0);
|
|
17306
|
+
context.beginPath(), params.skipDraw ? this.drawShape(group, context, 0, 0, drawContext, params, () => !1, () => !1) : this.drawShape(group, context, 0, 0, drawContext);
|
|
17307
|
+
const {
|
|
17308
|
+
scrollX = groupAttribute.scrollX,
|
|
17309
|
+
scrollY = groupAttribute.scrollY
|
|
17310
|
+
} = group.attribute;
|
|
17311
|
+
let p;
|
|
17312
|
+
(scrollX || scrollY) && context.translate(scrollX, scrollY), params && params.drawingCb && (p = params.drawingCb()), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, context.baseGlobalAlpha /= baseOpacity, p && p.then ? p.then(() => {
|
|
17313
|
+
clip ? context.restore() : context.highPerformanceRestore();
|
|
17314
|
+
}) : clip ? context.restore() : context.highPerformanceRestore();
|
|
17315
|
+
}
|
|
17316
|
+
};
|
|
17317
|
+
exports.DefaultCanvasGroupRender = __decorate$1s([injectable(), __param$H(0, inject(ContributionProvider)), __param$H(0, named(GroupRenderContribution)), __metadata$16("design:paramtypes", [Object])], exports.DefaultCanvasGroupRender);
|
|
17318
|
+
|
|
17319
|
+
var __decorate$1r = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17320
|
+
var d,
|
|
17321
|
+
c = arguments.length,
|
|
17322
|
+
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
17323
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
17324
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17325
|
+
},
|
|
17326
|
+
__metadata$15 = undefined && undefined.__metadata || function (k, v) {
|
|
17327
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
17328
|
+
},
|
|
17329
|
+
__param$G = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
17330
|
+
return function (target, key) {
|
|
17331
|
+
decorator(target, key, paramIndex);
|
|
17332
|
+
};
|
|
17333
|
+
};
|
|
17240
17334
|
const repeatStr = ["", "repeat-x", "repeat-y", "repeat"];
|
|
17241
17335
|
exports.DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender {
|
|
17242
17336
|
constructor(imageRenderContribitions) {
|
|
@@ -17293,7 +17387,7 @@
|
|
|
17293
17387
|
this._draw(image, imageAttribute, !1, drawContext);
|
|
17294
17388
|
}
|
|
17295
17389
|
};
|
|
17296
|
-
exports.DefaultCanvasImageRender = __decorate$
|
|
17390
|
+
exports.DefaultCanvasImageRender = __decorate$1r([injectable(), __param$G(0, inject(ContributionProvider)), __param$G(0, named(ImageRenderContribution)), __metadata$15("design:paramtypes", [Object])], exports.DefaultCanvasImageRender);
|
|
17297
17391
|
|
|
17298
17392
|
const IncrementalDrawContribution = Symbol.for("IncrementalDrawContribution");
|
|
17299
17393
|
const ArcRender = Symbol.for("ArcRender");
|
|
@@ -17316,14 +17410,14 @@
|
|
|
17316
17410
|
const RenderSelector = Symbol.for("RenderSelector");
|
|
17317
17411
|
const DrawContribution = Symbol.for("DrawContribution");
|
|
17318
17412
|
|
|
17319
|
-
var __decorate$
|
|
17413
|
+
var __decorate$1q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17320
17414
|
var d,
|
|
17321
17415
|
c = arguments.length,
|
|
17322
17416
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
17323
17417
|
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
17324
17418
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17325
17419
|
},
|
|
17326
|
-
__metadata$
|
|
17420
|
+
__metadata$14 = undefined && undefined.__metadata || function (k, v) {
|
|
17327
17421
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
17328
17422
|
};
|
|
17329
17423
|
const DrawItemInterceptor = Symbol.for("DrawItemInterceptor");
|
|
@@ -17383,7 +17477,7 @@
|
|
|
17383
17477
|
return !1;
|
|
17384
17478
|
}
|
|
17385
17479
|
};
|
|
17386
|
-
exports.CommonDrawItemInterceptorContribution = __decorate$
|
|
17480
|
+
exports.CommonDrawItemInterceptorContribution = __decorate$1q([injectable(), __metadata$14("design:paramtypes", [])], exports.CommonDrawItemInterceptorContribution);
|
|
17387
17481
|
class InteractiveDrawItemInterceptorContribution {
|
|
17388
17482
|
constructor() {
|
|
17389
17483
|
this.order = 1;
|
|
@@ -17515,17 +17609,17 @@
|
|
|
17515
17609
|
}
|
|
17516
17610
|
}
|
|
17517
17611
|
|
|
17518
|
-
var __decorate$
|
|
17612
|
+
var __decorate$1p = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17519
17613
|
var d,
|
|
17520
17614
|
c = arguments.length,
|
|
17521
17615
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
17522
17616
|
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
17523
17617
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17524
17618
|
},
|
|
17525
|
-
__metadata$
|
|
17619
|
+
__metadata$13 = undefined && undefined.__metadata || function (k, v) {
|
|
17526
17620
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
17527
17621
|
},
|
|
17528
|
-
__param$
|
|
17622
|
+
__param$F = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
17529
17623
|
return function (target, key) {
|
|
17530
17624
|
decorator(target, key, paramIndex);
|
|
17531
17625
|
};
|
|
@@ -17563,7 +17657,7 @@
|
|
|
17563
17657
|
this.prepare(updateBounds), this.prepareRenderList(), this.beforeDraw(params), this.draw(params), this.afterDraw(params), this.drawParams = null;
|
|
17564
17658
|
}
|
|
17565
17659
|
};
|
|
17566
|
-
exports.DefaultRenderService = __decorate$
|
|
17660
|
+
exports.DefaultRenderService = __decorate$1p([injectable(), __param$F(0, inject(DrawContribution)), __metadata$13("design:paramtypes", [Object])], exports.DefaultRenderService);
|
|
17567
17661
|
|
|
17568
17662
|
var renderModule$1 = new ContainerModule(bind => {
|
|
17569
17663
|
bind(RenderService).to(exports.DefaultRenderService);
|
|
@@ -17574,7 +17668,7 @@
|
|
|
17574
17668
|
const BoundsPicker = Symbol.for("BoundsPicker");
|
|
17575
17669
|
const GlobalPickerService = Symbol.for("GlobalPickerService");
|
|
17576
17670
|
|
|
17577
|
-
var __decorate$
|
|
17671
|
+
var __decorate$1o = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17578
17672
|
var d,
|
|
17579
17673
|
c = arguments.length,
|
|
17580
17674
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -17607,7 +17701,7 @@
|
|
|
17607
17701
|
return context.highPerformanceRestore(), result;
|
|
17608
17702
|
}
|
|
17609
17703
|
};
|
|
17610
|
-
exports.ShadowRootPickItemInterceptorContribution = __decorate$
|
|
17704
|
+
exports.ShadowRootPickItemInterceptorContribution = __decorate$1o([injectable()], exports.ShadowRootPickItemInterceptorContribution);
|
|
17611
17705
|
exports.InteractivePickItemInterceptorContribution = class InteractivePickItemInterceptorContribution {
|
|
17612
17706
|
constructor() {
|
|
17613
17707
|
this.order = 1;
|
|
@@ -17626,7 +17720,7 @@
|
|
|
17626
17720
|
return null;
|
|
17627
17721
|
}
|
|
17628
17722
|
};
|
|
17629
|
-
exports.InteractivePickItemInterceptorContribution = __decorate$
|
|
17723
|
+
exports.InteractivePickItemInterceptorContribution = __decorate$1o([injectable()], exports.InteractivePickItemInterceptorContribution);
|
|
17630
17724
|
exports.Canvas3DPickItemInterceptor = class Canvas3DPickItemInterceptor {
|
|
17631
17725
|
constructor() {
|
|
17632
17726
|
this.order = 1;
|
|
@@ -17686,7 +17780,7 @@
|
|
|
17686
17780
|
context.setTransformForCurrent();
|
|
17687
17781
|
}
|
|
17688
17782
|
};
|
|
17689
|
-
exports.Canvas3DPickItemInterceptor = __decorate$
|
|
17783
|
+
exports.Canvas3DPickItemInterceptor = __decorate$1o([injectable()], exports.Canvas3DPickItemInterceptor);
|
|
17690
17784
|
|
|
17691
17785
|
var pickModule = new ContainerModule((bind, unbind, isBound) => {
|
|
17692
17786
|
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);
|
|
@@ -17699,17 +17793,17 @@
|
|
|
17699
17793
|
const AutoEnablePlugins = Symbol.for("AutoEnablePlugins");
|
|
17700
17794
|
const PluginService = Symbol.for("PluginService");
|
|
17701
17795
|
|
|
17702
|
-
var __decorate$
|
|
17796
|
+
var __decorate$1n = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17703
17797
|
var d,
|
|
17704
17798
|
c = arguments.length,
|
|
17705
17799
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
17706
17800
|
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
17707
17801
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17708
17802
|
},
|
|
17709
|
-
__metadata$
|
|
17803
|
+
__metadata$12 = undefined && undefined.__metadata || function (k, v) {
|
|
17710
17804
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
17711
17805
|
},
|
|
17712
|
-
__param$
|
|
17806
|
+
__param$E = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
17713
17807
|
return function (target, key) {
|
|
17714
17808
|
decorator(target, key, paramIndex);
|
|
17715
17809
|
};
|
|
@@ -17749,7 +17843,7 @@
|
|
|
17749
17843
|
}), this.onRegisterPlugin = [];
|
|
17750
17844
|
}
|
|
17751
17845
|
};
|
|
17752
|
-
DefaultPluginService = __decorate$
|
|
17846
|
+
DefaultPluginService = __decorate$1n([injectable(), __param$E(0, inject(ContributionProvider)), __param$E(0, named(AutoEnablePlugins)), __metadata$12("design:paramtypes", [Object])], DefaultPluginService);
|
|
17753
17847
|
|
|
17754
17848
|
var pluginModule = new ContainerModule(bind => {
|
|
17755
17849
|
bind(PluginService).to(DefaultPluginService), bindContributionProviderNoSingletonScope(bind, AutoEnablePlugins);
|
|
@@ -17763,14 +17857,14 @@
|
|
|
17763
17857
|
bind(TextMeasureContribution).to(exports.DefaultTextMeasureContribution).inSingletonScope(), bindContributionProvider(bind, TextMeasureContribution);
|
|
17764
17858
|
});
|
|
17765
17859
|
|
|
17766
|
-
var __decorate$
|
|
17860
|
+
var __decorate$1m = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17767
17861
|
var d,
|
|
17768
17862
|
c = arguments.length,
|
|
17769
17863
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
17770
17864
|
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
17771
17865
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17772
17866
|
},
|
|
17773
|
-
__metadata$
|
|
17867
|
+
__metadata$11 = undefined && undefined.__metadata || function (k, v) {
|
|
17774
17868
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
17775
17869
|
};
|
|
17776
17870
|
let CanvasLayerHandlerContribution = class {
|
|
@@ -17840,16 +17934,16 @@
|
|
|
17840
17934
|
this.canvas.release();
|
|
17841
17935
|
}
|
|
17842
17936
|
};
|
|
17843
|
-
CanvasLayerHandlerContribution = __decorate$
|
|
17937
|
+
CanvasLayerHandlerContribution = __decorate$1m([injectable(), __metadata$11("design:paramtypes", [])], CanvasLayerHandlerContribution);
|
|
17844
17938
|
|
|
17845
|
-
var __decorate$
|
|
17939
|
+
var __decorate$1l = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17846
17940
|
var d,
|
|
17847
17941
|
c = arguments.length,
|
|
17848
17942
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
17849
17943
|
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
17850
17944
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17851
17945
|
},
|
|
17852
|
-
__metadata$
|
|
17946
|
+
__metadata$10 = undefined && undefined.__metadata || function (k, v) {
|
|
17853
17947
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
17854
17948
|
};
|
|
17855
17949
|
let EmptyLayerHandlerContribution = class {
|
|
@@ -17884,16 +17978,16 @@
|
|
|
17884
17978
|
}
|
|
17885
17979
|
release() {}
|
|
17886
17980
|
};
|
|
17887
|
-
EmptyLayerHandlerContribution = __decorate$
|
|
17981
|
+
EmptyLayerHandlerContribution = __decorate$1l([injectable(), __metadata$10("design:paramtypes", [])], EmptyLayerHandlerContribution);
|
|
17888
17982
|
|
|
17889
|
-
var __decorate$
|
|
17983
|
+
var __decorate$1k = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17890
17984
|
var d,
|
|
17891
17985
|
c = arguments.length,
|
|
17892
17986
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
17893
17987
|
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
17894
17988
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17895
17989
|
},
|
|
17896
|
-
__metadata
|
|
17990
|
+
__metadata$$ = undefined && undefined.__metadata || function (k, v) {
|
|
17897
17991
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
17898
17992
|
};
|
|
17899
17993
|
let OffscreenLayerHandlerContribution = class {
|
|
@@ -17956,7 +18050,7 @@
|
|
|
17956
18050
|
}
|
|
17957
18051
|
merge(layerHandlers) {}
|
|
17958
18052
|
};
|
|
17959
|
-
OffscreenLayerHandlerContribution = __decorate$
|
|
18053
|
+
OffscreenLayerHandlerContribution = __decorate$1k([injectable(), __metadata$$("design:paramtypes", [])], OffscreenLayerHandlerContribution);
|
|
17960
18054
|
|
|
17961
18055
|
var layerHandlerModules = new ContainerModule(bind => {
|
|
17962
18056
|
bind(CanvasLayerHandlerContribution).toSelf(), bind(OffscreenLayerHandlerContribution).toSelf(), bind(EmptyLayerHandlerContribution).toSelf(), bind(StaticLayerHandlerContribution).toService(CanvasLayerHandlerContribution), bind(DynamicLayerHandlerContribution).toService(OffscreenLayerHandlerContribution), bind(VirtualLayerHandlerContribution).toService(EmptyLayerHandlerContribution);
|
|
@@ -18072,17 +18166,17 @@
|
|
|
18072
18166
|
return result;
|
|
18073
18167
|
}
|
|
18074
18168
|
|
|
18075
|
-
var __decorate$
|
|
18169
|
+
var __decorate$1j = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
18076
18170
|
var d,
|
|
18077
18171
|
c = arguments.length,
|
|
18078
18172
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
18079
18173
|
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
18080
18174
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
18081
18175
|
},
|
|
18082
|
-
__metadata
|
|
18176
|
+
__metadata$_ = undefined && undefined.__metadata || function (k, v) {
|
|
18083
18177
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
18084
18178
|
},
|
|
18085
|
-
__param$
|
|
18179
|
+
__param$D = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
18086
18180
|
return function (target, key) {
|
|
18087
18181
|
decorator(target, key, paramIndex);
|
|
18088
18182
|
};
|
|
@@ -18269,101 +18363,7 @@
|
|
|
18269
18363
|
}
|
|
18270
18364
|
afterDraw(renderService, drawParams) {}
|
|
18271
18365
|
};
|
|
18272
|
-
DefaultDrawContribution = __decorate$
|
|
18273
|
-
|
|
18274
|
-
var __decorate$1j = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
18275
|
-
var d,
|
|
18276
|
-
c = arguments.length,
|
|
18277
|
-
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
18278
|
-
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
18279
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
18280
|
-
},
|
|
18281
|
-
__metadata$_ = undefined && undefined.__metadata || function (k, v) {
|
|
18282
|
-
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
18283
|
-
},
|
|
18284
|
-
__param$D = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
18285
|
-
return function (target, key) {
|
|
18286
|
-
decorator(target, key, paramIndex);
|
|
18287
|
-
};
|
|
18288
|
-
};
|
|
18289
|
-
let DefaultCanvasGroupRender = class {
|
|
18290
|
-
constructor(groupRenderContribitions) {
|
|
18291
|
-
this.groupRenderContribitions = groupRenderContribitions, this.numberType = GROUP_NUMBER_TYPE;
|
|
18292
|
-
}
|
|
18293
|
-
drawShape(group, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
18294
|
-
const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
|
|
18295
|
-
{
|
|
18296
|
-
fill = groupAttribute.fill,
|
|
18297
|
-
background: background,
|
|
18298
|
-
stroke = groupAttribute.stroke,
|
|
18299
|
-
opacity = groupAttribute.opacity,
|
|
18300
|
-
width = groupAttribute.width,
|
|
18301
|
-
height = groupAttribute.height,
|
|
18302
|
-
clip = groupAttribute.clip,
|
|
18303
|
-
fillOpacity = groupAttribute.fillOpacity,
|
|
18304
|
-
strokeOpacity = groupAttribute.strokeOpacity,
|
|
18305
|
-
cornerRadius = groupAttribute.cornerRadius,
|
|
18306
|
-
path = groupAttribute.path,
|
|
18307
|
-
lineWidth = groupAttribute.lineWidth,
|
|
18308
|
-
visible = groupAttribute.visible
|
|
18309
|
-
} = group.attribute,
|
|
18310
|
-
fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
|
|
18311
|
-
sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
|
|
18312
|
-
doFill = runFill(fill, background),
|
|
18313
|
-
doStroke = runStroke(stroke, lineWidth);
|
|
18314
|
-
if (!group.valid || !visible) return;
|
|
18315
|
-
if (!clip) {
|
|
18316
|
-
if (!doFill && !doStroke) return;
|
|
18317
|
-
if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
|
|
18318
|
-
}
|
|
18319
|
-
if (path && path.length && drawContext.drawContribution) {
|
|
18320
|
-
const disableFill = context.disableFill,
|
|
18321
|
-
disableStroke = context.disableStroke,
|
|
18322
|
-
disableBeginPath = context.disableBeginPath;
|
|
18323
|
-
context.disableFill = !0, context.disableStroke = !0, context.disableBeginPath = !0, path.forEach(g => {
|
|
18324
|
-
drawContext.drawContribution.getRenderContribution(g).draw(g, drawContext.renderService, drawContext, params);
|
|
18325
|
-
}), context.disableFill = disableFill, context.disableStroke = disableStroke, context.disableBeginPath = disableBeginPath;
|
|
18326
|
-
} else 0 === cornerRadius || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius));
|
|
18327
|
-
this._groupRenderContribitions || (this._groupRenderContribitions = this.groupRenderContribitions.getContributions() || [], this._groupRenderContribitions.push(defaultGroupBackgroundRenderContribution));
|
|
18328
|
-
const doFillOrStroke = {
|
|
18329
|
-
doFill: doFill,
|
|
18330
|
-
doStroke: doStroke
|
|
18331
|
-
};
|
|
18332
|
-
this._groupRenderContribitions.forEach(c => {
|
|
18333
|
-
c.time === exports.BaseRenderContributionTime.beforeFillStroke && c.drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke);
|
|
18334
|
-
}), clip && context.clip(), context.setShadowBlendStyle && context.setShadowBlendStyle(group, group.attribute, groupAttribute), doFillOrStroke.doFill && (fillCb ? fillCb(context, group.attribute, groupAttribute) : fVisible && (context.setCommonStyle(group, group.attribute, x, y, groupAttribute), context.fill())), doFillOrStroke.doStroke && (strokeCb ? strokeCb(context, group.attribute, groupAttribute) : sVisible && (context.setStrokeStyle(group, group.attribute, x, y, groupAttribute), context.stroke())), this._groupRenderContribitions.forEach(c => {
|
|
18335
|
-
c.time === exports.BaseRenderContributionTime.afterFillStroke && c.drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb);
|
|
18336
|
-
});
|
|
18337
|
-
}
|
|
18338
|
-
draw(group, renderService, drawContext, params) {
|
|
18339
|
-
const {
|
|
18340
|
-
context: context
|
|
18341
|
-
} = drawContext;
|
|
18342
|
-
if (!context) return;
|
|
18343
|
-
const {
|
|
18344
|
-
clip: clip,
|
|
18345
|
-
baseOpacity = 1
|
|
18346
|
-
} = group.attribute;
|
|
18347
|
-
clip ? context.save() : context.highPerformanceSave(), context.baseGlobalAlpha *= baseOpacity;
|
|
18348
|
-
const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
|
|
18349
|
-
lastModelMatrix = context.modelMatrix;
|
|
18350
|
-
if (context.camera) {
|
|
18351
|
-
const nextModelMatrix = mat4Allocate.allocate(),
|
|
18352
|
-
modelMatrix = mat4Allocate.allocate();
|
|
18353
|
-
getModelMatrix(modelMatrix, group, groupAttribute), multiplyMat4Mat4(nextModelMatrix, lastModelMatrix || nextModelMatrix, modelMatrix), context.modelMatrix = nextModelMatrix, mat4Allocate.free(modelMatrix), context.setTransform(1, 0, 0, 1, 0, 0, !0);
|
|
18354
|
-
} else context.transformFromMatrix(group.transMatrix, !0);
|
|
18355
|
-
context.beginPath(), params.skipDraw ? this.drawShape(group, context, 0, 0, drawContext, params, () => !1, () => !1) : this.drawShape(group, context, 0, 0, drawContext);
|
|
18356
|
-
const {
|
|
18357
|
-
scrollX = groupAttribute.scrollX,
|
|
18358
|
-
scrollY = groupAttribute.scrollY
|
|
18359
|
-
} = group.attribute;
|
|
18360
|
-
let p;
|
|
18361
|
-
(scrollX || scrollY) && context.translate(scrollX, scrollY), params && params.drawingCb && (p = params.drawingCb()), context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix, context.baseGlobalAlpha /= baseOpacity, p && p.then ? p.then(() => {
|
|
18362
|
-
clip ? context.restore() : context.highPerformanceRestore();
|
|
18363
|
-
}) : clip ? context.restore() : context.highPerformanceRestore();
|
|
18364
|
-
}
|
|
18365
|
-
};
|
|
18366
|
-
DefaultCanvasGroupRender = __decorate$1j([injectable(), __param$D(0, inject(ContributionProvider)), __param$D(0, named(GroupRenderContribution)), __metadata$_("design:paramtypes", [Object])], DefaultCanvasGroupRender);
|
|
18366
|
+
DefaultDrawContribution = __decorate$1j([injectable(), __param$D(0, multiInject(GraphicRender)), __param$D(1, inject(ContributionProvider)), __param$D(1, named(DrawItemInterceptor)), __metadata$_("design:paramtypes", [Array, Object])], DefaultDrawContribution);
|
|
18367
18367
|
|
|
18368
18368
|
var __decorate$1i = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
18369
18369
|
var d,
|
|
@@ -18607,7 +18607,7 @@
|
|
|
18607
18607
|
DefaultIncrementalDrawContribution = __decorate$1g([injectable(), __param$C(0, multiInject(GraphicRender)), __param$C(1, inject(DefaultIncrementalCanvasLineRender)), __param$C(2, inject(DefaultIncrementalCanvasAreaRender)), __param$C(3, inject(ContributionProvider)), __param$C(3, named(DrawItemInterceptor)), __metadata$Z("design:paramtypes", [Array, Object, Object, Object])], DefaultIncrementalDrawContribution);
|
|
18608
18608
|
|
|
18609
18609
|
var renderModule = new ContainerModule(bind => {
|
|
18610
|
-
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);
|
|
18610
|
+
bind(DefaultBaseBackgroundRenderContribution).toSelf().inSingletonScope(), bind(DefaultBaseTextureRenderContribution).toSelf().inSingletonScope(), bind(DrawContribution).to(DefaultDrawContribution), bind(IncrementalDrawContribution).to(DefaultIncrementalDrawContribution), bind(GroupRender).to(exports.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);
|
|
18611
18611
|
});
|
|
18612
18612
|
|
|
18613
18613
|
function load(container) {
|
|
@@ -29298,7 +29298,7 @@
|
|
|
29298
29298
|
|
|
29299
29299
|
const roughModule = _roughModule;
|
|
29300
29300
|
|
|
29301
|
-
const version = "0.19.20-alpha.
|
|
29301
|
+
const version = "0.19.20-alpha.3";
|
|
29302
29302
|
preLoadAllModule();
|
|
29303
29303
|
if (isBrowserEnv()) {
|
|
29304
29304
|
loadBrowserEnv(container);
|