@visactor/vrender 0.17.5-alpha.1 → 0.17.6
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 +74 -65
- 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/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
21
21
|
|
|
22
22
|
const vrender_core_1 = require("@visactor/vrender-core"), vrender_kits_1 = require("@visactor/vrender-kits"), vrender_kits_2 = require("@visactor/vrender-kits");
|
|
23
23
|
|
|
24
|
-
exports.version = "0.17.
|
|
24
|
+
exports.version = "0.17.6", (0, vrender_core_1.isBrowserEnv)() ? (0, vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0,
|
|
25
25
|
vrender_core_1.isNodeEnv)() && (0, vrender_kits_1.loadNodeEnv)(vrender_core_1.container),
|
|
26
26
|
(0, vrender_kits_2.registerArc)(), (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(),
|
|
27
27
|
(0, vrender_kits_2.registerCircle)(), (0, vrender_kits_2.registerGlyph)(), (0, vrender_kits_2.registerGroup)(),
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAA4E;AAC5E,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAA4E;AAC5E,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AACnB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import { container, isBrowserEnv, isNodeEnv } from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"0.17.6\";\n\nif (isBrowserEnv()) {\n loadBrowserEnv(container);\n} else if (isNodeEnv()) {\n loadNodeEnv(container);\n}\nregisterArc();\nregisterArc3d();\nregisterArea();\nregisterCircle();\nregisterGlyph();\nregisterGroup();\nregisterImage();\nregisterLine();\nregisterPath();\nregisterPolygon();\nregisterPyramid3d();\nregisterRect();\nregisterRect3d();\nregisterRichtext();\nregisterShadowRoot();\nregisterSymbol();\nregisterText();\nregisterWrapText();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
|
package/dist/index.js
CHANGED
|
@@ -1527,7 +1527,7 @@
|
|
|
1527
1527
|
var EnvContribution = Symbol["for"]("EnvContribution");
|
|
1528
1528
|
var VGlobal = Symbol["for"]("VGlobal");
|
|
1529
1529
|
|
|
1530
|
-
var __decorate$
|
|
1530
|
+
var __decorate$1D = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
1531
1531
|
var d,
|
|
1532
1532
|
c = arguments.length,
|
|
1533
1533
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -1777,7 +1777,7 @@
|
|
|
1777
1777
|
}]);
|
|
1778
1778
|
return DefaultGlobal;
|
|
1779
1779
|
}();
|
|
1780
|
-
exports.DefaultGlobal = __decorate$
|
|
1780
|
+
exports.DefaultGlobal = __decorate$1D([injectable(), __param$R(0, inject(ContributionProvider)), __param$R(0, named(EnvContribution)), __metadata$1e("design:paramtypes", [Object])], exports.DefaultGlobal);
|
|
1781
1781
|
|
|
1782
1782
|
function getDefaultExportFromCjs (x) {
|
|
1783
1783
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -2171,13 +2171,6 @@
|
|
|
2171
2171
|
};
|
|
2172
2172
|
var isBase64$1 = isBase64;
|
|
2173
2173
|
|
|
2174
|
-
var get = function get(obj, path, defaultValue) {
|
|
2175
|
-
var paths = isString$1(path) ? path.split(".") : path;
|
|
2176
|
-
for (var p = 0; p < paths.length; p++) obj = obj ? obj[paths[p]] : void 0;
|
|
2177
|
-
return void 0 === obj ? defaultValue : obj;
|
|
2178
|
-
};
|
|
2179
|
-
var get$1 = get;
|
|
2180
|
-
|
|
2181
2174
|
var hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
2182
2175
|
has = function has(object, key) {
|
|
2183
2176
|
return null != object && hasOwnProperty.call(object, key);
|
|
@@ -2934,7 +2927,7 @@
|
|
|
2934
2927
|
function LinearToSRGB(c) {
|
|
2935
2928
|
return c < .0031308 ? 12.92 * c : 1.055 * Math.pow(c, .41666) - .055;
|
|
2936
2929
|
}
|
|
2937
|
-
var Color
|
|
2930
|
+
var Color = /*#__PURE__*/function () {
|
|
2938
2931
|
function Color(value) {
|
|
2939
2932
|
_classCallCheck(this, Color);
|
|
2940
2933
|
var color = Color.parseColorString(value);
|
|
@@ -5129,7 +5122,8 @@
|
|
|
5129
5122
|
whiteSpace: "no-wrap",
|
|
5130
5123
|
heightLimit: 1 / 0,
|
|
5131
5124
|
lineClamp: 1 / 0,
|
|
5132
|
-
suffixPosition: "end"
|
|
5125
|
+
suffixPosition: "end",
|
|
5126
|
+
disableAutoClipedPoptip: void 0
|
|
5133
5127
|
};
|
|
5134
5128
|
var DefaultPickStyle = {
|
|
5135
5129
|
pickStrokeBuffer: 0
|
|
@@ -5426,7 +5420,7 @@
|
|
|
5426
5420
|
return "number" != typeof measurement.actualBoundingBoxAscent || "number" != typeof measurement.actualBoundingBoxDescent ? (result.width = Math.floor(measurement.width), result.height = character.fontSize || 0, result.ascent = result.height, result.descent = 0) : (result.width = Math.floor(measurement.width), result.height = Math.floor(measurement.actualBoundingBoxAscent + measurement.actualBoundingBoxDescent), result.ascent = Math.floor(measurement.actualBoundingBoxAscent), result.descent = result.height - result.ascent), result;
|
|
5427
5421
|
}
|
|
5428
5422
|
|
|
5429
|
-
var __decorate$
|
|
5423
|
+
var __decorate$1C = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
5430
5424
|
var d,
|
|
5431
5425
|
c = arguments.length,
|
|
5432
5426
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -5731,9 +5725,9 @@
|
|
|
5731
5725
|
}]);
|
|
5732
5726
|
return ATextMeasure;
|
|
5733
5727
|
}();
|
|
5734
|
-
ATextMeasure = __decorate$
|
|
5728
|
+
ATextMeasure = __decorate$1C([injectable()], ATextMeasure);
|
|
5735
5729
|
|
|
5736
|
-
var __decorate$
|
|
5730
|
+
var __decorate$1B = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
5737
5731
|
var d,
|
|
5738
5732
|
c = arguments.length,
|
|
5739
5733
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -5750,7 +5744,7 @@
|
|
|
5750
5744
|
}
|
|
5751
5745
|
return _createClass(DefaultTextMeasureContribution);
|
|
5752
5746
|
}(ATextMeasure);
|
|
5753
|
-
exports.DefaultTextMeasureContribution = __decorate$
|
|
5747
|
+
exports.DefaultTextMeasureContribution = __decorate$1B([injectable()], exports.DefaultTextMeasureContribution);
|
|
5754
5748
|
|
|
5755
5749
|
var container = new Container();
|
|
5756
5750
|
|
|
@@ -6193,7 +6187,7 @@
|
|
|
6193
6187
|
}();
|
|
6194
6188
|
var canvasAllocate = new DefaultCanvasAllocate();
|
|
6195
6189
|
|
|
6196
|
-
var __decorate$
|
|
6190
|
+
var __decorate$1A = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
6197
6191
|
var d,
|
|
6198
6192
|
c = arguments.length,
|
|
6199
6193
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -6285,7 +6279,7 @@
|
|
|
6285
6279
|
}]);
|
|
6286
6280
|
return DefaultGraphicUtil;
|
|
6287
6281
|
}();
|
|
6288
|
-
exports.DefaultGraphicUtil = __decorate$
|
|
6282
|
+
exports.DefaultGraphicUtil = __decorate$1A([injectable(), __param$Q(0, inject(ContributionProvider)), __param$Q(0, named(TextMeasureContribution)), __metadata$1d("design:paramtypes", [Object])], exports.DefaultGraphicUtil);
|
|
6289
6283
|
var TransformMode;
|
|
6290
6284
|
!function (TransformMode) {
|
|
6291
6285
|
TransformMode[TransformMode.transform = 0] = "transform", TransformMode[TransformMode.matrix = 1] = "matrix";
|
|
@@ -6362,7 +6356,7 @@
|
|
|
6362
6356
|
}]);
|
|
6363
6357
|
return DefaultTransformUtil;
|
|
6364
6358
|
}();
|
|
6365
|
-
exports.DefaultTransformUtil = __decorate$
|
|
6359
|
+
exports.DefaultTransformUtil = __decorate$1A([injectable(), __metadata$1d("design:paramtypes", [])], exports.DefaultTransformUtil);
|
|
6366
6360
|
|
|
6367
6361
|
var defaultThemeObj = {
|
|
6368
6362
|
arc: DefaultArcAttribute,
|
|
@@ -7293,7 +7287,7 @@
|
|
|
7293
7287
|
function EventManager(root, config) {
|
|
7294
7288
|
var _this = this;
|
|
7295
7289
|
_classCallCheck(this, EventManager);
|
|
7296
|
-
this.dispatch = new EventEmitter(), this.mappingState = {
|
|
7290
|
+
this.dispatch = new EventEmitter(), this.cursorTarget = null, this.mappingState = {
|
|
7297
7291
|
trackingData: {}
|
|
7298
7292
|
}, this.eventPool = new Map(), this.onPointerDown = function (from, target) {
|
|
7299
7293
|
if (!(from instanceof FederatedPointerEvent)) return void Logger.getInstance().warn("EventManager cannot map a non-pointer event as a pointer event");
|
|
@@ -7333,14 +7327,14 @@
|
|
|
7333
7327
|
}
|
|
7334
7328
|
_this.freeEvent(overEvent);
|
|
7335
7329
|
}
|
|
7336
|
-
_this.dispatchEvent(e, "pointermove"), "touch" === e.pointerType && _this.dispatchEvent(e, "touchmove"), isMouse && (_this.dispatchEvent(e, "mousemove"), _this.cursor = (null === (_b = null === (_a = e.target) || void 0 === _a ? void 0 : _a.attribute) || void 0 === _b ? void 0 : _b.cursor) || _this.rootTarget.getCursor()), trackingData.overTargets = e.composedPath(), _this.freeEvent(e);
|
|
7330
|
+
_this.dispatchEvent(e, "pointermove"), "touch" === e.pointerType && _this.dispatchEvent(e, "touchmove"), isMouse && (_this.dispatchEvent(e, "mousemove"), _this.cursorTarget = e.target, _this.cursor = (null === (_b = null === (_a = e.target) || void 0 === _a ? void 0 : _a.attribute) || void 0 === _b ? void 0 : _b.cursor) || _this.rootTarget.getCursor()), trackingData.overTargets = e.composedPath(), _this.freeEvent(e);
|
|
7337
7331
|
}, this.onPointerOver = function (from, target) {
|
|
7338
7332
|
var _a, _b;
|
|
7339
7333
|
if (!(from instanceof FederatedPointerEvent)) return void Logger.getInstance().warn("EventManager cannot map a non-pointer event as a pointer event");
|
|
7340
7334
|
var trackingData = _this.trackingData(from.pointerId),
|
|
7341
7335
|
e = _this.createPointerEvent(from, from.type, target),
|
|
7342
7336
|
isMouse = isMouseLike(e.pointerType);
|
|
7343
|
-
_this.dispatchEvent(e, "pointerover"), isMouse && _this.dispatchEvent(e, "mouseover"), "mouse" === e.pointerType && (_this.cursor = (null === (_b = null === (_a = e.target) || void 0 === _a ? void 0 : _a.attribute) || void 0 === _b ? void 0 : _b.cursor) || _this.rootTarget.getCursor());
|
|
7337
|
+
_this.dispatchEvent(e, "pointerover"), isMouse && _this.dispatchEvent(e, "mouseover"), "mouse" === e.pointerType && (_this.cursorTarget = e.target, _this.cursor = (null === (_b = null === (_a = e.target) || void 0 === _a ? void 0 : _a.attribute) || void 0 === _b ? void 0 : _b.cursor) || _this.rootTarget.getCursor());
|
|
7344
7338
|
var enterEvent = _this.clonePointerEvent(e, "pointerenter");
|
|
7345
7339
|
for (enterEvent.eventPhase = enterEvent.AT_TARGET; enterEvent.target && enterEvent.target !== _this.rootTarget.parent;) enterEvent.currentTarget = enterEvent.target, _this.notifyTarget(enterEvent), isMouse && _this.notifyTarget(enterEvent, "mouseenter"), enterEvent.target = enterEvent.target.parent;
|
|
7346
7340
|
trackingData.overTargets = e.composedPath(), _this.freeEvent(e), _this.freeEvent(enterEvent);
|
|
@@ -7356,7 +7350,7 @@
|
|
|
7356
7350
|
for (leaveEvent.eventPhase = leaveEvent.AT_TARGET; leaveEvent.target && leaveEvent.target !== _this.rootTarget.parent;) leaveEvent.currentTarget = leaveEvent.target, _this.notifyTarget(leaveEvent), isMouse && _this.notifyTarget(leaveEvent, "mouseleave"), leaveEvent.target = leaveEvent.target.parent;
|
|
7357
7351
|
trackingData.overTargets = [], _this.freeEvent(outEvent), _this.freeEvent(leaveEvent);
|
|
7358
7352
|
}
|
|
7359
|
-
_this.cursor = "";
|
|
7353
|
+
_this.cursorTarget = null, _this.cursor = "";
|
|
7360
7354
|
}, this.onPointerUp = function (from, target) {
|
|
7361
7355
|
var _a;
|
|
7362
7356
|
if (!(from instanceof FederatedPointerEvent)) return void Logger.getInstance().warn("EventManager cannot map a non-pointer event as a pointer event");
|
|
@@ -7559,7 +7553,7 @@
|
|
|
7559
7553
|
value: function pickTarget(x, y, e) {
|
|
7560
7554
|
var target;
|
|
7561
7555
|
var pickResult = this.rootTarget.pick(x, y);
|
|
7562
|
-
return target = pickResult && pickResult.graphic ? pickResult.graphic : pickResult && pickResult.group ? pickResult.group :
|
|
7556
|
+
return target = pickResult && pickResult.graphic ? pickResult.graphic : pickResult && pickResult.group ? pickResult.group : this.rootTarget.AABBBounds.contains(x, y) ? this.rootTarget : null, e && (e.pickParams = pickResult.params), target;
|
|
7563
7557
|
}
|
|
7564
7558
|
}]);
|
|
7565
7559
|
return EventManager;
|
|
@@ -7600,7 +7594,7 @@
|
|
|
7600
7594
|
federatedEvent = _this.bootstrapEvent(_this.rootPointerEvent, _nativeEvent);
|
|
7601
7595
|
_this.manager.mapEvent(federatedEvent);
|
|
7602
7596
|
}
|
|
7603
|
-
_this.setCursor(_this.manager.cursor);
|
|
7597
|
+
_this.setCursor(_this.manager.cursor, _this.manager.cursorTarget);
|
|
7604
7598
|
}, this.onPointerMove = function (nativeEvent) {
|
|
7605
7599
|
if (_this.supportsTouchEvents && "touch" === nativeEvent.pointerType) return;
|
|
7606
7600
|
if (_this.isEventOutsideOfTargetElement(nativeEvent)) return;
|
|
@@ -7609,7 +7603,7 @@
|
|
|
7609
7603
|
var event = _this.bootstrapEvent(_this.rootPointerEvent, normalizedEvents[i]);
|
|
7610
7604
|
_this.manager.mapEvent(event);
|
|
7611
7605
|
}
|
|
7612
|
-
_this.setCursor(_this.manager.cursor);
|
|
7606
|
+
_this.setCursor(_this.manager.cursor, _this.manager.cursorTarget);
|
|
7613
7607
|
}, this.onPointerUp = function (nativeEvent) {
|
|
7614
7608
|
if (_this.supportsTouchEvents && "touch" === nativeEvent.pointerType) return;
|
|
7615
7609
|
var outside = _this.isEventOutsideOfTargetElement(nativeEvent) ? "outside" : "",
|
|
@@ -7618,7 +7612,7 @@
|
|
|
7618
7612
|
var event = _this.bootstrapEvent(_this.rootPointerEvent, normalizedEvents[i]);
|
|
7619
7613
|
event.type += outside, _this.manager.mapEvent(event);
|
|
7620
7614
|
}
|
|
7621
|
-
_this.setCursor(_this.manager.cursor);
|
|
7615
|
+
_this.setCursor(_this.manager.cursor, _this.manager.cursorTarget);
|
|
7622
7616
|
}, this.onPointerOverOut = function (nativeEvent) {
|
|
7623
7617
|
if (_this.supportsTouchEvents && "touch" === nativeEvent.pointerType) return;
|
|
7624
7618
|
var normalizedEvents = _this.normalizeToPointerData(nativeEvent);
|
|
@@ -7626,7 +7620,7 @@
|
|
|
7626
7620
|
var event = _this.bootstrapEvent(_this.rootPointerEvent, normalizedEvents[i]);
|
|
7627
7621
|
_this.manager.mapEvent(event);
|
|
7628
7622
|
}
|
|
7629
|
-
_this.setCursor(_this.manager.cursor);
|
|
7623
|
+
_this.setCursor(_this.manager.cursor, _this.manager.cursorTarget);
|
|
7630
7624
|
}, this.onWheel = function (nativeEvent) {
|
|
7631
7625
|
var wheelEvent = _this.normalizeWheelEvent(nativeEvent);
|
|
7632
7626
|
_this.manager.mapEvent(wheelEvent);
|
|
@@ -7653,8 +7647,9 @@
|
|
|
7653
7647
|
}
|
|
7654
7648
|
}, {
|
|
7655
7649
|
key: "setCursor",
|
|
7656
|
-
value: function setCursor() {
|
|
7657
|
-
|
|
7650
|
+
value: function setCursor(mode, target) {
|
|
7651
|
+
if (!target && !this.manager.rootTarget.window._handler.canvas.controled) return;
|
|
7652
|
+
mode || (mode = "default");
|
|
7658
7653
|
var applyStyles = this.applyStyles,
|
|
7659
7654
|
domElement = this.domElement;
|
|
7660
7655
|
if (this.currentCursor === mode) return;
|
|
@@ -10619,7 +10614,6 @@
|
|
|
10619
10614
|
return res;
|
|
10620
10615
|
};
|
|
10621
10616
|
|
|
10622
|
-
var Color = Color$1;
|
|
10623
10617
|
function colorEqual(color1, color2) {
|
|
10624
10618
|
var c1 = Color.parseColorString(color1),
|
|
10625
10619
|
c2 = Color.parseColorString(color2);
|
|
@@ -12877,7 +12871,7 @@
|
|
|
12877
12871
|
var VirtualLayerHandlerContribution = Symbol["for"]("VirtualLayerHandlerContribution");
|
|
12878
12872
|
|
|
12879
12873
|
var _DefaultLayerService_,
|
|
12880
|
-
__decorate$
|
|
12874
|
+
__decorate$1z = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
12881
12875
|
var d,
|
|
12882
12876
|
c = arguments.length,
|
|
12883
12877
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -12970,9 +12964,9 @@
|
|
|
12970
12964
|
}]);
|
|
12971
12965
|
return DefaultLayerService_1;
|
|
12972
12966
|
}();
|
|
12973
|
-
exports.DefaultLayerService.idprefix = "visactor_layer", exports.DefaultLayerService.prefix_count = 0, exports.DefaultLayerService = _DefaultLayerService_ = __decorate$
|
|
12967
|
+
exports.DefaultLayerService.idprefix = "visactor_layer", exports.DefaultLayerService.prefix_count = 0, exports.DefaultLayerService = _DefaultLayerService_ = __decorate$1z([injectable(), __metadata$1c("design:paramtypes", [])], exports.DefaultLayerService);
|
|
12974
12968
|
|
|
12975
|
-
var __decorate$
|
|
12969
|
+
var __decorate$1y = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
12976
12970
|
var d,
|
|
12977
12971
|
c = arguments.length,
|
|
12978
12972
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -13132,7 +13126,7 @@
|
|
|
13132
13126
|
}]);
|
|
13133
13127
|
return DefaultWindow;
|
|
13134
13128
|
}();
|
|
13135
|
-
exports.DefaultWindow = __decorate$
|
|
13129
|
+
exports.DefaultWindow = __decorate$1y([injectable(), __metadata$1b("design:paramtypes", [])], exports.DefaultWindow);
|
|
13136
13130
|
|
|
13137
13131
|
var coreModule = new ContainerModule(function (bind) {
|
|
13138
13132
|
bind(VGlobal).to(exports.DefaultGlobal).inSingletonScope(), bind(VWindow).to(exports.DefaultWindow), bind(GraphicUtil).to(exports.DefaultGraphicUtil).inSingletonScope(), bind(TransformUtil).to(exports.DefaultTransformUtil).inSingletonScope(), bind(LayerService).to(exports.DefaultLayerService).inSingletonScope();
|
|
@@ -13707,7 +13701,7 @@
|
|
|
13707
13701
|
var _a;
|
|
13708
13702
|
var attribute = this.attribute,
|
|
13709
13703
|
textTheme = getTheme(this).text;
|
|
13710
|
-
if (
|
|
13704
|
+
if (this.isMultiLine) return;
|
|
13711
13705
|
var _attribute$maxLineWid = attribute.maxLineWidth,
|
|
13712
13706
|
maxLineWidth = _attribute$maxLineWid === void 0 ? textTheme.maxLineWidth : _attribute$maxLineWid;
|
|
13713
13707
|
return Number.isFinite(maxLineWidth) ? (this.tryUpdateAABBBounds(), this.cache.clipedText) : (null !== (_a = attribute.text) && void 0 !== _a ? _a : textTheme.text).toString();
|
|
@@ -13715,14 +13709,14 @@
|
|
|
13715
13709
|
}, {
|
|
13716
13710
|
key: "clipedWidth",
|
|
13717
13711
|
get: function get() {
|
|
13718
|
-
if (!
|
|
13712
|
+
if (!this.isMultiLine) return this.tryUpdateAABBBounds(), this.cache.clipedWidth;
|
|
13719
13713
|
}
|
|
13720
13714
|
}, {
|
|
13721
13715
|
key: "cliped",
|
|
13722
13716
|
get: function get() {
|
|
13723
13717
|
var textTheme = getTheme(this).text,
|
|
13724
13718
|
attribute = this.attribute;
|
|
13725
|
-
if (
|
|
13719
|
+
if (this.isMultiLine) return;
|
|
13726
13720
|
var _attribute$maxLineWid2 = attribute.maxLineWidth,
|
|
13727
13721
|
maxLineWidth = _attribute$maxLineWid2 === void 0 ? textTheme.maxLineWidth : _attribute$maxLineWid2;
|
|
13728
13722
|
return !!Number.isFinite(maxLineWidth) && (this.tryUpdateAABBBounds(), this.clipedText !== attribute.text.toString());
|
|
@@ -13730,7 +13724,12 @@
|
|
|
13730
13724
|
}, {
|
|
13731
13725
|
key: "multilineLayout",
|
|
13732
13726
|
get: function get() {
|
|
13733
|
-
if (
|
|
13727
|
+
if (this.isMultiLine) return this.tryUpdateAABBBounds(), this.cache.layoutData;
|
|
13728
|
+
}
|
|
13729
|
+
}, {
|
|
13730
|
+
key: "isMultiLine",
|
|
13731
|
+
get: function get() {
|
|
13732
|
+
return Array.isArray(this.attribute.text) || "normal" === this.attribute.whiteSpace;
|
|
13734
13733
|
}
|
|
13735
13734
|
}, {
|
|
13736
13735
|
key: "isValid",
|
|
@@ -17337,7 +17336,7 @@
|
|
|
17337
17336
|
var matrixAllocate = new DefaultMatrixAllocate();
|
|
17338
17337
|
var mat4Allocate = new DefaultMat4Allocate();
|
|
17339
17338
|
|
|
17340
|
-
var __decorate$
|
|
17339
|
+
var __decorate$1x = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17341
17340
|
var d,
|
|
17342
17341
|
c = arguments.length,
|
|
17343
17342
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -18055,7 +18054,7 @@
|
|
|
18055
18054
|
}]);
|
|
18056
18055
|
return DefaultGraphicService;
|
|
18057
18056
|
}();
|
|
18058
|
-
exports.DefaultGraphicService = __decorate$
|
|
18057
|
+
exports.DefaultGraphicService = __decorate$1x([injectable(), __param$P(0, inject(GraphicCreator$1)), __metadata$1a("design:paramtypes", [Object])], exports.DefaultGraphicService);
|
|
18059
18058
|
|
|
18060
18059
|
var GraphicCreator = /*#__PURE__*/function () {
|
|
18061
18060
|
function GraphicCreator() {
|
|
@@ -18343,7 +18342,7 @@
|
|
|
18343
18342
|
}), canvasGradient.GetPattern(w + x, h + y, undefined);
|
|
18344
18343
|
}
|
|
18345
18344
|
|
|
18346
|
-
var __decorate$
|
|
18345
|
+
var __decorate$1w = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
18347
18346
|
var d,
|
|
18348
18347
|
c = arguments.length,
|
|
18349
18348
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -18414,7 +18413,7 @@
|
|
|
18414
18413
|
}]);
|
|
18415
18414
|
return DefaultBaseInteractiveRenderContribution;
|
|
18416
18415
|
}();
|
|
18417
|
-
exports.DefaultBaseInteractiveRenderContribution = __decorate$
|
|
18416
|
+
exports.DefaultBaseInteractiveRenderContribution = __decorate$1w([injectable(), __param$O(0, inject(ContributionProvider)), __param$O(0, named(InteractiveSubRenderContribution)), __metadata$19("design:paramtypes", [Object])], exports.DefaultBaseInteractiveRenderContribution);
|
|
18418
18417
|
var DefaultBaseTextureRenderContribution = /*#__PURE__*/function () {
|
|
18419
18418
|
function DefaultBaseTextureRenderContribution() {
|
|
18420
18419
|
_classCallCheck(this, DefaultBaseTextureRenderContribution);
|
|
@@ -18858,6 +18857,13 @@
|
|
|
18858
18857
|
}
|
|
18859
18858
|
var defaultImageBackgroundRenderContribution = new DefaultImageBackgroundRenderContribution();
|
|
18860
18859
|
|
|
18860
|
+
var __decorate$1v = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
18861
|
+
var d,
|
|
18862
|
+
c = arguments.length,
|
|
18863
|
+
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
18864
|
+
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);
|
|
18865
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
18866
|
+
};
|
|
18861
18867
|
var DefaultRectRenderContribution = /*#__PURE__*/function () {
|
|
18862
18868
|
function DefaultRectRenderContribution() {
|
|
18863
18869
|
_classCallCheck(this, DefaultRectRenderContribution);
|
|
@@ -18925,7 +18931,7 @@
|
|
|
18925
18931
|
}]);
|
|
18926
18932
|
return DefaultRectRenderContribution;
|
|
18927
18933
|
}();
|
|
18928
|
-
|
|
18934
|
+
exports.SplitRectBeforeRenderContribution = /*#__PURE__*/function () {
|
|
18929
18935
|
function SplitRectBeforeRenderContribution() {
|
|
18930
18936
|
_classCallCheck(this, SplitRectBeforeRenderContribution);
|
|
18931
18937
|
this.time = exports.BaseRenderContributionTime.beforeFillStroke, this.useStyle = !0, this.order = 0;
|
|
@@ -18942,7 +18948,8 @@
|
|
|
18942
18948
|
}]);
|
|
18943
18949
|
return SplitRectBeforeRenderContribution;
|
|
18944
18950
|
}();
|
|
18945
|
-
|
|
18951
|
+
exports.SplitRectBeforeRenderContribution = __decorate$1v([injectable()], exports.SplitRectBeforeRenderContribution);
|
|
18952
|
+
exports.SplitRectAfterRenderContribution = /*#__PURE__*/function () {
|
|
18946
18953
|
function SplitRectAfterRenderContribution() {
|
|
18947
18954
|
_classCallCheck(this, SplitRectAfterRenderContribution);
|
|
18948
18955
|
this.time = exports.BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
|
|
@@ -18970,9 +18977,8 @@
|
|
|
18970
18977
|
}]);
|
|
18971
18978
|
return SplitRectAfterRenderContribution;
|
|
18972
18979
|
}();
|
|
18980
|
+
exports.SplitRectAfterRenderContribution = __decorate$1v([injectable()], exports.SplitRectAfterRenderContribution);
|
|
18973
18981
|
var defaultRectRenderContribution = new DefaultRectRenderContribution();
|
|
18974
|
-
var splitRectBeforeRenderContribution = new SplitRectBeforeRenderContribution();
|
|
18975
|
-
var splitRectAfterRenderContribution = new SplitRectAfterRenderContribution();
|
|
18976
18982
|
var defaultRectTextureRenderContribution = defaultBaseTextureRenderContribution;
|
|
18977
18983
|
var defaultRectBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
|
|
18978
18984
|
|
|
@@ -20161,7 +20167,7 @@
|
|
|
20161
20167
|
function DefaultCanvasRectRender(rectRenderContribitions) {
|
|
20162
20168
|
var _this;
|
|
20163
20169
|
_classCallCheck(this, DefaultCanvasRectRender);
|
|
20164
|
-
_this = _super.call(this), _this.rectRenderContribitions = rectRenderContribitions, _this.type = "rect", _this.numberType = RECT_NUMBER_TYPE, _this.builtinContributions = [defaultRectRenderContribution, defaultRectBackgroundRenderContribution, defaultRectTextureRenderContribution
|
|
20170
|
+
_this = _super.call(this), _this.rectRenderContribitions = rectRenderContribitions, _this.type = "rect", _this.numberType = RECT_NUMBER_TYPE, _this.builtinContributions = [defaultRectRenderContribution, defaultRectBackgroundRenderContribution, defaultRectTextureRenderContribution], _this.init(rectRenderContribitions);
|
|
20165
20171
|
return _this;
|
|
20166
20172
|
}
|
|
20167
20173
|
_createClass(DefaultCanvasRectRender, [{
|
|
@@ -20366,9 +20372,9 @@
|
|
|
20366
20372
|
var _this2 = this;
|
|
20367
20373
|
var _a, _b, _c;
|
|
20368
20374
|
var textAttribute = getTheme(text, null == params ? void 0 : params.theme).text,
|
|
20369
|
-
_text$attribute = text.attribute
|
|
20370
|
-
|
|
20371
|
-
_text$attribute$under = _text$attribute.underline,
|
|
20375
|
+
_text$attribute = text.attribute;
|
|
20376
|
+
_text$attribute.text;
|
|
20377
|
+
var _text$attribute$under = _text$attribute.underline,
|
|
20372
20378
|
underline = _text$attribute$under === void 0 ? textAttribute.underline : _text$attribute$under,
|
|
20373
20379
|
_text$attribute$lineT = _text$attribute.lineThrough,
|
|
20374
20380
|
lineThrough = _text$attribute$lineT === void 0 ? textAttribute.lineThrough : _text$attribute$lineT,
|
|
@@ -20376,7 +20382,9 @@
|
|
|
20376
20382
|
keepDirIn3d = _text$attribute$keepD === void 0 ? textAttribute.keepDirIn3d : _text$attribute$keepD,
|
|
20377
20383
|
_text$attribute$direc = _text$attribute.direction,
|
|
20378
20384
|
direction = _text$attribute$direc === void 0 ? textAttribute.direction : _text$attribute$direc,
|
|
20379
|
-
_text$attribute$
|
|
20385
|
+
_text$attribute$white = _text$attribute.whiteSpace;
|
|
20386
|
+
_text$attribute$white === void 0 ? textAttribute.whiteSpace : _text$attribute$white;
|
|
20387
|
+
var _text$attribute$fontS = _text$attribute.fontSize,
|
|
20380
20388
|
fontSize = _text$attribute$fontS === void 0 ? textAttribute.fontSize : _text$attribute$fontS,
|
|
20381
20389
|
_text$attribute$verti = _text$attribute.verticalMode,
|
|
20382
20390
|
verticalMode = _text$attribute$verti === void 0 ? textAttribute.verticalMode : _text$attribute$verti,
|
|
@@ -20413,7 +20421,7 @@
|
|
|
20413
20421
|
}
|
|
20414
20422
|
doStroke && (strokeCb ? strokeCb(context, text.attribute, textAttribute) : sVisible && (context.setStrokeStyle(text, text.attribute, originX - x, originY - y, textAttribute), context.strokeText(t, _x, _y, z))), doFill && (fillCb ? fillCb(context, text.attribute, textAttribute) : fVisible && (context.setCommonStyle(text, text.attribute, originX - x, originY - y, textAttribute), context.fillText(t, _x, _y, z), _this2.drawUnderLine(underline, lineThrough, text, _x, _y, z, textAttribute, context))), direction && (context.highPerformanceRestore(), context.setTransformForCurrent());
|
|
20415
20423
|
};
|
|
20416
|
-
if (
|
|
20424
|
+
if (text.isMultiLine) {
|
|
20417
20425
|
if (context.setTextStyleWithoutAlignBaseline(text.attribute, textAttribute, z), "horizontal" === direction) {
|
|
20418
20426
|
var multilineLayout = text.multilineLayout;
|
|
20419
20427
|
if (!multilineLayout) return void context.highPerformanceRestore();
|
|
@@ -21071,6 +21079,11 @@
|
|
|
21071
21079
|
value: function register(plugin) {
|
|
21072
21080
|
"onStartupFinished" === plugin.activeEvent ? this.onStartupFinishedPlugin.push(plugin) : "onRegister" === plugin.activeEvent && (this.onRegisterPlugin.push(plugin), plugin.activate(this));
|
|
21073
21081
|
}
|
|
21082
|
+
}, {
|
|
21083
|
+
key: "unRegister",
|
|
21084
|
+
value: function unRegister(plugin) {
|
|
21085
|
+
"onStartupFinished" === plugin.activeEvent ? this.onStartupFinishedPlugin.splice(this.onStartupFinishedPlugin.indexOf(plugin), 1) : "onRegister" === plugin.activeEvent && this.onRegisterPlugin.splice(this.onStartupFinishedPlugin.indexOf(plugin), 1), plugin.deactivate(this);
|
|
21086
|
+
}
|
|
21074
21087
|
}, {
|
|
21075
21088
|
key: "release",
|
|
21076
21089
|
value: function release() {
|
|
@@ -23543,7 +23556,7 @@
|
|
|
23543
23556
|
value: function disableView3dTranform() {
|
|
23544
23557
|
var _this2 = this;
|
|
23545
23558
|
this.view3dTranform && (this.view3dTranform = !1, this.pluginService.findPluginsByName("ViewTransform3dPlugin").forEach(function (plugin) {
|
|
23546
|
-
|
|
23559
|
+
_this2.pluginService.unRegister(plugin);
|
|
23547
23560
|
}));
|
|
23548
23561
|
}
|
|
23549
23562
|
}, {
|
|
@@ -23556,7 +23569,7 @@
|
|
|
23556
23569
|
value: function disableAutoRender() {
|
|
23557
23570
|
var _this3 = this;
|
|
23558
23571
|
this.autoRender && (this.autoRender = !1, this.pluginService.findPluginsByName("AutoRenderPlugin").forEach(function (plugin) {
|
|
23559
|
-
|
|
23572
|
+
_this3.pluginService.unRegister(plugin);
|
|
23560
23573
|
}));
|
|
23561
23574
|
}
|
|
23562
23575
|
}, {
|
|
@@ -23569,7 +23582,7 @@
|
|
|
23569
23582
|
value: function disableIncrementalAutoRender() {
|
|
23570
23583
|
var _this4 = this;
|
|
23571
23584
|
this.increaseAutoRender && (this.increaseAutoRender = !1, this.pluginService.findPluginsByName("IncrementalAutoRenderPlugin").forEach(function (plugin) {
|
|
23572
|
-
|
|
23585
|
+
_this4.pluginService.unRegister(plugin);
|
|
23573
23586
|
}));
|
|
23574
23587
|
}
|
|
23575
23588
|
}, {
|
|
@@ -23585,7 +23598,7 @@
|
|
|
23585
23598
|
value: function disableDirtyBounds() {
|
|
23586
23599
|
var _this5 = this;
|
|
23587
23600
|
this.dirtyBounds && (this.dirtyBounds = null, this.pluginService.findPluginsByName("DirtyBoundsPlugin").forEach(function (plugin) {
|
|
23588
|
-
|
|
23601
|
+
_this5.pluginService.unRegister(plugin);
|
|
23589
23602
|
}));
|
|
23590
23603
|
}
|
|
23591
23604
|
}, {
|
|
@@ -23598,7 +23611,7 @@
|
|
|
23598
23611
|
value: function disableLayout() {
|
|
23599
23612
|
var _this6 = this;
|
|
23600
23613
|
this._enableLayout && (this._enableLayout = !1, this.pluginService.findPluginsByName("FlexLayoutPlugin").forEach(function (plugin) {
|
|
23601
|
-
|
|
23614
|
+
_this6.pluginService.unRegister(plugin);
|
|
23602
23615
|
}));
|
|
23603
23616
|
}
|
|
23604
23617
|
}, {
|
|
@@ -23611,7 +23624,7 @@
|
|
|
23611
23624
|
value: function disableHtmlAttribute() {
|
|
23612
23625
|
var _this7 = this;
|
|
23613
23626
|
this.htmlAttribute && (this.htmlAttribute = !1, this.pluginService.findPluginsByName("HtmlAttributePlugin").forEach(function (plugin) {
|
|
23614
|
-
|
|
23627
|
+
_this7.pluginService.unRegister(plugin);
|
|
23615
23628
|
}));
|
|
23616
23629
|
}
|
|
23617
23630
|
}, {
|
|
@@ -23861,7 +23874,7 @@
|
|
|
23861
23874
|
}, {
|
|
23862
23875
|
key: "setCursor",
|
|
23863
23876
|
value: function setCursor(mode) {
|
|
23864
|
-
this._cursor = mode, this.eventSystem.setCursor(mode);
|
|
23877
|
+
this._cursor = mode, this.eventSystem.setCursor(mode, "ignore");
|
|
23865
23878
|
}
|
|
23866
23879
|
}, {
|
|
23867
23880
|
key: "getCursor",
|
|
@@ -25047,7 +25060,7 @@
|
|
|
25047
25060
|
|
|
25048
25061
|
var loadRectModule = !1;
|
|
25049
25062
|
var rectModule = new ContainerModule(function (bind) {
|
|
25050
|
-
loadRectModule || (loadRectModule = !0, bind(exports.DefaultCanvasRectRender).toSelf().inSingletonScope(), bind(RectRender).to(exports.DefaultCanvasRectRender).inSingletonScope(), bind(GraphicRender).toService(RectRender), bind(RectRenderContribution).toService(exports.DefaultBaseInteractiveRenderContribution), bindContributionProvider(bind, RectRenderContribution));
|
|
25063
|
+
loadRectModule || (loadRectModule = !0, bind(exports.DefaultCanvasRectRender).toSelf().inSingletonScope(), bind(RectRender).to(exports.DefaultCanvasRectRender).inSingletonScope(), bind(GraphicRender).toService(RectRender), bind(exports.SplitRectAfterRenderContribution).toSelf(), bind(exports.SplitRectBeforeRenderContribution).toSelf(), bind(RectRenderContribution).toService(exports.SplitRectAfterRenderContribution), bind(RectRenderContribution).toService(exports.SplitRectBeforeRenderContribution), bind(RectRenderContribution).toService(exports.DefaultBaseInteractiveRenderContribution), bindContributionProvider(bind, RectRenderContribution));
|
|
25051
25064
|
});
|
|
25052
25065
|
|
|
25053
25066
|
var loadLineModule = !1;
|
|
@@ -34346,7 +34359,7 @@
|
|
|
34346
34359
|
|
|
34347
34360
|
var roughModule = _roughModule;
|
|
34348
34361
|
|
|
34349
|
-
const version = "0.17.
|
|
34362
|
+
const version = "0.17.6";
|
|
34350
34363
|
if (isBrowserEnv()) {
|
|
34351
34364
|
loadBrowserEnv(container);
|
|
34352
34365
|
}
|
|
@@ -34568,8 +34581,6 @@
|
|
|
34568
34581
|
exports.SYMBOL_NUMBER_TYPE = SYMBOL_NUMBER_TYPE;
|
|
34569
34582
|
exports.SegContext = SegContext;
|
|
34570
34583
|
exports.ShadowRoot = ShadowRoot;
|
|
34571
|
-
exports.SplitRectAfterRenderContribution = SplitRectAfterRenderContribution;
|
|
34572
|
-
exports.SplitRectBeforeRenderContribution = SplitRectBeforeRenderContribution;
|
|
34573
34584
|
exports.Stage = Stage;
|
|
34574
34585
|
exports.StaticLayerHandlerContribution = StaticLayerHandlerContribution;
|
|
34575
34586
|
exports.Step = Step$1;
|
|
@@ -34884,8 +34895,6 @@
|
|
|
34884
34895
|
exports.splitPath = splitPath;
|
|
34885
34896
|
exports.splitPolygon = splitPolygon;
|
|
34886
34897
|
exports.splitRect = splitRect;
|
|
34887
|
-
exports.splitRectAfterRenderContribution = splitRectAfterRenderContribution;
|
|
34888
|
-
exports.splitRectBeforeRenderContribution = splitRectBeforeRenderContribution;
|
|
34889
34898
|
exports.splitToGrids = splitToGrids;
|
|
34890
34899
|
exports.strCommandMap = strCommandMap;
|
|
34891
34900
|
exports.strokeVisible = strokeVisible;
|