@visactor/vrender 0.19.21 → 0.19.22
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 +145 -133
- package/dist/index.js +145 -133
- 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
|
@@ -5849,13 +5849,23 @@
|
|
|
5849
5849
|
}
|
|
5850
5850
|
}
|
|
5851
5851
|
preventDefault() {
|
|
5852
|
-
|
|
5852
|
+
try {
|
|
5853
|
+
this.nativeEvent instanceof Event && this.nativeEvent.cancelable && this.nativeEvent.preventDefault();
|
|
5854
|
+
} catch (err) {
|
|
5855
|
+
this.nativeEvent.preventDefault && isFunction$1(this.nativeEvent.preventDefault) && this.nativeEvent.preventDefault();
|
|
5856
|
+
}
|
|
5857
|
+
this.defaultPrevented = !0;
|
|
5853
5858
|
}
|
|
5854
5859
|
stopImmediatePropagation() {
|
|
5855
5860
|
this.propagationImmediatelyStopped = !0;
|
|
5856
5861
|
}
|
|
5857
5862
|
stopPropagation() {
|
|
5858
|
-
|
|
5863
|
+
try {
|
|
5864
|
+
this.nativeEvent instanceof Event && this.nativeEvent.cancelable && this.nativeEvent.stopPropagation();
|
|
5865
|
+
} catch (err) {
|
|
5866
|
+
this.nativeEvent.stopPropagation && isFunction$1(this.nativeEvent.stopPropagation) && this.nativeEvent.stopPropagation();
|
|
5867
|
+
}
|
|
5868
|
+
this.propagationStopped = !0;
|
|
5859
5869
|
}
|
|
5860
5870
|
initEvent() {}
|
|
5861
5871
|
initUIEvent() {}
|
|
@@ -10971,13 +10981,14 @@
|
|
|
10971
10981
|
return "middle" === baseline ? -lineHeight / 2 : "top" === baseline ? 0 : "bottom" === baseline ? buf - lineHeight : baseline && "alphabetic" !== baseline ? 0 : (fontSize || (fontSize = lineHeight), -(lineHeight - fontSize) / 2 - .79 * fontSize);
|
|
10972
10982
|
}
|
|
10973
10983
|
function textAttributesToStyle(attrs) {
|
|
10974
|
-
const style = {}
|
|
10984
|
+
const style = {},
|
|
10985
|
+
parsePxValue = value => /^\d+(\.\d+)?$/.test(`${value}`) ? `${value}px` : `${value}`;
|
|
10975
10986
|
return ["textAlign", "fontFamily", "fontVariant", "fontStyle", "fontWeight"].forEach(key => {
|
|
10976
10987
|
attrs[key] && (style[lowerCamelCaseToMiddle(key)] = attrs[key]);
|
|
10977
10988
|
}), ["fontSize", "lineHeight"].forEach(key => {
|
|
10978
10989
|
const styleKey = lowerCamelCaseToMiddle(key);
|
|
10979
|
-
isNil$1(attrs[key]) || (style[styleKey] =
|
|
10980
|
-
}), attrs.underline ? style["text-decoration"] = "underline" : attrs.lineThrough && (style["text-decoration"] = "line-through"), attrs.fill && isString$1(attrs.fill) && (style.color = attrs.fill), style;
|
|
10990
|
+
isNil$1(attrs[key]) || (style[styleKey] = parsePxValue(attrs[key]));
|
|
10991
|
+
}), isValid$1(attrs.maxLineWidth) && (style["max-width"] = parsePxValue(attrs.maxLineWidth)), attrs.underline ? style["text-decoration"] = "underline" : attrs.lineThrough && (style["text-decoration"] = "line-through"), attrs.fill && isString$1(attrs.fill) && (style.color = attrs.fill), style;
|
|
10981
10992
|
}
|
|
10982
10993
|
|
|
10983
10994
|
class CanvasTextLayout {
|
|
@@ -17237,6 +17248,100 @@
|
|
|
17237
17248
|
decorator(target, key, paramIndex);
|
|
17238
17249
|
};
|
|
17239
17250
|
};
|
|
17251
|
+
exports.DefaultCanvasGroupRender = class DefaultCanvasGroupRender {
|
|
17252
|
+
constructor(groupRenderContribitions) {
|
|
17253
|
+
this.groupRenderContribitions = groupRenderContribitions, this.numberType = GROUP_NUMBER_TYPE;
|
|
17254
|
+
}
|
|
17255
|
+
drawShape(group, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
17256
|
+
const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
|
|
17257
|
+
{
|
|
17258
|
+
fill = groupAttribute.fill,
|
|
17259
|
+
background: background,
|
|
17260
|
+
stroke = groupAttribute.stroke,
|
|
17261
|
+
opacity = groupAttribute.opacity,
|
|
17262
|
+
width = groupAttribute.width,
|
|
17263
|
+
height = groupAttribute.height,
|
|
17264
|
+
clip = groupAttribute.clip,
|
|
17265
|
+
fillOpacity = groupAttribute.fillOpacity,
|
|
17266
|
+
strokeOpacity = groupAttribute.strokeOpacity,
|
|
17267
|
+
cornerRadius = groupAttribute.cornerRadius,
|
|
17268
|
+
path = groupAttribute.path,
|
|
17269
|
+
lineWidth = groupAttribute.lineWidth,
|
|
17270
|
+
visible = groupAttribute.visible
|
|
17271
|
+
} = group.attribute,
|
|
17272
|
+
fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
|
|
17273
|
+
sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
|
|
17274
|
+
doFill = runFill(fill, background),
|
|
17275
|
+
doStroke = runStroke(stroke, lineWidth);
|
|
17276
|
+
if (!group.valid || !visible) return;
|
|
17277
|
+
if (!clip) {
|
|
17278
|
+
if (!doFill && !doStroke) return;
|
|
17279
|
+
if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
|
|
17280
|
+
}
|
|
17281
|
+
if (path && path.length && drawContext.drawContribution) {
|
|
17282
|
+
const disableFill = context.disableFill,
|
|
17283
|
+
disableStroke = context.disableStroke,
|
|
17284
|
+
disableBeginPath = context.disableBeginPath;
|
|
17285
|
+
context.disableFill = !0, context.disableStroke = !0, context.disableBeginPath = !0, path.forEach(g => {
|
|
17286
|
+
drawContext.drawContribution.getRenderContribution(g).draw(g, drawContext.renderService, drawContext, params);
|
|
17287
|
+
}), context.disableFill = disableFill, context.disableStroke = disableStroke, context.disableBeginPath = disableBeginPath;
|
|
17288
|
+
} 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));
|
|
17289
|
+
this._groupRenderContribitions || (this._groupRenderContribitions = this.groupRenderContribitions.getContributions() || [], this._groupRenderContribitions.push(defaultGroupBackgroundRenderContribution));
|
|
17290
|
+
const doFillOrStroke = {
|
|
17291
|
+
doFill: doFill,
|
|
17292
|
+
doStroke: doStroke
|
|
17293
|
+
};
|
|
17294
|
+
this._groupRenderContribitions.forEach(c => {
|
|
17295
|
+
c.time === exports.BaseRenderContributionTime.beforeFillStroke && c.drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke);
|
|
17296
|
+
}), 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 => {
|
|
17297
|
+
c.time === exports.BaseRenderContributionTime.afterFillStroke && c.drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb);
|
|
17298
|
+
});
|
|
17299
|
+
}
|
|
17300
|
+
draw(group, renderService, drawContext, params) {
|
|
17301
|
+
const {
|
|
17302
|
+
context: context
|
|
17303
|
+
} = drawContext;
|
|
17304
|
+
if (!context) return;
|
|
17305
|
+
const {
|
|
17306
|
+
clip: clip,
|
|
17307
|
+
baseOpacity = 1
|
|
17308
|
+
} = group.attribute;
|
|
17309
|
+
clip ? context.save() : context.highPerformanceSave(), context.baseGlobalAlpha *= baseOpacity;
|
|
17310
|
+
const groupAttribute = getTheme(group, null == params ? void 0 : params.theme).group,
|
|
17311
|
+
lastModelMatrix = context.modelMatrix;
|
|
17312
|
+
if (context.camera) {
|
|
17313
|
+
const nextModelMatrix = mat4Allocate.allocate(),
|
|
17314
|
+
modelMatrix = mat4Allocate.allocate();
|
|
17315
|
+
getModelMatrix(modelMatrix, group, groupAttribute), multiplyMat4Mat4(nextModelMatrix, lastModelMatrix || nextModelMatrix, modelMatrix), context.modelMatrix = nextModelMatrix, mat4Allocate.free(modelMatrix), context.setTransform(1, 0, 0, 1, 0, 0, !0);
|
|
17316
|
+
} else context.transformFromMatrix(group.transMatrix, !0);
|
|
17317
|
+
context.beginPath(), params.skipDraw ? this.drawShape(group, context, 0, 0, drawContext, params, () => !1, () => !1) : this.drawShape(group, context, 0, 0, drawContext);
|
|
17318
|
+
const {
|
|
17319
|
+
scrollX = groupAttribute.scrollX,
|
|
17320
|
+
scrollY = groupAttribute.scrollY
|
|
17321
|
+
} = group.attribute;
|
|
17322
|
+
let p;
|
|
17323
|
+
(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(() => {
|
|
17324
|
+
clip ? context.restore() : context.highPerformanceRestore();
|
|
17325
|
+
}) : clip ? context.restore() : context.highPerformanceRestore();
|
|
17326
|
+
}
|
|
17327
|
+
};
|
|
17328
|
+
exports.DefaultCanvasGroupRender = __decorate$1s([injectable(), __param$H(0, inject(ContributionProvider)), __param$H(0, named(GroupRenderContribution)), __metadata$16("design:paramtypes", [Object])], exports.DefaultCanvasGroupRender);
|
|
17329
|
+
|
|
17330
|
+
var __decorate$1r = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17331
|
+
var d,
|
|
17332
|
+
c = arguments.length,
|
|
17333
|
+
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
17334
|
+
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);
|
|
17335
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17336
|
+
},
|
|
17337
|
+
__metadata$15 = undefined && undefined.__metadata || function (k, v) {
|
|
17338
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
17339
|
+
},
|
|
17340
|
+
__param$G = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
17341
|
+
return function (target, key) {
|
|
17342
|
+
decorator(target, key, paramIndex);
|
|
17343
|
+
};
|
|
17344
|
+
};
|
|
17240
17345
|
const repeatStr = ["", "repeat-x", "repeat-y", "repeat"];
|
|
17241
17346
|
exports.DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender {
|
|
17242
17347
|
constructor(imageRenderContribitions) {
|
|
@@ -17293,7 +17398,7 @@
|
|
|
17293
17398
|
this._draw(image, imageAttribute, !1, drawContext);
|
|
17294
17399
|
}
|
|
17295
17400
|
};
|
|
17296
|
-
exports.DefaultCanvasImageRender = __decorate$
|
|
17401
|
+
exports.DefaultCanvasImageRender = __decorate$1r([injectable(), __param$G(0, inject(ContributionProvider)), __param$G(0, named(ImageRenderContribution)), __metadata$15("design:paramtypes", [Object])], exports.DefaultCanvasImageRender);
|
|
17297
17402
|
|
|
17298
17403
|
const IncrementalDrawContribution = Symbol.for("IncrementalDrawContribution");
|
|
17299
17404
|
const ArcRender = Symbol.for("ArcRender");
|
|
@@ -17316,14 +17421,14 @@
|
|
|
17316
17421
|
const RenderSelector = Symbol.for("RenderSelector");
|
|
17317
17422
|
const DrawContribution = Symbol.for("DrawContribution");
|
|
17318
17423
|
|
|
17319
|
-
var __decorate$
|
|
17424
|
+
var __decorate$1q = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17320
17425
|
var d,
|
|
17321
17426
|
c = arguments.length,
|
|
17322
17427
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
17323
17428
|
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
17429
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17325
17430
|
},
|
|
17326
|
-
__metadata$
|
|
17431
|
+
__metadata$14 = undefined && undefined.__metadata || function (k, v) {
|
|
17327
17432
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
17328
17433
|
};
|
|
17329
17434
|
const DrawItemInterceptor = Symbol.for("DrawItemInterceptor");
|
|
@@ -17383,7 +17488,7 @@
|
|
|
17383
17488
|
return !1;
|
|
17384
17489
|
}
|
|
17385
17490
|
};
|
|
17386
|
-
exports.CommonDrawItemInterceptorContribution = __decorate$
|
|
17491
|
+
exports.CommonDrawItemInterceptorContribution = __decorate$1q([injectable(), __metadata$14("design:paramtypes", [])], exports.CommonDrawItemInterceptorContribution);
|
|
17387
17492
|
class InteractiveDrawItemInterceptorContribution {
|
|
17388
17493
|
constructor() {
|
|
17389
17494
|
this.order = 1;
|
|
@@ -17515,17 +17620,17 @@
|
|
|
17515
17620
|
}
|
|
17516
17621
|
}
|
|
17517
17622
|
|
|
17518
|
-
var __decorate$
|
|
17623
|
+
var __decorate$1p = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17519
17624
|
var d,
|
|
17520
17625
|
c = arguments.length,
|
|
17521
17626
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
17522
17627
|
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
17628
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17524
17629
|
},
|
|
17525
|
-
__metadata$
|
|
17630
|
+
__metadata$13 = undefined && undefined.__metadata || function (k, v) {
|
|
17526
17631
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
17527
17632
|
},
|
|
17528
|
-
__param$
|
|
17633
|
+
__param$F = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
17529
17634
|
return function (target, key) {
|
|
17530
17635
|
decorator(target, key, paramIndex);
|
|
17531
17636
|
};
|
|
@@ -17563,7 +17668,7 @@
|
|
|
17563
17668
|
this.prepare(updateBounds), this.prepareRenderList(), this.beforeDraw(params), this.draw(params), this.afterDraw(params), this.drawParams = null;
|
|
17564
17669
|
}
|
|
17565
17670
|
};
|
|
17566
|
-
exports.DefaultRenderService = __decorate$
|
|
17671
|
+
exports.DefaultRenderService = __decorate$1p([injectable(), __param$F(0, inject(DrawContribution)), __metadata$13("design:paramtypes", [Object])], exports.DefaultRenderService);
|
|
17567
17672
|
|
|
17568
17673
|
var renderModule$1 = new ContainerModule(bind => {
|
|
17569
17674
|
bind(RenderService).to(exports.DefaultRenderService);
|
|
@@ -17574,7 +17679,7 @@
|
|
|
17574
17679
|
const BoundsPicker = Symbol.for("BoundsPicker");
|
|
17575
17680
|
const GlobalPickerService = Symbol.for("GlobalPickerService");
|
|
17576
17681
|
|
|
17577
|
-
var __decorate$
|
|
17682
|
+
var __decorate$1o = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17578
17683
|
var d,
|
|
17579
17684
|
c = arguments.length,
|
|
17580
17685
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -17604,10 +17709,10 @@
|
|
|
17604
17709
|
currentGroupMatrix = matrixAllocate.allocateByObj(parentMatrix),
|
|
17605
17710
|
newPoint = new Point(currentGroupMatrix.a * point.x + currentGroupMatrix.c * point.y + currentGroupMatrix.e, currentGroupMatrix.b * point.x + currentGroupMatrix.d * point.y + currentGroupMatrix.f),
|
|
17606
17711
|
result = pickerService.pickGroup(g, newPoint, currentGroupMatrix, pickParams);
|
|
17607
|
-
return context.highPerformanceRestore(), result;
|
|
17712
|
+
return context.highPerformanceRestore(), !result.graphic && result.group && (result.graphic = result.group), result;
|
|
17608
17713
|
}
|
|
17609
17714
|
};
|
|
17610
|
-
exports.ShadowRootPickItemInterceptorContribution = __decorate$
|
|
17715
|
+
exports.ShadowRootPickItemInterceptorContribution = __decorate$1o([injectable()], exports.ShadowRootPickItemInterceptorContribution);
|
|
17611
17716
|
exports.InteractivePickItemInterceptorContribution = class InteractivePickItemInterceptorContribution {
|
|
17612
17717
|
constructor() {
|
|
17613
17718
|
this.order = 1;
|
|
@@ -17626,7 +17731,7 @@
|
|
|
17626
17731
|
return null;
|
|
17627
17732
|
}
|
|
17628
17733
|
};
|
|
17629
|
-
exports.InteractivePickItemInterceptorContribution = __decorate$
|
|
17734
|
+
exports.InteractivePickItemInterceptorContribution = __decorate$1o([injectable()], exports.InteractivePickItemInterceptorContribution);
|
|
17630
17735
|
exports.Canvas3DPickItemInterceptor = class Canvas3DPickItemInterceptor {
|
|
17631
17736
|
constructor() {
|
|
17632
17737
|
this.order = 1;
|
|
@@ -17686,7 +17791,7 @@
|
|
|
17686
17791
|
context.setTransformForCurrent();
|
|
17687
17792
|
}
|
|
17688
17793
|
};
|
|
17689
|
-
exports.Canvas3DPickItemInterceptor = __decorate$
|
|
17794
|
+
exports.Canvas3DPickItemInterceptor = __decorate$1o([injectable()], exports.Canvas3DPickItemInterceptor);
|
|
17690
17795
|
|
|
17691
17796
|
var pickModule = new ContainerModule((bind, unbind, isBound) => {
|
|
17692
17797
|
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 +17804,17 @@
|
|
|
17699
17804
|
const AutoEnablePlugins = Symbol.for("AutoEnablePlugins");
|
|
17700
17805
|
const PluginService = Symbol.for("PluginService");
|
|
17701
17806
|
|
|
17702
|
-
var __decorate$
|
|
17807
|
+
var __decorate$1n = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17703
17808
|
var d,
|
|
17704
17809
|
c = arguments.length,
|
|
17705
17810
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
17706
17811
|
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
17812
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17708
17813
|
},
|
|
17709
|
-
__metadata$
|
|
17814
|
+
__metadata$12 = undefined && undefined.__metadata || function (k, v) {
|
|
17710
17815
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
17711
17816
|
},
|
|
17712
|
-
__param$
|
|
17817
|
+
__param$E = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
17713
17818
|
return function (target, key) {
|
|
17714
17819
|
decorator(target, key, paramIndex);
|
|
17715
17820
|
};
|
|
@@ -17749,7 +17854,7 @@
|
|
|
17749
17854
|
}), this.onRegisterPlugin = [];
|
|
17750
17855
|
}
|
|
17751
17856
|
};
|
|
17752
|
-
DefaultPluginService = __decorate$
|
|
17857
|
+
DefaultPluginService = __decorate$1n([injectable(), __param$E(0, inject(ContributionProvider)), __param$E(0, named(AutoEnablePlugins)), __metadata$12("design:paramtypes", [Object])], DefaultPluginService);
|
|
17753
17858
|
|
|
17754
17859
|
var pluginModule = new ContainerModule(bind => {
|
|
17755
17860
|
bind(PluginService).to(DefaultPluginService), bindContributionProviderNoSingletonScope(bind, AutoEnablePlugins);
|
|
@@ -17763,14 +17868,14 @@
|
|
|
17763
17868
|
bind(TextMeasureContribution).to(exports.DefaultTextMeasureContribution).inSingletonScope(), bindContributionProvider(bind, TextMeasureContribution);
|
|
17764
17869
|
});
|
|
17765
17870
|
|
|
17766
|
-
var __decorate$
|
|
17871
|
+
var __decorate$1m = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17767
17872
|
var d,
|
|
17768
17873
|
c = arguments.length,
|
|
17769
17874
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
17770
17875
|
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
17876
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17772
17877
|
},
|
|
17773
|
-
__metadata$
|
|
17878
|
+
__metadata$11 = undefined && undefined.__metadata || function (k, v) {
|
|
17774
17879
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
17775
17880
|
};
|
|
17776
17881
|
let CanvasLayerHandlerContribution = class {
|
|
@@ -17840,16 +17945,16 @@
|
|
|
17840
17945
|
this.canvas.release();
|
|
17841
17946
|
}
|
|
17842
17947
|
};
|
|
17843
|
-
CanvasLayerHandlerContribution = __decorate$
|
|
17948
|
+
CanvasLayerHandlerContribution = __decorate$1m([injectable(), __metadata$11("design:paramtypes", [])], CanvasLayerHandlerContribution);
|
|
17844
17949
|
|
|
17845
|
-
var __decorate$
|
|
17950
|
+
var __decorate$1l = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17846
17951
|
var d,
|
|
17847
17952
|
c = arguments.length,
|
|
17848
17953
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
17849
17954
|
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
17955
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17851
17956
|
},
|
|
17852
|
-
__metadata$
|
|
17957
|
+
__metadata$10 = undefined && undefined.__metadata || function (k, v) {
|
|
17853
17958
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
17854
17959
|
};
|
|
17855
17960
|
let EmptyLayerHandlerContribution = class {
|
|
@@ -17884,16 +17989,16 @@
|
|
|
17884
17989
|
}
|
|
17885
17990
|
release() {}
|
|
17886
17991
|
};
|
|
17887
|
-
EmptyLayerHandlerContribution = __decorate$
|
|
17992
|
+
EmptyLayerHandlerContribution = __decorate$1l([injectable(), __metadata$10("design:paramtypes", [])], EmptyLayerHandlerContribution);
|
|
17888
17993
|
|
|
17889
|
-
var __decorate$
|
|
17994
|
+
var __decorate$1k = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17890
17995
|
var d,
|
|
17891
17996
|
c = arguments.length,
|
|
17892
17997
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
17893
17998
|
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
17999
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17895
18000
|
},
|
|
17896
|
-
__metadata
|
|
18001
|
+
__metadata$$ = undefined && undefined.__metadata || function (k, v) {
|
|
17897
18002
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
17898
18003
|
};
|
|
17899
18004
|
let OffscreenLayerHandlerContribution = class {
|
|
@@ -17956,7 +18061,7 @@
|
|
|
17956
18061
|
}
|
|
17957
18062
|
merge(layerHandlers) {}
|
|
17958
18063
|
};
|
|
17959
|
-
OffscreenLayerHandlerContribution = __decorate$
|
|
18064
|
+
OffscreenLayerHandlerContribution = __decorate$1k([injectable(), __metadata$$("design:paramtypes", [])], OffscreenLayerHandlerContribution);
|
|
17960
18065
|
|
|
17961
18066
|
var layerHandlerModules = new ContainerModule(bind => {
|
|
17962
18067
|
bind(CanvasLayerHandlerContribution).toSelf(), bind(OffscreenLayerHandlerContribution).toSelf(), bind(EmptyLayerHandlerContribution).toSelf(), bind(StaticLayerHandlerContribution).toService(CanvasLayerHandlerContribution), bind(DynamicLayerHandlerContribution).toService(OffscreenLayerHandlerContribution), bind(VirtualLayerHandlerContribution).toService(EmptyLayerHandlerContribution);
|
|
@@ -18072,17 +18177,17 @@
|
|
|
18072
18177
|
return result;
|
|
18073
18178
|
}
|
|
18074
18179
|
|
|
18075
|
-
var __decorate$
|
|
18180
|
+
var __decorate$1j = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
18076
18181
|
var d,
|
|
18077
18182
|
c = arguments.length,
|
|
18078
18183
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
18079
18184
|
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
18185
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
18081
18186
|
},
|
|
18082
|
-
__metadata
|
|
18187
|
+
__metadata$_ = undefined && undefined.__metadata || function (k, v) {
|
|
18083
18188
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
18084
18189
|
},
|
|
18085
|
-
__param$
|
|
18190
|
+
__param$D = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
18086
18191
|
return function (target, key) {
|
|
18087
18192
|
decorator(target, key, paramIndex);
|
|
18088
18193
|
};
|
|
@@ -18269,101 +18374,7 @@
|
|
|
18269
18374
|
}
|
|
18270
18375
|
afterDraw(renderService, drawParams) {}
|
|
18271
18376
|
};
|
|
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);
|
|
18377
|
+
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
18378
|
|
|
18368
18379
|
var __decorate$1i = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
18369
18380
|
var d,
|
|
@@ -18607,7 +18618,7 @@
|
|
|
18607
18618
|
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
18619
|
|
|
18609
18620
|
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);
|
|
18621
|
+
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
18622
|
});
|
|
18612
18623
|
|
|
18613
18624
|
function load(container) {
|
|
@@ -18800,8 +18811,9 @@
|
|
|
18800
18811
|
}
|
|
18801
18812
|
const containerTL = application.global.getElementTopLeft(nativeContainer, !1),
|
|
18802
18813
|
windowTL = stage.window.getTopLeft(!1),
|
|
18803
|
-
|
|
18804
|
-
|
|
18814
|
+
viewBox = stage.viewBox,
|
|
18815
|
+
offsetX = left + windowTL.left - containerTL.left + viewBox.x1,
|
|
18816
|
+
offsetTop = top + windowTL.top - containerTL.top + viewBox.y1;
|
|
18805
18817
|
if (calculateStyle.left = `${offsetX}px`, calculateStyle.top = `${offsetTop}px`, "text" === graphic.type && "position" === anchorType && (calculateStyle = Object.assign(Object.assign({}, calculateStyle), this.getTransformOfText(graphic))), isFunction$1(options.style)) {
|
|
18806
18818
|
const userStyle = options.style({
|
|
18807
18819
|
top: offsetTop,
|
|
@@ -29298,7 +29310,7 @@
|
|
|
29298
29310
|
|
|
29299
29311
|
const roughModule = _roughModule;
|
|
29300
29312
|
|
|
29301
|
-
const version = "0.19.
|
|
29313
|
+
const version = "0.19.22";
|
|
29302
29314
|
preLoadAllModule();
|
|
29303
29315
|
if (isBrowserEnv()) {
|
|
29304
29316
|
loadBrowserEnv(container);
|