@visactor/vrender 0.15.0-alpha.2 → 0.15.0-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/animate/animate.d.ts +1 -0
- package/cjs/animate/animate.js +3 -0
- package/cjs/animate/animate.js.map +1 -1
- package/cjs/animate/default-ticker.js +1 -1
- package/cjs/animate/default-ticker.js.map +1 -1
- package/cjs/animate/timeline.d.ts +1 -1
- package/cjs/animate/timeline.js +2 -2
- package/cjs/animate/timeline.js.map +1 -1
- package/cjs/canvas/contributions/browser/context.d.ts +1 -0
- package/cjs/common/enums.d.ts +4 -2
- package/cjs/common/enums.js +3 -2
- package/cjs/common/enums.js.map +1 -1
- package/cjs/core/contributions/window/base-contribution.d.ts +2 -0
- package/cjs/core/contributions/window/base-contribution.js +4 -0
- package/cjs/core/contributions/window/base-contribution.js.map +1 -1
- package/cjs/core/contributions/window/browser-contribution.d.ts +7 -0
- package/cjs/core/contributions/window/browser-contribution.js +26 -2
- package/cjs/core/contributions/window/browser-contribution.js.map +1 -1
- package/cjs/core/stage.d.ts +6 -1
- package/cjs/core/stage.js +24 -9
- package/cjs/core/stage.js.map +1 -1
- package/cjs/core/window.d.ts +2 -0
- package/cjs/core/window.js +6 -0
- package/cjs/core/window.js.map +1 -1
- package/cjs/event/event-manager.js +6 -4
- package/cjs/event/event-manager.js.map +1 -1
- package/cjs/graphic/arc.d.ts +7 -0
- package/cjs/graphic/arc.js +3 -1
- package/cjs/graphic/arc.js.map +1 -1
- package/cjs/graphic/config.js +4 -2
- package/cjs/graphic/config.js.map +1 -1
- package/cjs/graphic/graphic.d.ts +3 -0
- package/cjs/graphic/graphic.js +34 -17
- package/cjs/graphic/graphic.js.map +1 -1
- package/cjs/graphic/group.js +1 -1
- package/cjs/graphic/group.js.map +1 -1
- package/cjs/graphic/text.js +21 -12
- package/cjs/graphic/text.js.map +1 -1
- package/cjs/graphic/wrap-text.js +11 -7
- package/cjs/graphic/wrap-text.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/interface/animate.d.ts +3 -1
- package/cjs/interface/animate.js.map +1 -1
- package/cjs/interface/graphic/arc.d.ts +2 -0
- package/cjs/interface/graphic/arc.js.map +1 -1
- package/cjs/interface/graphic/image.d.ts +1 -0
- package/cjs/interface/graphic/image.js.map +1 -1
- package/cjs/interface/graphic/text.d.ts +1 -0
- package/cjs/interface/graphic/text.js.map +1 -1
- package/cjs/interface/graphic.d.ts +12 -2
- package/cjs/interface/graphic.js.map +1 -1
- package/cjs/interface/stage.d.ts +6 -1
- package/cjs/interface/stage.js.map +1 -1
- package/cjs/interface/window.d.ts +4 -0
- package/cjs/interface/window.js.map +1 -1
- package/cjs/jsx/graphicType.d.ts +2 -3
- package/cjs/jsx/graphicType.js.map +1 -1
- package/cjs/jsx/jsx-classic.js +4 -3
- package/cjs/jsx/jsx-classic.js.map +1 -1
- package/cjs/plugins/builtin-plugin/flex-layout-plugin.d.ts +2 -0
- package/cjs/plugins/builtin-plugin/flex-layout-plugin.js +42 -21
- package/cjs/plugins/builtin-plugin/flex-layout-plugin.js.map +1 -1
- package/cjs/render/contributions/render/arc-render.js +9 -2
- package/cjs/render/contributions/render/arc-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/arc-contribution-render.js +9 -7
- package/cjs/render/contributions/render/contributions/arc-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/circle-contribution-render.js +9 -7
- package/cjs/render/contributions/render/contributions/circle-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/image-contribution-render.js +23 -1
- package/cjs/render/contributions/render/contributions/image-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/rect-contribution-render.js +9 -7
- package/cjs/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/symbol-contribution-render.js +24 -22
- package/cjs/render/contributions/render/contributions/symbol-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/image-render.js +7 -3
- package/cjs/render/contributions/render/image-render.js.map +1 -1
- package/cjs/render/contributions/render/utils.d.ts +2 -2
- package/cjs/render/contributions/render/utils.js.map +1 -1
- package/dist/index.js +768 -672
- package/dist/index.min.js +1 -1
- package/es/animate/animate.d.ts +1 -0
- package/es/animate/animate.js +3 -0
- package/es/animate/animate.js.map +1 -1
- package/es/animate/default-ticker.js +1 -1
- package/es/animate/default-ticker.js.map +1 -1
- package/es/animate/timeline.d.ts +1 -1
- package/es/animate/timeline.js +2 -2
- package/es/animate/timeline.js.map +1 -1
- package/es/canvas/contributions/browser/context.d.ts +1 -0
- package/es/common/enums.d.ts +4 -2
- package/es/common/enums.js +3 -2
- package/es/common/enums.js.map +1 -1
- package/es/core/contributions/window/base-contribution.d.ts +2 -0
- package/es/core/contributions/window/base-contribution.js +4 -0
- package/es/core/contributions/window/base-contribution.js.map +1 -1
- package/es/core/contributions/window/browser-contribution.d.ts +7 -0
- package/es/core/contributions/window/browser-contribution.js +26 -2
- package/es/core/contributions/window/browser-contribution.js.map +1 -1
- package/es/core/stage.d.ts +6 -1
- package/es/core/stage.js +25 -8
- package/es/core/stage.js.map +1 -1
- package/es/core/window.d.ts +2 -0
- package/es/core/window.js +6 -0
- package/es/core/window.js.map +1 -1
- package/es/event/event-manager.js +6 -4
- package/es/event/event-manager.js.map +1 -1
- package/es/graphic/arc.d.ts +7 -0
- package/es/graphic/arc.js +3 -1
- package/es/graphic/arc.js.map +1 -1
- package/es/graphic/config.js +4 -2
- package/es/graphic/config.js.map +1 -1
- package/es/graphic/graphic.d.ts +3 -0
- package/es/graphic/graphic.js +35 -18
- package/es/graphic/graphic.js.map +1 -1
- package/es/graphic/group.js +1 -1
- package/es/graphic/group.js.map +1 -1
- package/es/graphic/text.js +21 -12
- package/es/graphic/text.js.map +1 -1
- package/es/graphic/wrap-text.js +11 -7
- package/es/graphic/wrap-text.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/interface/animate.d.ts +3 -1
- package/es/interface/animate.js.map +1 -1
- package/es/interface/graphic/arc.d.ts +2 -0
- package/es/interface/graphic/arc.js.map +1 -1
- package/es/interface/graphic/image.d.ts +1 -0
- package/es/interface/graphic/image.js.map +1 -1
- package/es/interface/graphic/text.d.ts +1 -0
- package/es/interface/graphic/text.js.map +1 -1
- package/es/interface/graphic.d.ts +12 -2
- package/es/interface/graphic.js.map +1 -1
- package/es/interface/stage.d.ts +6 -1
- package/es/interface/stage.js.map +1 -1
- package/es/interface/window.d.ts +4 -0
- package/es/interface/window.js.map +1 -1
- package/es/jsx/graphicType.d.ts +2 -3
- package/es/jsx/graphicType.js.map +1 -1
- package/es/jsx/jsx-classic.js +4 -3
- package/es/jsx/jsx-classic.js.map +1 -1
- package/es/plugins/builtin-plugin/flex-layout-plugin.d.ts +2 -0
- package/es/plugins/builtin-plugin/flex-layout-plugin.js +47 -20
- package/es/plugins/builtin-plugin/flex-layout-plugin.js.map +1 -1
- package/es/render/contributions/render/arc-render.js +10 -3
- package/es/render/contributions/render/arc-render.js.map +1 -1
- package/es/render/contributions/render/contributions/arc-contribution-render.js +9 -7
- package/es/render/contributions/render/contributions/arc-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/circle-contribution-render.js +9 -7
- package/es/render/contributions/render/contributions/circle-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/image-contribution-render.js +27 -0
- package/es/render/contributions/render/contributions/image-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/rect-contribution-render.js +9 -7
- package/es/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
- package/es/render/contributions/render/contributions/symbol-contribution-render.js +22 -20
- package/es/render/contributions/render/contributions/symbol-contribution-render.js.map +1 -1
- package/es/render/contributions/render/image-render.js +10 -2
- package/es/render/contributions/render/image-render.js.map +1 -1
- package/es/render/contributions/render/utils.d.ts +2 -2
- package/es/render/contributions/render/utils.js.map +1 -1
- package/es/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -3712,7 +3712,7 @@
|
|
|
3712
3712
|
return Array.isArray(object) && object.some(isPromise);
|
|
3713
3713
|
}
|
|
3714
3714
|
|
|
3715
|
-
var __awaiter$
|
|
3715
|
+
var __awaiter$4 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
3716
3716
|
function adopt(value) {
|
|
3717
3717
|
return value instanceof P ? value : new P(function (resolve) {
|
|
3718
3718
|
resolve(value);
|
|
@@ -3857,7 +3857,7 @@
|
|
|
3857
3857
|
}
|
|
3858
3858
|
};
|
|
3859
3859
|
var _saveAsyncResultToSingletonScope = function _saveAsyncResultToSingletonScope(binding, asyncResult) {
|
|
3860
|
-
return __awaiter$
|
|
3860
|
+
return __awaiter$4(void 0, void 0, void 0, function () {
|
|
3861
3861
|
var result, ex_1;
|
|
3862
3862
|
return __generator$3(this, function (_a) {
|
|
3863
3863
|
switch (_a.label) {
|
|
@@ -3945,7 +3945,7 @@
|
|
|
3945
3945
|
};
|
|
3946
3946
|
return __assign$1.apply(this, arguments);
|
|
3947
3947
|
};
|
|
3948
|
-
var __awaiter$
|
|
3948
|
+
var __awaiter$3 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
3949
3949
|
function adopt(value) {
|
|
3950
3950
|
return value instanceof P ? value : new P(function (resolve) {
|
|
3951
3951
|
resolve(value);
|
|
@@ -4118,7 +4118,7 @@
|
|
|
4118
4118
|
return instance;
|
|
4119
4119
|
}
|
|
4120
4120
|
function createInstanceWithInjectionsAsync(args) {
|
|
4121
|
-
return __awaiter$
|
|
4121
|
+
return __awaiter$3(this, void 0, void 0, function () {
|
|
4122
4122
|
var constructorInjections, propertyInjections;
|
|
4123
4123
|
return __generator$2(this, function (_a) {
|
|
4124
4124
|
switch (_a.label) {
|
|
@@ -4138,7 +4138,7 @@
|
|
|
4138
4138
|
});
|
|
4139
4139
|
}
|
|
4140
4140
|
function possiblyWaitInjections(possiblePromiseinjections) {
|
|
4141
|
-
return __awaiter$
|
|
4141
|
+
return __awaiter$3(this, void 0, void 0, function () {
|
|
4142
4142
|
var injections, _i, possiblePromiseinjections_1, injection;
|
|
4143
4143
|
return __generator$2(this, function (_a) {
|
|
4144
4144
|
injections = [];
|
|
@@ -4201,7 +4201,7 @@
|
|
|
4201
4201
|
}
|
|
4202
4202
|
}
|
|
4203
4203
|
|
|
4204
|
-
var __awaiter$
|
|
4204
|
+
var __awaiter$2 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
4205
4205
|
function adopt(value) {
|
|
4206
4206
|
return value instanceof P ? value : new P(function (resolve) {
|
|
4207
4207
|
resolve(value);
|
|
@@ -4427,7 +4427,7 @@
|
|
|
4427
4427
|
return result;
|
|
4428
4428
|
};
|
|
4429
4429
|
var _activateContainerAsync = function _activateContainerAsync(activationsIterator, context, resultPromise) {
|
|
4430
|
-
return __awaiter$
|
|
4430
|
+
return __awaiter$2(void 0, void 0, void 0, function () {
|
|
4431
4431
|
var result, activation;
|
|
4432
4432
|
return __generator$1(this, function (_a) {
|
|
4433
4433
|
switch (_a.label) {
|
|
@@ -5041,7 +5041,7 @@
|
|
|
5041
5041
|
};
|
|
5042
5042
|
return __assign.apply(this, arguments);
|
|
5043
5043
|
};
|
|
5044
|
-
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
5044
|
+
var __awaiter$1 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
5045
5045
|
function adopt(value) {
|
|
5046
5046
|
return value instanceof P ? value : new P(function (resolve) {
|
|
5047
5047
|
resolve(value);
|
|
@@ -5240,7 +5240,7 @@
|
|
|
5240
5240
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
5241
5241
|
modules[_i] = arguments[_i];
|
|
5242
5242
|
}
|
|
5243
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
5243
|
+
return __awaiter$1(this, void 0, void 0, function () {
|
|
5244
5244
|
var getHelpers, _a, modules_2, currentModule, containerModuleHelpers;
|
|
5245
5245
|
return __generator(this, function (_b) {
|
|
5246
5246
|
switch (_b.label) {
|
|
@@ -5282,7 +5282,7 @@
|
|
|
5282
5282
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
5283
5283
|
modules[_i] = arguments[_i];
|
|
5284
5284
|
}
|
|
5285
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
5285
|
+
return __awaiter$1(this, void 0, void 0, function () {
|
|
5286
5286
|
var _a, modules_3, module_1, deactivations;
|
|
5287
5287
|
return __generator(this, function (_b) {
|
|
5288
5288
|
switch (_b.label) {
|
|
@@ -5318,7 +5318,7 @@
|
|
|
5318
5318
|
return this.bind(serviceIdentifier);
|
|
5319
5319
|
};
|
|
5320
5320
|
Container.prototype.rebindAsync = function (serviceIdentifier) {
|
|
5321
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
5321
|
+
return __awaiter$1(this, void 0, void 0, function () {
|
|
5322
5322
|
return __generator(this, function (_a) {
|
|
5323
5323
|
switch (_a.label) {
|
|
5324
5324
|
case 0:
|
|
@@ -5338,7 +5338,7 @@
|
|
|
5338
5338
|
this._removeServiceFromDictionary(serviceIdentifier);
|
|
5339
5339
|
};
|
|
5340
5340
|
Container.prototype.unbindAsync = function (serviceIdentifier) {
|
|
5341
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
5341
|
+
return __awaiter$1(this, void 0, void 0, function () {
|
|
5342
5342
|
var bindings;
|
|
5343
5343
|
return __generator(this, function (_a) {
|
|
5344
5344
|
switch (_a.label) {
|
|
@@ -5364,7 +5364,7 @@
|
|
|
5364
5364
|
this._bindingDictionary = new Lookup();
|
|
5365
5365
|
};
|
|
5366
5366
|
Container.prototype.unbindAllAsync = function () {
|
|
5367
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
5367
|
+
return __awaiter$1(this, void 0, void 0, function () {
|
|
5368
5368
|
var promises;
|
|
5369
5369
|
var _this = this;
|
|
5370
5370
|
return __generator(this, function (_a) {
|
|
@@ -5453,7 +5453,7 @@
|
|
|
5453
5453
|
return this._getButThrowIfAsync(getArgs);
|
|
5454
5454
|
};
|
|
5455
5455
|
Container.prototype.getAsync = function (serviceIdentifier) {
|
|
5456
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
5456
|
+
return __awaiter$1(this, void 0, void 0, function () {
|
|
5457
5457
|
var getArgs;
|
|
5458
5458
|
return __generator(this, function (_a) {
|
|
5459
5459
|
getArgs = this._getNotAllArgs(serviceIdentifier, false);
|
|
@@ -5466,7 +5466,7 @@
|
|
|
5466
5466
|
return this._getButThrowIfAsync(getArgs);
|
|
5467
5467
|
};
|
|
5468
5468
|
Container.prototype.getTaggedAsync = function (serviceIdentifier, key, value) {
|
|
5469
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
5469
|
+
return __awaiter$1(this, void 0, void 0, function () {
|
|
5470
5470
|
var getArgs;
|
|
5471
5471
|
return __generator(this, function (_a) {
|
|
5472
5472
|
getArgs = this._getNotAllArgs(serviceIdentifier, false, key, value);
|
|
@@ -5550,7 +5550,7 @@
|
|
|
5550
5550
|
}
|
|
5551
5551
|
};
|
|
5552
5552
|
Container.prototype._handleDeactivationError = function (asyncResult, constructor) {
|
|
5553
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
5553
|
+
return __awaiter$1(this, void 0, void 0, function () {
|
|
5554
5554
|
var ex_1;
|
|
5555
5555
|
return __generator(this, function (_a) {
|
|
5556
5556
|
switch (_a.label) {
|
|
@@ -5583,7 +5583,7 @@
|
|
|
5583
5583
|
}
|
|
5584
5584
|
};
|
|
5585
5585
|
Container.prototype._deactivateContainerAsync = function (instance, deactivationsIterator) {
|
|
5586
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
5586
|
+
return __awaiter$1(this, void 0, void 0, function () {
|
|
5587
5587
|
var deactivation;
|
|
5588
5588
|
return __generator(this, function (_a) {
|
|
5589
5589
|
switch (_a.label) {
|
|
@@ -5736,7 +5736,7 @@
|
|
|
5736
5736
|
}
|
|
5737
5737
|
};
|
|
5738
5738
|
Container.prototype._deactivateSingletonsAsync = function (bindings) {
|
|
5739
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
5739
|
+
return __awaiter$1(this, void 0, void 0, function () {
|
|
5740
5740
|
var _this = this;
|
|
5741
5741
|
return __generator(this, function (_a) {
|
|
5742
5742
|
switch (_a.label) {
|
|
@@ -5759,7 +5759,7 @@
|
|
|
5759
5759
|
}
|
|
5760
5760
|
};
|
|
5761
5761
|
Container.prototype._propagateContainerDeactivationThenBindingAndPreDestroyAsync = function (binding, instance, constructor) {
|
|
5762
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
5762
|
+
return __awaiter$1(this, void 0, void 0, function () {
|
|
5763
5763
|
return __generator(this, function (_a) {
|
|
5764
5764
|
switch (_a.label) {
|
|
5765
5765
|
case 0:
|
|
@@ -5799,7 +5799,7 @@
|
|
|
5799
5799
|
return this._preDestroy(constructor, instance);
|
|
5800
5800
|
};
|
|
5801
5801
|
Container.prototype._bindingDeactivationAndPreDestroyAsync = function (binding, instance, constructor) {
|
|
5802
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
5802
|
+
return __awaiter$1(this, void 0, void 0, function () {
|
|
5803
5803
|
return __generator(this, function (_a) {
|
|
5804
5804
|
switch (_a.label) {
|
|
5805
5805
|
case 0:
|
|
@@ -5955,6 +5955,14 @@
|
|
|
5955
5955
|
|
|
5956
5956
|
var postConstruct = propertyEventDecorator(POST_CONSTRUCT, MULTIPLE_POST_CONSTRUCT_METHODS);
|
|
5957
5957
|
|
|
5958
|
+
function __rest(s, e) {
|
|
5959
|
+
var t = {};
|
|
5960
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5961
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5962
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
5963
|
+
}
|
|
5964
|
+
return t;
|
|
5965
|
+
}
|
|
5958
5966
|
function __decorate(decorators, target, key, desc) {
|
|
5959
5967
|
var c = arguments.length,
|
|
5960
5968
|
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
@@ -5970,6 +5978,33 @@
|
|
|
5970
5978
|
function __metadata(metadataKey, metadataValue) {
|
|
5971
5979
|
if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
5972
5980
|
}
|
|
5981
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
5982
|
+
function adopt(value) {
|
|
5983
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
5984
|
+
resolve(value);
|
|
5985
|
+
});
|
|
5986
|
+
}
|
|
5987
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5988
|
+
function fulfilled(value) {
|
|
5989
|
+
try {
|
|
5990
|
+
step(generator.next(value));
|
|
5991
|
+
} catch (e) {
|
|
5992
|
+
reject(e);
|
|
5993
|
+
}
|
|
5994
|
+
}
|
|
5995
|
+
function rejected(value) {
|
|
5996
|
+
try {
|
|
5997
|
+
step(generator["throw"](value));
|
|
5998
|
+
} catch (e) {
|
|
5999
|
+
reject(e);
|
|
6000
|
+
}
|
|
6001
|
+
}
|
|
6002
|
+
function step(result) {
|
|
6003
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
6004
|
+
}
|
|
6005
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
6006
|
+
});
|
|
6007
|
+
}
|
|
5973
6008
|
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
5974
6009
|
var e = new Error(message);
|
|
5975
6010
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
@@ -6691,14 +6726,14 @@
|
|
|
6691
6726
|
return isType(value, "Date");
|
|
6692
6727
|
};
|
|
6693
6728
|
|
|
6694
|
-
var isNumber = function isNumber(value) {
|
|
6729
|
+
var isNumber$1 = function isNumber(value) {
|
|
6695
6730
|
var fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
6696
6731
|
var type = _typeof(value);
|
|
6697
6732
|
return fuzzy ? "number" === type : "number" === type || isType(value, "Number");
|
|
6698
6733
|
};
|
|
6699
6734
|
|
|
6700
6735
|
var isValidNumber = function isValidNumber(value) {
|
|
6701
|
-
return isNumber(value) && Number.isFinite(value);
|
|
6736
|
+
return isNumber$1(value) && Number.isFinite(value);
|
|
6702
6737
|
};
|
|
6703
6738
|
|
|
6704
6739
|
var isValidUrl = function isValidUrl(value) {
|
|
@@ -6834,12 +6869,12 @@
|
|
|
6834
6869
|
}, {
|
|
6835
6870
|
key: "add",
|
|
6836
6871
|
value: function add(point) {
|
|
6837
|
-
return isNumber(point) ? (this.x += point, void (this.y += point)) : (this.x += point.x, this.y += point.y, this);
|
|
6872
|
+
return isNumber$1(point) ? (this.x += point, void (this.y += point)) : (this.x += point.x, this.y += point.y, this);
|
|
6838
6873
|
}
|
|
6839
6874
|
}, {
|
|
6840
6875
|
key: "sub",
|
|
6841
6876
|
value: function sub(point) {
|
|
6842
|
-
return isNumber(point) ? (this.x -= point, void (this.y -= point)) : (this.x -= point.x, this.y -= point.y, this);
|
|
6877
|
+
return isNumber$1(point) ? (this.x -= point, void (this.y -= point)) : (this.x -= point.x, this.y -= point.y, this);
|
|
6843
6878
|
}
|
|
6844
6879
|
}, {
|
|
6845
6880
|
key: "multi",
|
|
@@ -7823,13 +7858,15 @@
|
|
|
7823
7858
|
UpdateTag[UpdateTag["UPDATE_SHAPE"] = 2] = "UPDATE_SHAPE";
|
|
7824
7859
|
UpdateTag[UpdateTag["CLEAR_SHAPE"] = 253] = "CLEAR_SHAPE";
|
|
7825
7860
|
UpdateTag[UpdateTag["UPDATE_SHAPE_AND_BOUNDS"] = 3] = "UPDATE_SHAPE_AND_BOUNDS";
|
|
7826
|
-
UpdateTag[UpdateTag["INIT"] =
|
|
7861
|
+
UpdateTag[UpdateTag["INIT"] = 179] = "INIT";
|
|
7827
7862
|
UpdateTag[UpdateTag["CLEAR_BOUNDS"] = 254] = "CLEAR_BOUNDS";
|
|
7828
7863
|
UpdateTag[UpdateTag["UPDATE_GLOBAL_MATRIX"] = 32] = "UPDATE_GLOBAL_MATRIX";
|
|
7829
7864
|
UpdateTag[UpdateTag["CLEAR_GLOBAL_MATRIX"] = 223] = "CLEAR_GLOBAL_MATRIX";
|
|
7830
7865
|
UpdateTag[UpdateTag["UPDATE_LOCAL_MATRIX"] = 16] = "UPDATE_LOCAL_MATRIX";
|
|
7831
7866
|
UpdateTag[UpdateTag["CLEAR_LOCAL_MATRIX"] = 239] = "CLEAR_LOCAL_MATRIX";
|
|
7832
7867
|
UpdateTag[UpdateTag["UPDATE_GLOBAL_LOCAL_MATRIX"] = 48] = "UPDATE_GLOBAL_LOCAL_MATRIX";
|
|
7868
|
+
UpdateTag[UpdateTag["UPDATE_LAYOUT"] = 128] = "UPDATE_LAYOUT";
|
|
7869
|
+
UpdateTag[UpdateTag["CLEAR_LAYOUT"] = 127] = "CLEAR_LAYOUT";
|
|
7833
7870
|
})(exports.UpdateTag || (exports.UpdateTag = {}));
|
|
7834
7871
|
exports.IContainPointMode = void 0;
|
|
7835
7872
|
(function (IContainPointMode) {
|
|
@@ -9287,11 +9324,7 @@
|
|
|
9287
9324
|
strokeBoundsBuffer: 2,
|
|
9288
9325
|
stroke: false
|
|
9289
9326
|
};
|
|
9290
|
-
const DefaultStrokeStyle = {
|
|
9291
|
-
outerBorder: { ...commonStroke, distance: 0 },
|
|
9292
|
-
innerBorder: { ...commonStroke, distance: 0 },
|
|
9293
|
-
...commonStroke
|
|
9294
|
-
};
|
|
9327
|
+
const DefaultStrokeStyle = Object.assign({ outerBorder: Object.assign(Object.assign({}, commonStroke), { distance: 0 }), innerBorder: Object.assign(Object.assign({}, commonStroke), { distance: 0 }) }, commonStroke);
|
|
9295
9328
|
const DefaultTextStyle = {
|
|
9296
9329
|
text: '',
|
|
9297
9330
|
maxLineWidth: Infinity,
|
|
@@ -9309,44 +9342,17 @@
|
|
|
9309
9342
|
lineThrough: 0,
|
|
9310
9343
|
scaleIn3d: false,
|
|
9311
9344
|
direction: 'horizontal',
|
|
9312
|
-
wordBreak: 'break-all'
|
|
9313
|
-
|
|
9314
|
-
const DefaultStyle = {
|
|
9315
|
-
opacity: 1,
|
|
9316
|
-
background: null,
|
|
9317
|
-
texture: null,
|
|
9318
|
-
textureColor: 'black',
|
|
9319
|
-
textureSize: 10,
|
|
9320
|
-
texturePadding: 2,
|
|
9321
|
-
backgroundMode: 0,
|
|
9322
|
-
blur: 0,
|
|
9323
|
-
cursor: null,
|
|
9324
|
-
html: null,
|
|
9325
|
-
...DefaultFillStyle,
|
|
9326
|
-
...DefaultStrokeStyle,
|
|
9327
|
-
...DefaultLayout
|
|
9345
|
+
wordBreak: 'break-all',
|
|
9346
|
+
ignoreBuf: false
|
|
9328
9347
|
};
|
|
9348
|
+
const DefaultStyle = Object.assign(Object.assign(Object.assign({ opacity: 1, background: null, texture: null, textureColor: 'black', textureSize: 10, texturePadding: 2, backgroundMode: 0, blur: 0, cursor: null, html: null }, DefaultFillStyle), DefaultStrokeStyle), DefaultLayout);
|
|
9329
9349
|
const DefaultConnectAttribute = {
|
|
9330
9350
|
connectedType: 'none',
|
|
9331
9351
|
connectedStyle: {},
|
|
9332
9352
|
connectedX: NaN,
|
|
9333
9353
|
connectedY: NaN
|
|
9334
9354
|
};
|
|
9335
|
-
const DefaultAttribute = {
|
|
9336
|
-
strokeSeg: null,
|
|
9337
|
-
pickable: true,
|
|
9338
|
-
childrenPickable: true,
|
|
9339
|
-
visible: true,
|
|
9340
|
-
zIndex: 0,
|
|
9341
|
-
layout: null,
|
|
9342
|
-
boundsPadding: 0,
|
|
9343
|
-
pickMode: 'accurate',
|
|
9344
|
-
customPickShape: null,
|
|
9345
|
-
boundsMode: 'accurate',
|
|
9346
|
-
keepDirIn3d: true,
|
|
9347
|
-
...DefaultStyle,
|
|
9348
|
-
...DefaultTransform
|
|
9349
|
-
};
|
|
9355
|
+
const DefaultAttribute = Object.assign(Object.assign({ strokeSeg: null, pickable: true, childrenPickable: true, visible: true, zIndex: 0, layout: null, boundsPadding: 0, pickMode: 'accurate', customPickShape: null, boundsMode: 'accurate', keepDirIn3d: true }, DefaultStyle), DefaultTransform);
|
|
9350
9356
|
function addAttributeToPrototype(obj, c, keys) {
|
|
9351
9357
|
keys.forEach(key => {
|
|
9352
9358
|
c.prototype[key] = obj[key];
|
|
@@ -9355,145 +9361,23 @@
|
|
|
9355
9361
|
function rewriteProto(obj, c) {
|
|
9356
9362
|
Object.setPrototypeOf(obj, c);
|
|
9357
9363
|
}
|
|
9358
|
-
const DefaultArcAttribute = {
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
padRadius: 0,
|
|
9366
|
-
padAngle: 0,
|
|
9367
|
-
cap: false,
|
|
9368
|
-
forceShowCap: false
|
|
9369
|
-
};
|
|
9370
|
-
const DefaultAreaAttribute = {
|
|
9371
|
-
...DefaultAttribute,
|
|
9372
|
-
...DefaultConnectAttribute,
|
|
9373
|
-
points: [],
|
|
9374
|
-
segments: [],
|
|
9375
|
-
curveType: 'linear',
|
|
9376
|
-
clipRange: 1
|
|
9377
|
-
};
|
|
9378
|
-
const DefaultCircleAttribute = {
|
|
9379
|
-
...DefaultAttribute,
|
|
9380
|
-
radius: 1,
|
|
9381
|
-
startAngle: 0,
|
|
9382
|
-
endAngle: pi2
|
|
9383
|
-
};
|
|
9384
|
-
const DefaultGroupAttribute = {
|
|
9385
|
-
...DefaultAttribute,
|
|
9386
|
-
width: 0,
|
|
9387
|
-
height: 0,
|
|
9388
|
-
cornerRadius: 0,
|
|
9389
|
-
path: [],
|
|
9390
|
-
clip: false,
|
|
9391
|
-
visibleAll: true,
|
|
9392
|
-
display: 'relative',
|
|
9393
|
-
flexDirection: 'row',
|
|
9394
|
-
flexWrap: 'wrap',
|
|
9395
|
-
justifyContent: 'flex-start',
|
|
9396
|
-
alignItems: 'flex-start',
|
|
9397
|
-
alignContent: 'flex-start'
|
|
9398
|
-
};
|
|
9399
|
-
const DefaultGlyphAttribute = {
|
|
9400
|
-
...DefaultAttribute,
|
|
9401
|
-
path: '',
|
|
9402
|
-
width: 0,
|
|
9403
|
-
height: 0,
|
|
9404
|
-
cornerRadius: 0,
|
|
9405
|
-
clip: false
|
|
9406
|
-
};
|
|
9407
|
-
const DefaultLineAttribute = {
|
|
9408
|
-
...DefaultAttribute,
|
|
9409
|
-
...DefaultConnectAttribute,
|
|
9410
|
-
points: [],
|
|
9411
|
-
segments: [],
|
|
9412
|
-
curveType: 'linear',
|
|
9413
|
-
clipRange: 1,
|
|
9414
|
-
clipRangeByDimension: 'default'
|
|
9415
|
-
};
|
|
9416
|
-
const DefaultPathAttribute = {
|
|
9417
|
-
...DefaultAttribute,
|
|
9418
|
-
path: new CustomPath2D(),
|
|
9419
|
-
customPath: () => {
|
|
9364
|
+
const DefaultArcAttribute = Object.assign(Object.assign({}, DefaultAttribute), { startAngle: 0, endAngle: pi2, innerRadius: 0, outerRadius: 1, cornerRadius: 0, padRadius: 0, padAngle: 0, cap: false, forceShowCap: false });
|
|
9365
|
+
const DefaultAreaAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultConnectAttribute), { points: [], segments: [], curveType: 'linear', clipRange: 1 });
|
|
9366
|
+
const DefaultCircleAttribute = Object.assign(Object.assign({}, DefaultAttribute), { radius: 1, startAngle: 0, endAngle: pi2 });
|
|
9367
|
+
const DefaultGroupAttribute = Object.assign(Object.assign({}, DefaultAttribute), { width: 0, height: 0, cornerRadius: 0, path: [], clip: false, visibleAll: true, display: 'relative', flexDirection: 'row', flexWrap: 'wrap', justifyContent: 'flex-start', alignItems: 'flex-start', alignContent: 'flex-start' });
|
|
9368
|
+
const DefaultGlyphAttribute = Object.assign(Object.assign({}, DefaultAttribute), { path: '', width: 0, height: 0, cornerRadius: 0, clip: false });
|
|
9369
|
+
const DefaultLineAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultConnectAttribute), { points: [], segments: [], curveType: 'linear', clipRange: 1, clipRangeByDimension: 'default' });
|
|
9370
|
+
const DefaultPathAttribute = Object.assign(Object.assign({}, DefaultAttribute), { path: new CustomPath2D(), customPath: () => {
|
|
9420
9371
|
console.warn('空函数');
|
|
9421
|
-
}
|
|
9422
|
-
};
|
|
9423
|
-
const
|
|
9424
|
-
|
|
9425
|
-
|
|
9426
|
-
|
|
9427
|
-
};
|
|
9428
|
-
const
|
|
9429
|
-
|
|
9430
|
-
width: 0,
|
|
9431
|
-
height: 0,
|
|
9432
|
-
strokeBoundsBuffer: 0,
|
|
9433
|
-
cornerRadius: 0
|
|
9434
|
-
};
|
|
9435
|
-
const DefaultRect3dAttribute = {
|
|
9436
|
-
...DefaultAttribute,
|
|
9437
|
-
width: 0,
|
|
9438
|
-
height: 0,
|
|
9439
|
-
cornerRadius: 0,
|
|
9440
|
-
length: 0
|
|
9441
|
-
};
|
|
9442
|
-
const DefaultSymbolAttribute = {
|
|
9443
|
-
...DefaultAttribute,
|
|
9444
|
-
symbolType: 'circle',
|
|
9445
|
-
size: 10,
|
|
9446
|
-
keepDirIn3d: true
|
|
9447
|
-
};
|
|
9448
|
-
const DefaultTextAttribute = {
|
|
9449
|
-
...DefaultAttribute,
|
|
9450
|
-
...DefaultTextStyle,
|
|
9451
|
-
strokeBoundsBuffer: 0,
|
|
9452
|
-
keepDirIn3d: true
|
|
9453
|
-
};
|
|
9454
|
-
const DefaultRichTextAttribute = {
|
|
9455
|
-
...DefaultAttribute,
|
|
9456
|
-
width: 300,
|
|
9457
|
-
height: 300,
|
|
9458
|
-
ellipsis: true,
|
|
9459
|
-
wordBreak: 'break-word',
|
|
9460
|
-
verticalDirection: 'top',
|
|
9461
|
-
textAlign: 'left',
|
|
9462
|
-
textBaseline: 'top',
|
|
9463
|
-
layoutDirection: 'horizontal',
|
|
9464
|
-
textConfig: [],
|
|
9465
|
-
maxHeight: undefined,
|
|
9466
|
-
maxWidth: undefined,
|
|
9467
|
-
singleLine: false
|
|
9468
|
-
};
|
|
9469
|
-
const DefaultImageAttribute = {
|
|
9470
|
-
repeatX: 'no-repeat',
|
|
9471
|
-
repeatY: 'no-repeat',
|
|
9472
|
-
image: '',
|
|
9473
|
-
width: 0,
|
|
9474
|
-
height: 0,
|
|
9475
|
-
...DefaultAttribute,
|
|
9476
|
-
fill: true
|
|
9477
|
-
};
|
|
9478
|
-
const DefaultRichTextIconAttribute = {
|
|
9479
|
-
...DefaultImageAttribute,
|
|
9480
|
-
backgroundShowMode: 'never',
|
|
9481
|
-
backgroundWidth: 0,
|
|
9482
|
-
backgroundHeight: 0,
|
|
9483
|
-
textAlign: 'left',
|
|
9484
|
-
textBaseline: 'middle',
|
|
9485
|
-
direction: 'horizontal',
|
|
9486
|
-
margin: 0,
|
|
9487
|
-
id: '',
|
|
9488
|
-
width: 20,
|
|
9489
|
-
height: 20,
|
|
9490
|
-
backgroundFill: 'rgba(101, 117, 168, 0.1)',
|
|
9491
|
-
backgroundFillOpacity: 1,
|
|
9492
|
-
backgroundStroke: false,
|
|
9493
|
-
backgroundStrokeOpacity: 1,
|
|
9494
|
-
backgroundRadius: 4,
|
|
9495
|
-
opacity: 1
|
|
9496
|
-
};
|
|
9372
|
+
} });
|
|
9373
|
+
const DefaultPolygonAttribute = Object.assign(Object.assign({}, DefaultAttribute), { points: [], cornerRadius: 0 });
|
|
9374
|
+
const DefaultRectAttribute = Object.assign(Object.assign({}, DefaultAttribute), { width: 0, height: 0, strokeBoundsBuffer: 0, cornerRadius: 0 });
|
|
9375
|
+
const DefaultRect3dAttribute = Object.assign(Object.assign({}, DefaultAttribute), { width: 0, height: 0, cornerRadius: 0, length: 0 });
|
|
9376
|
+
const DefaultSymbolAttribute = Object.assign(Object.assign({}, DefaultAttribute), { symbolType: 'circle', size: 10, keepDirIn3d: true });
|
|
9377
|
+
const DefaultTextAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultTextStyle), { strokeBoundsBuffer: 0, keepDirIn3d: true });
|
|
9378
|
+
const DefaultRichTextAttribute = Object.assign(Object.assign({}, DefaultAttribute), { width: 300, height: 300, ellipsis: true, wordBreak: 'break-word', verticalDirection: 'top', textAlign: 'left', textBaseline: 'top', layoutDirection: 'horizontal', textConfig: [], maxHeight: undefined, maxWidth: undefined, singleLine: false });
|
|
9379
|
+
const DefaultImageAttribute = Object.assign(Object.assign({ repeatX: 'no-repeat', repeatY: 'no-repeat', image: '', width: 0, height: 0 }, DefaultAttribute), { fill: true, cornerRadius: 0 });
|
|
9380
|
+
const DefaultRichTextIconAttribute = Object.assign(Object.assign({}, DefaultImageAttribute), { backgroundShowMode: 'never', backgroundWidth: 0, backgroundHeight: 0, textAlign: 'left', textBaseline: 'middle', direction: 'horizontal', margin: 0, id: '', width: 20, height: 20, backgroundFill: 'rgba(101, 117, 168, 0.1)', backgroundFillOpacity: 1, backgroundStroke: false, backgroundStrokeOpacity: 1, backgroundRadius: 4, opacity: 1 });
|
|
9497
9381
|
|
|
9498
9382
|
class Application {
|
|
9499
9383
|
}
|
|
@@ -9743,7 +9627,7 @@
|
|
|
9743
9627
|
clipedData.width = this.measureTextWidth(clipedData.str, options);
|
|
9744
9628
|
}
|
|
9745
9629
|
}
|
|
9746
|
-
out.push({
|
|
9630
|
+
out.push(Object.assign(Object.assign({}, verticalList[i]), { text: clipedData.str, width: clipedData.width }));
|
|
9747
9631
|
length += clipedData.width;
|
|
9748
9632
|
}
|
|
9749
9633
|
return {
|
|
@@ -9888,6 +9772,9 @@
|
|
|
9888
9772
|
function isNotAroundZero(val) {
|
|
9889
9773
|
return val > EPSILON || val < -EPSILON;
|
|
9890
9774
|
}
|
|
9775
|
+
function isNumber(data) {
|
|
9776
|
+
return typeof data === 'number' && Number.isFinite(data);
|
|
9777
|
+
}
|
|
9891
9778
|
const _v0 = [0, 0];
|
|
9892
9779
|
const _v1 = [0, 0];
|
|
9893
9780
|
const _v2 = [0, 0];
|
|
@@ -10628,16 +10515,10 @@
|
|
|
10628
10515
|
}
|
|
10629
10516
|
createTextMeasureInstance(textSpec, option, getCanvasForMeasure) {
|
|
10630
10517
|
this.configure(this.global, this.global.env);
|
|
10631
|
-
return new TextMeasure({
|
|
10632
|
-
defaultFontParams: {
|
|
10518
|
+
return new TextMeasure(Object.assign({ defaultFontParams: {
|
|
10633
10519
|
fontFamily: DefaultTextStyle.fontFamily,
|
|
10634
10520
|
fontSize: DefaultTextStyle.fontSize
|
|
10635
|
-
},
|
|
10636
|
-
getCanvasForMeasure: getCanvasForMeasure || (() => this.canvas),
|
|
10637
|
-
getTextBounds: undefined,
|
|
10638
|
-
specialCharSet: '-/: .,@%\'"~' + TextMeasure.ALPHABET_CHAR_SET + TextMeasure.ALPHABET_CHAR_SET.toUpperCase(),
|
|
10639
|
-
...(option !== null && option !== void 0 ? option : {})
|
|
10640
|
-
}, textSpec);
|
|
10521
|
+
}, getCanvasForMeasure: getCanvasForMeasure || (() => this.canvas), getTextBounds: undefined, specialCharSet: '-/: .,@%\'"~' + TextMeasure.ALPHABET_CHAR_SET + TextMeasure.ALPHABET_CHAR_SET.toUpperCase() }, (option !== null && option !== void 0 ? option : {})), textSpec);
|
|
10641
10522
|
}
|
|
10642
10523
|
};
|
|
10643
10524
|
exports.DefaultGraphicUtil = __decorate([
|
|
@@ -11014,35 +10895,37 @@
|
|
|
11014
10895
|
}
|
|
11015
10896
|
}
|
|
11016
10897
|
}
|
|
11017
|
-
|
|
11018
|
-
|
|
11019
|
-
|
|
11020
|
-
|
|
11021
|
-
|
|
11022
|
-
|
|
11023
|
-
|
|
11024
|
-
breakTag
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
|
|
10898
|
+
forEachChildrenAsync(cb, reverse = false) {
|
|
10899
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10900
|
+
if (reverse) {
|
|
10901
|
+
let child = this._lastChild;
|
|
10902
|
+
let i = 0;
|
|
10903
|
+
while (child) {
|
|
10904
|
+
let breakTag = cb(child, i++);
|
|
10905
|
+
if (breakTag.then) {
|
|
10906
|
+
breakTag = yield breakTag;
|
|
10907
|
+
}
|
|
10908
|
+
if (breakTag) {
|
|
10909
|
+
return;
|
|
10910
|
+
}
|
|
10911
|
+
child = child._prev;
|
|
11028
10912
|
}
|
|
11029
|
-
child = child._prev;
|
|
11030
10913
|
}
|
|
11031
|
-
|
|
11032
|
-
|
|
11033
|
-
|
|
11034
|
-
|
|
11035
|
-
|
|
11036
|
-
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
10914
|
+
else {
|
|
10915
|
+
let child = this._firstChild;
|
|
10916
|
+
let i = 0;
|
|
10917
|
+
while (child) {
|
|
10918
|
+
let breakTag = cb(child, i++);
|
|
10919
|
+
if (breakTag.then) {
|
|
10920
|
+
breakTag = yield breakTag;
|
|
10921
|
+
}
|
|
10922
|
+
if (breakTag) {
|
|
10923
|
+
return;
|
|
10924
|
+
}
|
|
10925
|
+
child = child._next;
|
|
11042
10926
|
}
|
|
11043
|
-
child = child._next;
|
|
11044
10927
|
}
|
|
11045
|
-
}
|
|
10928
|
+
});
|
|
11046
10929
|
}
|
|
11047
10930
|
forEach(cb) {
|
|
11048
10931
|
return this.forEachChildren(cb);
|
|
@@ -12007,20 +11890,23 @@
|
|
|
12007
11890
|
this.dispatch.emit(type || e.type, e);
|
|
12008
11891
|
}
|
|
12009
11892
|
mapEvent(e) {
|
|
12010
|
-
var _a;
|
|
11893
|
+
var _a, _b, _c, _d, _e;
|
|
12011
11894
|
if (!this.rootTarget) {
|
|
12012
11895
|
return;
|
|
12013
11896
|
}
|
|
12014
11897
|
const mappers = this.mappingTable[e.type];
|
|
12015
11898
|
let target;
|
|
12016
11899
|
const cacheKey = `${e.canvasX}-${e.canvasY}`;
|
|
12017
|
-
if ((_a = this._prePointTargetCache) === null || _a === void 0 ? void 0 : _a[cacheKey])
|
|
11900
|
+
if (((_a = this._prePointTargetCache) === null || _a === void 0 ? void 0 : _a[cacheKey]) &&
|
|
11901
|
+
((_c = (_b = this._prePointTargetCache) === null || _b === void 0 ? void 0 : _b[cacheKey]) === null || _c === void 0 ? void 0 : _c.stage.renderCount) ===
|
|
11902
|
+
((_d = this._prePointTargetCache) === null || _d === void 0 ? void 0 : _d.stageRenderCount)) {
|
|
12018
11903
|
target = this._prePointTargetCache[cacheKey];
|
|
12019
11904
|
}
|
|
12020
11905
|
else {
|
|
12021
11906
|
target = this.pickTarget(e.canvasX, e.canvasY);
|
|
12022
11907
|
this._prePointTargetCache = {
|
|
12023
|
-
[cacheKey]: target
|
|
11908
|
+
[cacheKey]: target,
|
|
11909
|
+
stageRenderCount: (_e = target === null || target === void 0 ? void 0 : target.stage.renderCount) !== null && _e !== void 0 ? _e : -1
|
|
12024
11910
|
};
|
|
12025
11911
|
}
|
|
12026
11912
|
if (mappers) {
|
|
@@ -12237,9 +12123,7 @@
|
|
|
12237
12123
|
}
|
|
12238
12124
|
}
|
|
12239
12125
|
}
|
|
12240
|
-
|
|
12241
|
-
this.emitDelegation(e, type);
|
|
12242
|
-
}
|
|
12126
|
+
this.emitDelegation(e, type);
|
|
12243
12127
|
}
|
|
12244
12128
|
emitDelegation(e, type) {
|
|
12245
12129
|
const events = e.currentTarget._events;
|
|
@@ -13577,7 +13461,7 @@
|
|
|
13577
13461
|
this.animateTail = null;
|
|
13578
13462
|
this.animateCount = 0;
|
|
13579
13463
|
}
|
|
13580
|
-
removeAnimate(animate) {
|
|
13464
|
+
removeAnimate(animate, release = true) {
|
|
13581
13465
|
animate._onRemove && animate._onRemove.forEach(cb => cb());
|
|
13582
13466
|
if (animate === this.animateHead) {
|
|
13583
13467
|
this.animateHead = animate.nextAnimate;
|
|
@@ -13596,7 +13480,7 @@
|
|
|
13596
13480
|
animate.prevAnimate.nextAnimate = animate.nextAnimate;
|
|
13597
13481
|
animate.nextAnimate.prevAnimate = animate.prevAnimate;
|
|
13598
13482
|
}
|
|
13599
|
-
animate.release();
|
|
13483
|
+
release && animate.release();
|
|
13600
13484
|
return;
|
|
13601
13485
|
}
|
|
13602
13486
|
}
|
|
@@ -13684,6 +13568,13 @@
|
|
|
13684
13568
|
this._duringTime = 0;
|
|
13685
13569
|
this.timeline.addAnimate(this);
|
|
13686
13570
|
}
|
|
13571
|
+
setTimeline(timeline) {
|
|
13572
|
+
if (timeline === this.timeline) {
|
|
13573
|
+
return;
|
|
13574
|
+
}
|
|
13575
|
+
this.timeline.removeAnimate(this, false);
|
|
13576
|
+
timeline.addAnimate(this);
|
|
13577
|
+
}
|
|
13687
13578
|
getStartTime() {
|
|
13688
13579
|
return this._startTime;
|
|
13689
13580
|
}
|
|
@@ -14520,8 +14411,8 @@
|
|
|
14520
14411
|
}
|
|
14521
14412
|
onBind() {
|
|
14522
14413
|
var _a, _b, _c, _d, _e, _f;
|
|
14523
|
-
this.fromNumber = isNumber((_a = this.from) === null || _a === void 0 ? void 0 : _a.text) ? (_b = this.from) === null || _b === void 0 ? void 0 : _b.text : Number.parseFloat((_c = this.from) === null || _c === void 0 ? void 0 : _c.text);
|
|
14524
|
-
this.toNumber = isNumber((_d = this.to) === null || _d === void 0 ? void 0 : _d.text) ? (_e = this.to) === null || _e === void 0 ? void 0 : _e.text : Number.parseFloat((_f = this.to) === null || _f === void 0 ? void 0 : _f.text);
|
|
14414
|
+
this.fromNumber = isNumber$1((_a = this.from) === null || _a === void 0 ? void 0 : _a.text) ? (_b = this.from) === null || _b === void 0 ? void 0 : _b.text : Number.parseFloat((_c = this.from) === null || _c === void 0 ? void 0 : _c.text);
|
|
14415
|
+
this.toNumber = isNumber$1((_d = this.to) === null || _d === void 0 ? void 0 : _d.text) ? (_e = this.to) === null || _e === void 0 ? void 0 : _e.text : Number.parseFloat((_f = this.to) === null || _f === void 0 ? void 0 : _f.text);
|
|
14525
14416
|
if (!Number.isFinite(this.toNumber)) {
|
|
14526
14417
|
this.fromNumber = 0;
|
|
14527
14418
|
}
|
|
@@ -14733,16 +14624,7 @@
|
|
|
14733
14624
|
var _a;
|
|
14734
14625
|
const root = this.target.attachShadow();
|
|
14735
14626
|
const height = this.target.AABBBounds.height();
|
|
14736
|
-
const rect = application.graphicService.creator.rect({
|
|
14737
|
-
height: height,
|
|
14738
|
-
fill: '#bcdeff',
|
|
14739
|
-
shadowBlur: 30,
|
|
14740
|
-
shadowColor: '#bcdeff',
|
|
14741
|
-
...(_a = this.params) === null || _a === void 0 ? void 0 : _a.attribute,
|
|
14742
|
-
x: 0,
|
|
14743
|
-
y: 0,
|
|
14744
|
-
width: 0
|
|
14745
|
-
});
|
|
14627
|
+
const rect = application.graphicService.creator.rect(Object.assign(Object.assign({ height: height, fill: '#bcdeff', shadowBlur: 30, shadowColor: '#bcdeff' }, (_a = this.params) === null || _a === void 0 ? void 0 : _a.attribute), { x: 0, y: 0, width: 0 }));
|
|
14746
14628
|
this.rect = rect;
|
|
14747
14629
|
root.add(rect);
|
|
14748
14630
|
}
|
|
@@ -15846,7 +15728,7 @@
|
|
|
15846
15728
|
return res;
|
|
15847
15729
|
};
|
|
15848
15730
|
const samplingPoints = (points, count) => {
|
|
15849
|
-
const validatePoints = points.filter(point => point.defined !== false && isNumber(point.x) && isNumber(point.y));
|
|
15731
|
+
const validatePoints = points.filter(point => point.defined !== false && isNumber$1(point.x) && isNumber$1(point.y));
|
|
15850
15732
|
if (validatePoints.length === 0) {
|
|
15851
15733
|
return [];
|
|
15852
15734
|
}
|
|
@@ -15900,7 +15782,7 @@
|
|
|
15900
15782
|
return res.concat((_a = seg.points) !== null && _a !== void 0 ? _a : []);
|
|
15901
15783
|
}, []);
|
|
15902
15784
|
}
|
|
15903
|
-
const validatePoints = points.filter(point => point.defined !== false && isNumber(point.x) && isNumber(point.y));
|
|
15785
|
+
const validatePoints = points.filter(point => point.defined !== false && isNumber$1(point.x) && isNumber$1(point.y));
|
|
15904
15786
|
if (!validatePoints.length) {
|
|
15905
15787
|
return [];
|
|
15906
15788
|
}
|
|
@@ -16505,10 +16387,7 @@
|
|
|
16505
16387
|
if (fromGradient !== toGradient) {
|
|
16506
16388
|
const gradient = (fromGradient ? from : to);
|
|
16507
16389
|
const pure = (fromGradient ? to : from);
|
|
16508
|
-
const gradientFromPure = {
|
|
16509
|
-
...gradient,
|
|
16510
|
-
stops: gradient.stops.map(v => ({ ...v, color: colorArrayToString(pure) }))
|
|
16511
|
-
};
|
|
16390
|
+
const gradientFromPure = Object.assign(Object.assign({}, gradient), { stops: gradient.stops.map(v => (Object.assign(Object.assign({}, v), { color: colorArrayToString(pure) }))) });
|
|
16512
16391
|
return fromGradient
|
|
16513
16392
|
? interpolateColor(gradient, gradientFromPure, ratio, alphaChannel, cb)
|
|
16514
16393
|
: interpolateColor(gradientFromPure, gradient, ratio, alphaChannel, cb);
|
|
@@ -17264,6 +17143,7 @@
|
|
|
17264
17143
|
}
|
|
17265
17144
|
application.graphicService.beforeUpdateAABBBounds(this, this.stage, true, this._AABBBounds);
|
|
17266
17145
|
const bounds = this.doUpdateAABBBounds(full);
|
|
17146
|
+
this.addUpdateLayoutTag();
|
|
17267
17147
|
application.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, true);
|
|
17268
17148
|
return bounds;
|
|
17269
17149
|
}
|
|
@@ -17378,6 +17258,7 @@
|
|
|
17378
17258
|
this.addUpdateBoundTag();
|
|
17379
17259
|
}
|
|
17380
17260
|
this.addUpdatePositionTag();
|
|
17261
|
+
this.addUpdateLayoutTag();
|
|
17381
17262
|
this.onAttributeUpdate(context);
|
|
17382
17263
|
}
|
|
17383
17264
|
setAttribute(key, value, forceUpdateTag, context) {
|
|
@@ -17397,6 +17278,7 @@
|
|
|
17397
17278
|
this.addUpdateBoundTag();
|
|
17398
17279
|
}
|
|
17399
17280
|
this.addUpdatePositionTag();
|
|
17281
|
+
this.addUpdateLayoutTag();
|
|
17400
17282
|
this.onAttributeUpdate(context);
|
|
17401
17283
|
}
|
|
17402
17284
|
}
|
|
@@ -17464,6 +17346,7 @@
|
|
|
17464
17346
|
}
|
|
17465
17347
|
this.addUpdatePositionTag();
|
|
17466
17348
|
this.addUpdateBoundTag();
|
|
17349
|
+
this.addUpdateLayoutTag();
|
|
17467
17350
|
this.onAttributeUpdate(context);
|
|
17468
17351
|
return this;
|
|
17469
17352
|
}
|
|
@@ -17485,6 +17368,7 @@
|
|
|
17485
17368
|
attribute.y = y;
|
|
17486
17369
|
this.addUpdatePositionTag();
|
|
17487
17370
|
this.addUpdateBoundTag();
|
|
17371
|
+
this.addUpdateLayoutTag();
|
|
17488
17372
|
this.onAttributeUpdate(context);
|
|
17489
17373
|
return this;
|
|
17490
17374
|
}
|
|
@@ -17520,6 +17404,7 @@
|
|
|
17520
17404
|
}
|
|
17521
17405
|
this.addUpdatePositionTag();
|
|
17522
17406
|
this.addUpdateBoundTag();
|
|
17407
|
+
this.addUpdateLayoutTag();
|
|
17523
17408
|
this.onAttributeUpdate(context);
|
|
17524
17409
|
return this;
|
|
17525
17410
|
}
|
|
@@ -17541,6 +17426,7 @@
|
|
|
17541
17426
|
attribute.scaleY = scaleY;
|
|
17542
17427
|
this.addUpdatePositionTag();
|
|
17543
17428
|
this.addUpdateBoundTag();
|
|
17429
|
+
this.addUpdateLayoutTag();
|
|
17544
17430
|
this.onAttributeUpdate(context);
|
|
17545
17431
|
return this;
|
|
17546
17432
|
}
|
|
@@ -17560,6 +17446,7 @@
|
|
|
17560
17446
|
attribute.angle = ((_a = attribute.angle) !== null && _a !== void 0 ? _a : DefaultTransform.angle) + angle;
|
|
17561
17447
|
this.addUpdatePositionTag();
|
|
17562
17448
|
this.addUpdateBoundTag();
|
|
17449
|
+
this.addUpdateLayoutTag();
|
|
17563
17450
|
this.onAttributeUpdate(context);
|
|
17564
17451
|
return this;
|
|
17565
17452
|
}
|
|
@@ -17580,6 +17467,7 @@
|
|
|
17580
17467
|
attribute.angle = angle;
|
|
17581
17468
|
this.addUpdatePositionTag();
|
|
17582
17469
|
this.addUpdateBoundTag();
|
|
17470
|
+
this.addUpdateLayoutTag();
|
|
17583
17471
|
this.onAttributeUpdate(context);
|
|
17584
17472
|
return this;
|
|
17585
17473
|
}
|
|
@@ -17788,6 +17676,15 @@
|
|
|
17788
17676
|
clearUpdateGlobalPositionTag() {
|
|
17789
17677
|
this._updateTag &= exports.UpdateTag.CLEAR_GLOBAL_MATRIX;
|
|
17790
17678
|
}
|
|
17679
|
+
addUpdateLayoutTag() {
|
|
17680
|
+
this._updateTag |= exports.UpdateTag.UPDATE_LAYOUT;
|
|
17681
|
+
}
|
|
17682
|
+
clearUpdateLayoutTag() {
|
|
17683
|
+
this._updateTag &= exports.UpdateTag.CLEAR_LAYOUT;
|
|
17684
|
+
}
|
|
17685
|
+
needUpdateLayout() {
|
|
17686
|
+
return !!(this._updateTag & exports.UpdateTag.UPDATE_LAYOUT);
|
|
17687
|
+
}
|
|
17791
17688
|
doUpdateLocalMatrix() {
|
|
17792
17689
|
const { x = DefaultTransform.x, y = DefaultTransform.y, scaleX = DefaultTransform.scaleX, scaleY = DefaultTransform.scaleY, angle = DefaultTransform.angle, anchor, postMatrix } = this.attribute;
|
|
17793
17690
|
const _anchor = [0, 0];
|
|
@@ -17832,6 +17729,12 @@
|
|
|
17832
17729
|
this.stage = stage;
|
|
17833
17730
|
this.layer = layer;
|
|
17834
17731
|
this.setStageToShadowRoot(stage, layer);
|
|
17732
|
+
if (this.animates && this.animates.size) {
|
|
17733
|
+
const timeline = stage.getTimeline();
|
|
17734
|
+
this.animates.forEach(a => {
|
|
17735
|
+
a.setTimeline(timeline);
|
|
17736
|
+
});
|
|
17737
|
+
}
|
|
17835
17738
|
this._onSetStage && this._onSetStage(this, stage, layer);
|
|
17836
17739
|
application.graphicService.onSetStage(this, stage);
|
|
17837
17740
|
}
|
|
@@ -18005,7 +17908,7 @@
|
|
|
18005
17908
|
return this.pathProxy;
|
|
18006
17909
|
}
|
|
18007
17910
|
loadImage(image, background = false) {
|
|
18008
|
-
if (!image) {
|
|
17911
|
+
if (!image || isObject(image)) {
|
|
18009
17912
|
return;
|
|
18010
17913
|
}
|
|
18011
17914
|
const url = image;
|
|
@@ -19968,31 +19871,33 @@
|
|
|
19968
19871
|
function incrementalAddTo(group, graphic) {
|
|
19969
19872
|
group.incrementalAppendChild(graphic);
|
|
19970
19873
|
}
|
|
19971
|
-
|
|
19972
|
-
|
|
19973
|
-
|
|
19974
|
-
|
|
19975
|
-
|
|
19976
|
-
|
|
19874
|
+
function waitForAllSubLayers(stage) {
|
|
19875
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19876
|
+
const promiseList = [];
|
|
19877
|
+
const layers = stage.getChildren();
|
|
19878
|
+
yield new Promise(resolve => {
|
|
19879
|
+
application.global.getRequestAnimationFrame()(() => {
|
|
19880
|
+
resolve(null);
|
|
19881
|
+
});
|
|
19977
19882
|
});
|
|
19978
|
-
|
|
19979
|
-
|
|
19980
|
-
|
|
19981
|
-
|
|
19982
|
-
|
|
19983
|
-
|
|
19984
|
-
|
|
19985
|
-
|
|
19986
|
-
|
|
19883
|
+
layers.forEach(l => {
|
|
19884
|
+
if (l.subLayers.size) {
|
|
19885
|
+
l.subLayers.forEach(sl => {
|
|
19886
|
+
if (sl.drawContribution && sl.drawContribution.hooks && sl.drawContribution.rendering) {
|
|
19887
|
+
promiseList.push(new Promise(resolve => {
|
|
19888
|
+
sl.drawContribution.hooks.completeDraw.tap('outWait', () => {
|
|
19889
|
+
sl.drawContribution.hooks.completeDraw.taps = sl.drawContribution.hooks.completeDraw.taps.filter(i => {
|
|
19890
|
+
return i.name !== 'outWait';
|
|
19891
|
+
});
|
|
19892
|
+
resolve(null);
|
|
19987
19893
|
});
|
|
19988
|
-
|
|
19989
|
-
|
|
19990
|
-
|
|
19991
|
-
|
|
19992
|
-
|
|
19993
|
-
|
|
19894
|
+
}));
|
|
19895
|
+
}
|
|
19896
|
+
});
|
|
19897
|
+
}
|
|
19898
|
+
});
|
|
19899
|
+
yield Promise.all(promiseList);
|
|
19994
19900
|
});
|
|
19995
|
-
await Promise.all(promiseList);
|
|
19996
19901
|
}
|
|
19997
19902
|
function boundStroke(bounds, halfW, miter, pad = 0) {
|
|
19998
19903
|
bounds.expand(halfW + (pad / 2 + (miter ? miterAdjustment(miter, halfW) : 0)));
|
|
@@ -20259,6 +20164,7 @@
|
|
|
20259
20164
|
application.graphicService.beforeUpdateAABBBounds(this, this.stage, true, this._AABBBounds);
|
|
20260
20165
|
const selfChange = this.shouldSelfChangeUpdateAABBBounds();
|
|
20261
20166
|
const bounds = this.doUpdateAABBBounds();
|
|
20167
|
+
this.addUpdateLayoutTag();
|
|
20262
20168
|
application.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, selfChange);
|
|
20263
20169
|
return bounds;
|
|
20264
20170
|
}
|
|
@@ -20426,7 +20332,7 @@
|
|
|
20426
20332
|
return graphic;
|
|
20427
20333
|
}
|
|
20428
20334
|
clone() {
|
|
20429
|
-
return new Group({
|
|
20335
|
+
return new Group(Object.assign({}, this.attribute));
|
|
20430
20336
|
}
|
|
20431
20337
|
}
|
|
20432
20338
|
|
|
@@ -20556,17 +20462,7 @@
|
|
|
20556
20462
|
combineTo(target, params) {
|
|
20557
20463
|
var _a, _b, _c;
|
|
20558
20464
|
if (this.offscreen) {
|
|
20559
|
-
this.layerHandler.drawTo(target, [this], {
|
|
20560
|
-
background: (_a = params.background) !== null && _a !== void 0 ? _a : this.background,
|
|
20561
|
-
renderService: params.renderService,
|
|
20562
|
-
x: (_b = params.x) !== null && _b !== void 0 ? _b : this.stage.x,
|
|
20563
|
-
y: (_c = params.y) !== null && _c !== void 0 ? _c : this.stage.y,
|
|
20564
|
-
width: this.viewWidth,
|
|
20565
|
-
height: this.viewHeight,
|
|
20566
|
-
stage: this.stage,
|
|
20567
|
-
layer: this,
|
|
20568
|
-
...params
|
|
20569
|
-
});
|
|
20465
|
+
this.layerHandler.drawTo(target, [this], Object.assign({ background: (_a = params.background) !== null && _a !== void 0 ? _a : this.background, renderService: params.renderService, x: (_b = params.x) !== null && _b !== void 0 ? _b : this.stage.x, y: (_c = params.y) !== null && _c !== void 0 ? _c : this.stage.y, width: this.viewWidth, height: this.viewHeight, stage: this.stage, layer: this }, params));
|
|
20570
20466
|
this.afterDrawCbs.forEach(c => c(this));
|
|
20571
20467
|
}
|
|
20572
20468
|
}
|
|
@@ -20581,17 +20477,7 @@
|
|
|
20581
20477
|
}
|
|
20582
20478
|
drawTo(target, params) {
|
|
20583
20479
|
var _a, _b, _c;
|
|
20584
|
-
this.layerHandler.drawTo(target, [this], {
|
|
20585
|
-
background: (_a = params.background) !== null && _a !== void 0 ? _a : this.background,
|
|
20586
|
-
renderService: params.renderService,
|
|
20587
|
-
x: (_b = params.x) !== null && _b !== void 0 ? _b : this.stage.x,
|
|
20588
|
-
y: (_c = params.y) !== null && _c !== void 0 ? _c : this.stage.y,
|
|
20589
|
-
width: this.viewWidth,
|
|
20590
|
-
height: this.viewHeight,
|
|
20591
|
-
stage: this.stage,
|
|
20592
|
-
layer: this,
|
|
20593
|
-
...params
|
|
20594
|
-
});
|
|
20480
|
+
this.layerHandler.drawTo(target, [this], Object.assign({ background: (_a = params.background) !== null && _a !== void 0 ? _a : this.background, renderService: params.renderService, x: (_b = params.x) !== null && _b !== void 0 ? _b : this.stage.x, y: (_c = params.y) !== null && _c !== void 0 ? _c : this.stage.y, width: this.viewWidth, height: this.viewHeight, stage: this.stage, layer: this }, params));
|
|
20595
20481
|
this.afterDrawCbs.forEach(c => c(this));
|
|
20596
20482
|
}
|
|
20597
20483
|
}
|
|
@@ -20613,10 +20499,7 @@
|
|
|
20613
20499
|
}
|
|
20614
20500
|
createLayer(stage, options = { main: false }) {
|
|
20615
20501
|
this.tryInit();
|
|
20616
|
-
const layer = new Layer(stage, this.global, stage.window, {
|
|
20617
|
-
...options,
|
|
20618
|
-
virtual: this.staticLayerCountInEnv === 0
|
|
20619
|
-
});
|
|
20502
|
+
const layer = new Layer(stage, this.global, stage.window, Object.assign(Object.assign({}, options), { virtual: this.staticLayerCountInEnv === 0 }));
|
|
20620
20503
|
const stageLayers = this.layerMap.get(stage) || [];
|
|
20621
20504
|
stageLayers.push(layer);
|
|
20622
20505
|
this.layerMap.set(stage, stageLayers);
|
|
@@ -20745,6 +20628,12 @@
|
|
|
20745
20628
|
clearViewBox(viewBox, color) {
|
|
20746
20629
|
this._handler.clearViewBox(viewBox, color);
|
|
20747
20630
|
}
|
|
20631
|
+
isVisible(bbox) {
|
|
20632
|
+
return this._handler.isVisible(bbox);
|
|
20633
|
+
}
|
|
20634
|
+
onVisibleChange(cb) {
|
|
20635
|
+
return this._handler.onVisibleChange(cb);
|
|
20636
|
+
}
|
|
20748
20637
|
};
|
|
20749
20638
|
__decorate([
|
|
20750
20639
|
postConstruct(),
|
|
@@ -21385,6 +21274,16 @@
|
|
|
21385
21274
|
return;
|
|
21386
21275
|
}
|
|
21387
21276
|
const { outerRadius = arcAttribute.outerRadius, innerRadius = arcAttribute.innerRadius, cap = arcAttribute.cap, forceShowCap = arcAttribute.forceShowCap } = arc.attribute;
|
|
21277
|
+
let conicalOffset = 0;
|
|
21278
|
+
const tempChangeConicalColor = ((isBoolean(cap) && cap) || cap[0]) && fill.gradient === 'conical';
|
|
21279
|
+
if (tempChangeConicalColor) {
|
|
21280
|
+
const { sc, startAngle, endAngle } = arc.getParsedAngle();
|
|
21281
|
+
if (abs(endAngle - startAngle) < pi2 - epsilon) {
|
|
21282
|
+
conicalOffset = sc || 0;
|
|
21283
|
+
fill.startAngle -= conicalOffset;
|
|
21284
|
+
fill.endAngle -= conicalOffset;
|
|
21285
|
+
}
|
|
21286
|
+
}
|
|
21388
21287
|
let beforeRenderContribitionsRuned = false;
|
|
21389
21288
|
const { isFullStroke, stroke: arrayStroke } = parseStroke(stroke);
|
|
21390
21289
|
if (doFill || isFullStroke) {
|
|
@@ -21459,7 +21358,7 @@
|
|
|
21459
21358
|
context.stroke();
|
|
21460
21359
|
}
|
|
21461
21360
|
}
|
|
21462
|
-
if (cap && forceShowCap) {
|
|
21361
|
+
if (((isBoolean(cap) && cap) || cap[1]) && forceShowCap) {
|
|
21463
21362
|
const { startAngle: sa, endAngle: ea } = arc.getParsedAngle();
|
|
21464
21363
|
const deltaAngle = abs(ea - sa);
|
|
21465
21364
|
if (deltaAngle >= pi2 - epsilon) {
|
|
@@ -21513,6 +21412,10 @@
|
|
|
21513
21412
|
this._arcAfterRenderContribitions.forEach(c => {
|
|
21514
21413
|
c.drawShape(arc, context, x, y, doFill, doStroke, fVisible, sVisible, arcAttribute, drawContext, fillCb, strokeCb);
|
|
21515
21414
|
});
|
|
21415
|
+
if (tempChangeConicalColor) {
|
|
21416
|
+
fill.startAngle += conicalOffset;
|
|
21417
|
+
fill.endAngle += conicalOffset;
|
|
21418
|
+
}
|
|
21516
21419
|
}
|
|
21517
21420
|
draw(arc, renderService, drawContext, params) {
|
|
21518
21421
|
const { context } = drawContext;
|
|
@@ -21705,7 +21608,7 @@
|
|
|
21705
21608
|
return path;
|
|
21706
21609
|
}
|
|
21707
21610
|
clone() {
|
|
21708
|
-
return new Circle({
|
|
21611
|
+
return new Circle(Object.assign({}, this.attribute));
|
|
21709
21612
|
}
|
|
21710
21613
|
}
|
|
21711
21614
|
|
|
@@ -22010,8 +21913,8 @@
|
|
|
22010
21913
|
let width;
|
|
22011
21914
|
let str;
|
|
22012
21915
|
const attribute = this.attribute;
|
|
22013
|
-
const { maxLineWidth = textTheme.maxLineWidth, ellipsis = textTheme.ellipsis, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontSize = textTheme.fontSize, fontWeight = textTheme.fontWeight, stroke = textTheme.stroke, lineWidth = textTheme.lineWidth, wordBreak = textTheme.wordBreak } = attribute;
|
|
22014
|
-
const buf = Math.max(2, fontSize * 0.075);
|
|
21916
|
+
const { maxLineWidth = textTheme.maxLineWidth, ellipsis = textTheme.ellipsis, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontFamily = textTheme.fontFamily, fontSize = textTheme.fontSize, fontWeight = textTheme.fontWeight, stroke = textTheme.stroke, lineWidth = textTheme.lineWidth, wordBreak = textTheme.wordBreak, ignoreBuf = textTheme.ignoreBuf } = attribute;
|
|
21917
|
+
const buf = ignoreBuf ? 0 : Math.max(2, fontSize * 0.075);
|
|
22015
21918
|
const { lineHeight = (_a = attribute.lineHeight) !== null && _a !== void 0 ? _a : (attribute.fontSize || textTheme.fontSize) + buf } = attribute;
|
|
22016
21919
|
if (!this.shouldUpdateShape() && this.cache) {
|
|
22017
21920
|
width = this.cache.clipedWidth;
|
|
@@ -22026,12 +21929,12 @@
|
|
|
22026
21929
|
if (Number.isFinite(maxLineWidth)) {
|
|
22027
21930
|
if (ellipsis) {
|
|
22028
21931
|
const strEllipsis = (ellipsis === true ? textTheme.ellipsis : ellipsis);
|
|
22029
|
-
const data = textMeasure.clipTextWithSuffix(text.toString(), { fontSize, fontWeight }, maxLineWidth, strEllipsis, wordBreak === 'break-word');
|
|
21932
|
+
const data = textMeasure.clipTextWithSuffix(text.toString(), { fontSize, fontWeight, fontFamily }, maxLineWidth, strEllipsis, wordBreak === 'break-word');
|
|
22030
21933
|
str = data.str;
|
|
22031
21934
|
width = data.width;
|
|
22032
21935
|
}
|
|
22033
21936
|
else {
|
|
22034
|
-
const data = textMeasure.clipText(text.toString(), { fontSize, fontWeight }, maxLineWidth, wordBreak === 'break-word');
|
|
21937
|
+
const data = textMeasure.clipText(text.toString(), { fontSize, fontWeight, fontFamily }, maxLineWidth, wordBreak === 'break-word');
|
|
22035
21938
|
str = data.str;
|
|
22036
21939
|
width = data.width;
|
|
22037
21940
|
}
|
|
@@ -22039,7 +21942,7 @@
|
|
|
22039
21942
|
this.cache.clipedWidth = width;
|
|
22040
21943
|
}
|
|
22041
21944
|
else {
|
|
22042
|
-
width = textMeasure.measureTextWidth(text.toString(), { fontSize, fontWeight });
|
|
21945
|
+
width = textMeasure.measureTextWidth(text.toString(), { fontSize, fontWeight, fontFamily });
|
|
22043
21946
|
this.cache.clipedText = text.toString();
|
|
22044
21947
|
this.cache.clipedWidth = width;
|
|
22045
21948
|
}
|
|
@@ -22061,9 +21964,10 @@
|
|
|
22061
21964
|
const textTheme = getTheme(this).text;
|
|
22062
21965
|
const textMeasure = application.graphicUtil.textMeasure;
|
|
22063
21966
|
let width;
|
|
22064
|
-
const buf = 2;
|
|
22065
21967
|
const attribute = this.attribute;
|
|
22066
|
-
const {
|
|
21968
|
+
const { ignoreBuf = textTheme.ignoreBuf } = attribute;
|
|
21969
|
+
const buf = ignoreBuf ? 0 : 2;
|
|
21970
|
+
const { maxLineWidth = textTheme.maxLineWidth, ellipsis = textTheme.ellipsis, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontSize = textTheme.fontSize, fontWeight = textTheme.fontWeight, fontFamily = textTheme.fontFamily, stroke = textTheme.stroke, lineHeight = (_a = attribute.lineHeight) !== null && _a !== void 0 ? _a : (attribute.fontSize || textTheme.fontSize) + buf, lineWidth = textTheme.lineWidth, wordBreak = textTheme.wordBreak } = attribute;
|
|
22067
21971
|
if (!this.shouldUpdateShape() && this.cache) {
|
|
22068
21972
|
width = this.cache.clipedWidth;
|
|
22069
21973
|
const dx = textDrawOffsetX(textAlign, width);
|
|
@@ -22080,12 +21984,12 @@
|
|
|
22080
21984
|
if (Number.isFinite(maxLineWidth)) {
|
|
22081
21985
|
if (ellipsis) {
|
|
22082
21986
|
const strEllipsis = (ellipsis === true ? textTheme.ellipsis : ellipsis);
|
|
22083
|
-
const data = textMeasure.clipTextWithSuffixVertical(verticalList[0], { fontSize, fontWeight }, maxLineWidth, strEllipsis, wordBreak === 'break-word');
|
|
21987
|
+
const data = textMeasure.clipTextWithSuffixVertical(verticalList[0], { fontSize, fontWeight, fontFamily }, maxLineWidth, strEllipsis, wordBreak === 'break-word');
|
|
22084
21988
|
verticalList = [data.verticalList];
|
|
22085
21989
|
width = data.width;
|
|
22086
21990
|
}
|
|
22087
21991
|
else {
|
|
22088
|
-
const data = textMeasure.clipTextVertical(verticalList[0], { fontSize, fontWeight }, maxLineWidth, wordBreak === 'break-word');
|
|
21992
|
+
const data = textMeasure.clipTextVertical(verticalList[0], { fontSize, fontWeight, fontFamily }, maxLineWidth, wordBreak === 'break-word');
|
|
22089
21993
|
verticalList = [data.verticalList];
|
|
22090
21994
|
width = data.width;
|
|
22091
21995
|
}
|
|
@@ -22097,7 +22001,7 @@
|
|
|
22097
22001
|
verticalList[0].forEach(t => {
|
|
22098
22002
|
const w = t.direction === exports.TextDirection.HORIZONTAL
|
|
22099
22003
|
? fontSize
|
|
22100
|
-
: textMeasure.measureTextWidth(t.text, { fontSize, fontWeight });
|
|
22004
|
+
: textMeasure.measureTextWidth(t.text, { fontSize, fontWeight, fontFamily });
|
|
22101
22005
|
width += w;
|
|
22102
22006
|
t.width = w;
|
|
22103
22007
|
});
|
|
@@ -22143,9 +22047,10 @@
|
|
|
22143
22047
|
const textTheme = getTheme(this).text;
|
|
22144
22048
|
const textMeasure = application.graphicUtil.textMeasure;
|
|
22145
22049
|
let width;
|
|
22146
|
-
const buf = 2;
|
|
22147
22050
|
const attribute = this.attribute;
|
|
22148
|
-
const {
|
|
22051
|
+
const { ignoreBuf = textTheme.ignoreBuf } = attribute;
|
|
22052
|
+
const buf = ignoreBuf ? 0 : 2;
|
|
22053
|
+
const { maxLineWidth = textTheme.maxLineWidth, ellipsis = textTheme.ellipsis, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontFamily = textTheme.fontFamily, fontSize = textTheme.fontSize, fontWeight = textTheme.fontWeight, stroke = textTheme.stroke, lineHeight = (_a = attribute.lineHeight) !== null && _a !== void 0 ? _a : (attribute.fontSize || textTheme.fontSize) + buf, lineWidth = textTheme.lineWidth, wordBreak = textTheme.wordBreak } = attribute;
|
|
22149
22054
|
width = 0;
|
|
22150
22055
|
if (!this.shouldUpdateShape() && this.cache) {
|
|
22151
22056
|
this.cache.verticalList.forEach(item => {
|
|
@@ -22168,12 +22073,12 @@
|
|
|
22168
22073
|
if (Number.isFinite(maxLineWidth)) {
|
|
22169
22074
|
if (ellipsis) {
|
|
22170
22075
|
const strEllipsis = (ellipsis === true ? textTheme.ellipsis : ellipsis);
|
|
22171
|
-
const data = textMeasure.clipTextWithSuffixVertical(verticalData, { fontSize, fontWeight }, maxLineWidth, strEllipsis, wordBreak === 'break-word');
|
|
22076
|
+
const data = textMeasure.clipTextWithSuffixVertical(verticalData, { fontSize, fontWeight, fontFamily }, maxLineWidth, strEllipsis, wordBreak === 'break-word');
|
|
22172
22077
|
verticalLists[i] = data.verticalList;
|
|
22173
22078
|
width = data.width;
|
|
22174
22079
|
}
|
|
22175
22080
|
else {
|
|
22176
|
-
const data = textMeasure.clipTextVertical(verticalData, { fontSize, fontWeight }, maxLineWidth, wordBreak === 'break-word');
|
|
22081
|
+
const data = textMeasure.clipTextVertical(verticalData, { fontSize, fontWeight, fontFamily }, maxLineWidth, wordBreak === 'break-word');
|
|
22177
22082
|
verticalLists[i] = data.verticalList;
|
|
22178
22083
|
width = data.width;
|
|
22179
22084
|
}
|
|
@@ -22183,7 +22088,7 @@
|
|
|
22183
22088
|
verticalData.forEach(t => {
|
|
22184
22089
|
const w = t.direction === exports.TextDirection.HORIZONTAL
|
|
22185
22090
|
? fontSize
|
|
22186
|
-
: textMeasure.measureTextWidth(t.text, { fontSize, fontWeight });
|
|
22091
|
+
: textMeasure.measureTextWidth(t.text, { fontSize, fontWeight, fontFamily });
|
|
22187
22092
|
width += w;
|
|
22188
22093
|
t.width = w;
|
|
22189
22094
|
});
|
|
@@ -22230,7 +22135,7 @@
|
|
|
22230
22135
|
return false;
|
|
22231
22136
|
}
|
|
22232
22137
|
clone() {
|
|
22233
|
-
return new Text({
|
|
22138
|
+
return new Text(Object.assign({}, this.attribute));
|
|
22234
22139
|
}
|
|
22235
22140
|
}
|
|
22236
22141
|
|
|
@@ -22246,8 +22151,8 @@
|
|
|
22246
22151
|
updateMultilineAABBBounds(text) {
|
|
22247
22152
|
var _a, _b, _c;
|
|
22248
22153
|
const textTheme = getTheme(this).text;
|
|
22249
|
-
const { fontFamily = textTheme.fontFamily, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontSize = textTheme.fontSize, lineHeight = this.attribute.lineHeight || this.attribute.fontSize || textTheme.fontSize, ellipsis = textTheme.ellipsis, maxLineWidth, stroke = textTheme.stroke, lineWidth = textTheme.lineWidth, wordBreak = textTheme.wordBreak, heightLimit = 0, lineClamp } = this.attribute;
|
|
22250
|
-
const buf = 2;
|
|
22154
|
+
const { fontFamily = textTheme.fontFamily, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontSize = textTheme.fontSize, lineHeight = this.attribute.lineHeight || this.attribute.fontSize || textTheme.fontSize, ellipsis = textTheme.ellipsis, maxLineWidth, stroke = textTheme.stroke, lineWidth = textTheme.lineWidth, wordBreak = textTheme.wordBreak, ignoreBuf = textTheme.ignoreBuf, heightLimit = 0, lineClamp } = this.attribute;
|
|
22155
|
+
const buf = ignoreBuf ? 0 : 2;
|
|
22251
22156
|
if (!this.shouldUpdateShape() && ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.layoutData)) {
|
|
22252
22157
|
const bbox = this.cache.layoutData.bbox;
|
|
22253
22158
|
this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height);
|
|
@@ -22272,6 +22177,7 @@
|
|
|
22272
22177
|
if (maxLineWidth > 0) {
|
|
22273
22178
|
for (let i = 0; i < lines.length; i++) {
|
|
22274
22179
|
const str = lines[i];
|
|
22180
|
+
let needCut = true;
|
|
22275
22181
|
if (i === lineCountLimit - 1) {
|
|
22276
22182
|
const clip = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, wordBreak === 'break-word');
|
|
22277
22183
|
linesLayout.push({
|
|
@@ -22291,13 +22197,14 @@
|
|
|
22291
22197
|
clip.str = '';
|
|
22292
22198
|
clip.width = 0;
|
|
22293
22199
|
}
|
|
22200
|
+
needCut = false;
|
|
22294
22201
|
}
|
|
22295
22202
|
linesLayout.push({
|
|
22296
22203
|
str: clip.str,
|
|
22297
22204
|
width: clip.width
|
|
22298
22205
|
});
|
|
22299
22206
|
if (clip.str.length === str.length) ;
|
|
22300
|
-
else {
|
|
22207
|
+
else if (needCut) {
|
|
22301
22208
|
const newStr = str.substring(clip.str.length);
|
|
22302
22209
|
lines.splice(i + 1, 0, newStr);
|
|
22303
22210
|
}
|
|
@@ -23122,17 +23029,17 @@
|
|
|
23122
23029
|
this.pathStr = 'M-0.5,-0.5h1v1h-1Z';
|
|
23123
23030
|
}
|
|
23124
23031
|
draw(ctx, size, x, y) {
|
|
23125
|
-
const rectSize = isNumber(size) ? [size, size] : size;
|
|
23032
|
+
const rectSize = isNumber$1(size) ? [size, size] : size;
|
|
23126
23033
|
return rect(ctx, rectSize, x, y);
|
|
23127
23034
|
}
|
|
23128
23035
|
drawOffset(ctx, size, x, y, offset) {
|
|
23129
|
-
const rectSize = isNumber(size)
|
|
23036
|
+
const rectSize = isNumber$1(size)
|
|
23130
23037
|
? [size + 2 * offset, size + 2 * offset]
|
|
23131
23038
|
: [size[0] + 2 * offset, size[1] + 2 * offset];
|
|
23132
23039
|
return rect(ctx, rectSize, x, y);
|
|
23133
23040
|
}
|
|
23134
23041
|
bounds(size, bounds) {
|
|
23135
|
-
const rectSize = isNumber(size) ? [size, size] : size;
|
|
23042
|
+
const rectSize = isNumber$1(size) ? [size, size] : size;
|
|
23136
23043
|
bounds.x1 = -rectSize[0] / 2;
|
|
23137
23044
|
bounds.x2 = rectSize[0] / 2;
|
|
23138
23045
|
bounds.y1 = -rectSize[1] / 2;
|
|
@@ -23369,7 +23276,7 @@
|
|
|
23369
23276
|
: new CustomPath2D().fromString(symbolInstance.pathStr, x, y, formattedSize[0], formattedSize[1]);
|
|
23370
23277
|
}
|
|
23371
23278
|
clone() {
|
|
23372
|
-
return new Symbol({
|
|
23279
|
+
return new Symbol(Object.assign({}, this.attribute));
|
|
23373
23280
|
}
|
|
23374
23281
|
};
|
|
23375
23282
|
Symbol$1.userSymbolMap = {};
|
|
@@ -23475,7 +23382,7 @@
|
|
|
23475
23382
|
return path;
|
|
23476
23383
|
}
|
|
23477
23384
|
clone() {
|
|
23478
|
-
return new Line({
|
|
23385
|
+
return new Line(Object.assign({}, this.attribute));
|
|
23479
23386
|
}
|
|
23480
23387
|
};
|
|
23481
23388
|
|
|
@@ -23543,7 +23450,7 @@
|
|
|
23543
23450
|
return path;
|
|
23544
23451
|
}
|
|
23545
23452
|
clone() {
|
|
23546
|
-
return new Rect({
|
|
23453
|
+
return new Rect(Object.assign({}, this.attribute));
|
|
23547
23454
|
}
|
|
23548
23455
|
}
|
|
23549
23456
|
|
|
@@ -23755,7 +23662,7 @@
|
|
|
23755
23662
|
this.currentStates = [];
|
|
23756
23663
|
}
|
|
23757
23664
|
clone() {
|
|
23758
|
-
const glyph = new Glyph({
|
|
23665
|
+
const glyph = new Glyph(Object.assign({}, this.attribute));
|
|
23759
23666
|
glyph.setSubGraphic(this.subGraphic.map(g => g.clone()));
|
|
23760
23667
|
return glyph;
|
|
23761
23668
|
}
|
|
@@ -24309,7 +24216,7 @@
|
|
|
24309
24216
|
return false;
|
|
24310
24217
|
}
|
|
24311
24218
|
clone() {
|
|
24312
|
-
return new Image({
|
|
24219
|
+
return new Image(Object.assign({}, this.attribute));
|
|
24313
24220
|
}
|
|
24314
24221
|
}
|
|
24315
24222
|
|
|
@@ -24867,7 +24774,7 @@
|
|
|
24867
24774
|
this._frameCache = frame;
|
|
24868
24775
|
}
|
|
24869
24776
|
clone() {
|
|
24870
|
-
return new RichText({
|
|
24777
|
+
return new RichText(Object.assign({}, this.attribute));
|
|
24871
24778
|
}
|
|
24872
24779
|
setStage(stage, layer) {
|
|
24873
24780
|
super.setStage(stage, layer);
|
|
@@ -25011,7 +24918,7 @@
|
|
|
25011
24918
|
return new CustomPath2D().fromCustomPath2D(this.getParsedPathShape(), x, y);
|
|
25012
24919
|
}
|
|
25013
24920
|
clone() {
|
|
25014
|
-
return new Path({
|
|
24921
|
+
return new Path(Object.assign({}, this.attribute));
|
|
25015
24922
|
}
|
|
25016
24923
|
}
|
|
25017
24924
|
|
|
@@ -25125,7 +25032,7 @@
|
|
|
25125
25032
|
return path;
|
|
25126
25033
|
}
|
|
25127
25034
|
clone() {
|
|
25128
|
-
return new Area({
|
|
25035
|
+
return new Area(Object.assign({}, this.attribute));
|
|
25129
25036
|
}
|
|
25130
25037
|
}
|
|
25131
25038
|
|
|
@@ -25163,7 +25070,7 @@
|
|
|
25163
25070
|
return 0;
|
|
25164
25071
|
}
|
|
25165
25072
|
const deltaRadius = Math.abs(outerRadius - innerRadius);
|
|
25166
|
-
return Math.min(isNumber(cornerRadius, true)
|
|
25073
|
+
return Math.min(isNumber$1(cornerRadius, true)
|
|
25167
25074
|
? cornerRadius
|
|
25168
25075
|
: (deltaRadius * parseFloat(cornerRadius)) / 100, deltaRadius / 2);
|
|
25169
25076
|
}
|
|
@@ -25188,7 +25095,9 @@
|
|
|
25188
25095
|
if (capWidth > epsilon && outerRadius > epsilon) {
|
|
25189
25096
|
return {
|
|
25190
25097
|
startAngle: startAngle - sign * capAngle * startCap,
|
|
25191
|
-
endAngle: endAngle + sign * capAngle * endCap
|
|
25098
|
+
endAngle: endAngle + sign * capAngle * endCap,
|
|
25099
|
+
sc: sign * capAngle * startCap,
|
|
25100
|
+
ec: sign * capAngle * endCap
|
|
25192
25101
|
};
|
|
25193
25102
|
}
|
|
25194
25103
|
}
|
|
@@ -25327,7 +25236,7 @@
|
|
|
25327
25236
|
return path;
|
|
25328
25237
|
}
|
|
25329
25238
|
clone() {
|
|
25330
|
-
return new Arc({
|
|
25239
|
+
return new Arc(Object.assign({}, this.attribute));
|
|
25331
25240
|
}
|
|
25332
25241
|
}
|
|
25333
25242
|
|
|
@@ -25424,7 +25333,7 @@
|
|
|
25424
25333
|
return path;
|
|
25425
25334
|
}
|
|
25426
25335
|
clone() {
|
|
25427
|
-
return new Polygon({
|
|
25336
|
+
return new Polygon(Object.assign({}, this.attribute));
|
|
25428
25337
|
}
|
|
25429
25338
|
}
|
|
25430
25339
|
|
|
@@ -27994,7 +27903,7 @@
|
|
|
27994
27903
|
const halfPi = pi / 2;
|
|
27995
27904
|
function createRectPath(path, x, y, width, height, rectCornerRadius) {
|
|
27996
27905
|
let cornerRadius;
|
|
27997
|
-
if (isNumber(rectCornerRadius, true)) {
|
|
27906
|
+
if (isNumber$1(rectCornerRadius, true)) {
|
|
27998
27907
|
cornerRadius = [
|
|
27999
27908
|
rectCornerRadius,
|
|
28000
27909
|
rectCornerRadius,
|
|
@@ -28794,7 +28703,7 @@
|
|
|
28794
28703
|
}
|
|
28795
28704
|
drawShape(image, context, x, y, drawContext, params, fillCb) {
|
|
28796
28705
|
const imageAttribute = getTheme(image).image;
|
|
28797
|
-
const { fill = imageAttribute.fill, width = imageAttribute.width, height = imageAttribute.height, opacity = imageAttribute.opacity, fillOpacity = imageAttribute.fillOpacity, visible = imageAttribute.visible, repeatX = imageAttribute.repeatX, repeatY = imageAttribute.repeatY, image: url } = image.attribute;
|
|
28706
|
+
const { fill = imageAttribute.fill, width = imageAttribute.width, height = imageAttribute.height, opacity = imageAttribute.opacity, fillOpacity = imageAttribute.fillOpacity, visible = imageAttribute.visible, repeatX = imageAttribute.repeatX, repeatY = imageAttribute.repeatY, cornerRadius = imageAttribute.cornerRadius, image: url } = image.attribute;
|
|
28798
28707
|
const fVisible = fillVisible(opacity, fillOpacity, fill);
|
|
28799
28708
|
const doFill = runFill(fill);
|
|
28800
28709
|
if (!(image.valid && visible)) {
|
|
@@ -28827,6 +28736,15 @@
|
|
|
28827
28736
|
if (res.state !== 'success') {
|
|
28828
28737
|
return;
|
|
28829
28738
|
}
|
|
28739
|
+
let needRestore = false;
|
|
28740
|
+
if (cornerRadius === 0 || (isArray(cornerRadius) && cornerRadius.every(num => num === 0))) ;
|
|
28741
|
+
else {
|
|
28742
|
+
context.beginPath();
|
|
28743
|
+
createRectPath(context, x, y, width, height, cornerRadius);
|
|
28744
|
+
context.save();
|
|
28745
|
+
context.clip();
|
|
28746
|
+
needRestore = true;
|
|
28747
|
+
}
|
|
28830
28748
|
context.setCommonStyle(image, image.attribute, x, y, imageAttribute);
|
|
28831
28749
|
let repeat = 0;
|
|
28832
28750
|
if (repeatX === 'repeat') {
|
|
@@ -28843,6 +28761,9 @@
|
|
|
28843
28761
|
else {
|
|
28844
28762
|
context.drawImage(res.data, x, y, width, height);
|
|
28845
28763
|
}
|
|
28764
|
+
if (needRestore) {
|
|
28765
|
+
context.restore();
|
|
28766
|
+
}
|
|
28846
28767
|
}
|
|
28847
28768
|
}
|
|
28848
28769
|
this._imageRenderContribitions.forEach(c => {
|
|
@@ -29038,10 +28959,7 @@
|
|
|
29038
28959
|
}
|
|
29039
28960
|
allocate(data) {
|
|
29040
28961
|
if (!this.pools.length) {
|
|
29041
|
-
return wrapCanvas({
|
|
29042
|
-
nativeCanvas: application.global.createCanvas(data),
|
|
29043
|
-
...data
|
|
29044
|
-
});
|
|
28962
|
+
return wrapCanvas(Object.assign({ nativeCanvas: application.global.createCanvas(data) }, data));
|
|
29045
28963
|
}
|
|
29046
28964
|
const m = this.pools.pop();
|
|
29047
28965
|
m.resize(data.width, data.height);
|
|
@@ -29055,10 +28973,7 @@
|
|
|
29055
28973
|
height: canvas.height / canvas.dpr,
|
|
29056
28974
|
dpr: canvas.dpr
|
|
29057
28975
|
};
|
|
29058
|
-
return wrapCanvas({
|
|
29059
|
-
nativeCanvas: application.global.createCanvas(data),
|
|
29060
|
-
...data
|
|
29061
|
-
});
|
|
28976
|
+
return wrapCanvas(Object.assign({ nativeCanvas: application.global.createCanvas(data) }, data));
|
|
29062
28977
|
}
|
|
29063
28978
|
const m = this.pools.pop();
|
|
29064
28979
|
m.width = canvas.width;
|
|
@@ -29305,8 +29220,16 @@
|
|
|
29305
29220
|
this.order = 0;
|
|
29306
29221
|
}
|
|
29307
29222
|
drawShape(arc, context, x, y, doFill, doStroke, fVisible, sVisible, arcAttribute, drawContext, fillCb, strokeCb) {
|
|
29308
|
-
const {
|
|
29309
|
-
|
|
29223
|
+
const { outerBorder, innerBorder } = arc.attribute;
|
|
29224
|
+
const doOuterBorder = outerBorder && outerBorder.visible !== false;
|
|
29225
|
+
const doInnerBorder = innerBorder && innerBorder.visible !== false;
|
|
29226
|
+
if (!(doOuterBorder || doInnerBorder)) {
|
|
29227
|
+
return;
|
|
29228
|
+
}
|
|
29229
|
+
const { innerRadius = arcAttribute.innerRadius, outerRadius = arcAttribute.outerRadius, startAngle = arcAttribute.startAngle, endAngle = arcAttribute.endAngle, opacity = arcAttribute.opacity, x: originX = arcAttribute.x, y: originY = arcAttribute.y, scaleX = arcAttribute.scaleX, scaleY = arcAttribute.scaleY } = arc.attribute;
|
|
29230
|
+
const doStrokeOuter = !!(outerBorder && outerBorder.stroke);
|
|
29231
|
+
const doStrokeInner = !!(innerBorder && innerBorder.stroke);
|
|
29232
|
+
if (doOuterBorder) {
|
|
29310
29233
|
const { distance = arcAttribute.outerBorder.distance } = outerBorder;
|
|
29311
29234
|
const d = getScaledStroke(context, distance, context.dpr);
|
|
29312
29235
|
const deltaAngle = distance / outerRadius;
|
|
@@ -29322,15 +29245,15 @@
|
|
|
29322
29245
|
if (strokeCb) {
|
|
29323
29246
|
strokeCb(context, outerBorder, arcAttribute.outerBorder);
|
|
29324
29247
|
}
|
|
29325
|
-
else if (
|
|
29248
|
+
else if (doStrokeOuter) {
|
|
29326
29249
|
const lastOpacity = arcAttribute.outerBorder.opacity;
|
|
29327
29250
|
arcAttribute.outerBorder.opacity = opacity;
|
|
29328
|
-
context.setStrokeStyle(arc, outerBorder, x, y, arcAttribute.outerBorder);
|
|
29251
|
+
context.setStrokeStyle(arc, outerBorder, (originX - x) / scaleX, (originY - y) / scaleY, arcAttribute.outerBorder);
|
|
29329
29252
|
arcAttribute.outerBorder.opacity = lastOpacity;
|
|
29330
29253
|
context.stroke();
|
|
29331
29254
|
}
|
|
29332
29255
|
}
|
|
29333
|
-
if (
|
|
29256
|
+
if (doInnerBorder) {
|
|
29334
29257
|
const { distance = arcAttribute.innerBorder.distance } = innerBorder;
|
|
29335
29258
|
const d = getScaledStroke(context, distance, context.dpr);
|
|
29336
29259
|
const deltaAngle = distance / outerRadius;
|
|
@@ -29346,10 +29269,10 @@
|
|
|
29346
29269
|
if (strokeCb) {
|
|
29347
29270
|
strokeCb(context, innerBorder, arcAttribute.innerBorder);
|
|
29348
29271
|
}
|
|
29349
|
-
else if (
|
|
29272
|
+
else if (doStrokeInner) {
|
|
29350
29273
|
const lastOpacity = arcAttribute.innerBorder.opacity;
|
|
29351
29274
|
arcAttribute.innerBorder.opacity = opacity;
|
|
29352
|
-
context.setStrokeStyle(arc, innerBorder, x, y, arcAttribute.innerBorder);
|
|
29275
|
+
context.setStrokeStyle(arc, innerBorder, (originX - x) / scaleX, (originY - y) / scaleY, arcAttribute.innerBorder);
|
|
29353
29276
|
arcAttribute.innerBorder.opacity = lastOpacity;
|
|
29354
29277
|
context.stroke();
|
|
29355
29278
|
}
|
|
@@ -29386,8 +29309,16 @@
|
|
|
29386
29309
|
this.order = 0;
|
|
29387
29310
|
}
|
|
29388
29311
|
drawShape(circle, context, x, y, doFill, doStroke, fVisible, sVisible, circleAttribute, drawContext, fillCb, strokeCb) {
|
|
29389
|
-
const {
|
|
29390
|
-
|
|
29312
|
+
const { outerBorder, innerBorder } = circle.attribute;
|
|
29313
|
+
const doOuterBorder = outerBorder && outerBorder.visible !== false;
|
|
29314
|
+
const doInnerBorder = innerBorder && innerBorder.visible !== false;
|
|
29315
|
+
if (!(doOuterBorder || doInnerBorder)) {
|
|
29316
|
+
return;
|
|
29317
|
+
}
|
|
29318
|
+
const { radius = circleAttribute.radius, startAngle = circleAttribute.startAngle, endAngle = circleAttribute.endAngle, opacity = circleAttribute.opacity, x: originX = circleAttribute.x, y: originY = circleAttribute.y, scaleX = circleAttribute.scaleX, scaleY = circleAttribute.scaleY } = circle.attribute;
|
|
29319
|
+
const doStrokeOuter = !!(outerBorder && outerBorder.stroke);
|
|
29320
|
+
const doStrokeInner = !!(innerBorder && innerBorder.stroke);
|
|
29321
|
+
if (doOuterBorder) {
|
|
29391
29322
|
const { distance = circleAttribute.outerBorder.distance } = outerBorder;
|
|
29392
29323
|
const d = getScaledStroke(context, distance, context.dpr);
|
|
29393
29324
|
const dw = d;
|
|
@@ -29398,15 +29329,15 @@
|
|
|
29398
29329
|
if (strokeCb) {
|
|
29399
29330
|
strokeCb(context, outerBorder, circleAttribute.outerBorder);
|
|
29400
29331
|
}
|
|
29401
|
-
else if (
|
|
29332
|
+
else if (doStrokeOuter) {
|
|
29402
29333
|
const lastOpacity = circleAttribute.outerBorder.opacity;
|
|
29403
29334
|
circleAttribute.outerBorder.opacity = opacity;
|
|
29404
|
-
context.setStrokeStyle(circle, outerBorder, x, y, circleAttribute.outerBorder);
|
|
29335
|
+
context.setStrokeStyle(circle, outerBorder, (originX - x) / scaleX, (originY - y) / scaleY, circleAttribute.outerBorder);
|
|
29405
29336
|
circleAttribute.outerBorder.opacity = lastOpacity;
|
|
29406
29337
|
context.stroke();
|
|
29407
29338
|
}
|
|
29408
29339
|
}
|
|
29409
|
-
if (
|
|
29340
|
+
if (doInnerBorder) {
|
|
29410
29341
|
const { distance = circleAttribute.innerBorder.distance } = innerBorder;
|
|
29411
29342
|
const d = getScaledStroke(context, distance, context.dpr);
|
|
29412
29343
|
const dw = d;
|
|
@@ -29417,10 +29348,10 @@
|
|
|
29417
29348
|
if (strokeCb) {
|
|
29418
29349
|
strokeCb(context, innerBorder, circleAttribute.innerBorder);
|
|
29419
29350
|
}
|
|
29420
|
-
else if (
|
|
29351
|
+
else if (doStrokeInner) {
|
|
29421
29352
|
const lastOpacity = circleAttribute.innerBorder.opacity;
|
|
29422
29353
|
circleAttribute.innerBorder.opacity = opacity;
|
|
29423
|
-
context.setStrokeStyle(circle, innerBorder, x, y, circleAttribute.innerBorder);
|
|
29354
|
+
context.setStrokeStyle(circle, innerBorder, (originX - x) / scaleX, (originY - y) / scaleY, circleAttribute.innerBorder);
|
|
29424
29355
|
circleAttribute.innerBorder.opacity = lastOpacity;
|
|
29425
29356
|
context.stroke();
|
|
29426
29357
|
}
|
|
@@ -29494,12 +29425,38 @@
|
|
|
29494
29425
|
return;
|
|
29495
29426
|
}
|
|
29496
29427
|
if (!graphic.backgroundImg) {
|
|
29497
|
-
|
|
29498
|
-
|
|
29499
|
-
|
|
29500
|
-
|
|
29501
|
-
|
|
29502
|
-
|
|
29428
|
+
if (isObject(background)) {
|
|
29429
|
+
const { stroke, fill, lineWidth = 1, cornerRadius = 0, expandX = 0, expandY = 0 } = background;
|
|
29430
|
+
if (!stroke && !fill) {
|
|
29431
|
+
return;
|
|
29432
|
+
}
|
|
29433
|
+
context.beginPath();
|
|
29434
|
+
const { x, y, width, height } = getActualPosition(graphic);
|
|
29435
|
+
if (cornerRadius) {
|
|
29436
|
+
createRectPath(context, x - expandX, y - expandY, width + expandX * 2, height + expandY * 2, cornerRadius);
|
|
29437
|
+
}
|
|
29438
|
+
else {
|
|
29439
|
+
context.rect(x - expandX, y - expandY, width + expandX * 2, height + expandY * 2);
|
|
29440
|
+
}
|
|
29441
|
+
context.globalAlpha = 1;
|
|
29442
|
+
if (fill) {
|
|
29443
|
+
context.fillStyle = fill;
|
|
29444
|
+
context.fill();
|
|
29445
|
+
}
|
|
29446
|
+
if (stroke && lineWidth > 0) {
|
|
29447
|
+
context.lineWidth = lineWidth;
|
|
29448
|
+
context.strokeStyle = stroke;
|
|
29449
|
+
context.stroke();
|
|
29450
|
+
}
|
|
29451
|
+
}
|
|
29452
|
+
else {
|
|
29453
|
+
context.beginPath();
|
|
29454
|
+
const b = graphic.AABBBounds;
|
|
29455
|
+
context.rect(x, y, b.width(), b.height());
|
|
29456
|
+
context.fillStyle = background;
|
|
29457
|
+
context.globalAlpha = 1;
|
|
29458
|
+
context.fill();
|
|
29459
|
+
}
|
|
29503
29460
|
}
|
|
29504
29461
|
else {
|
|
29505
29462
|
const res = graphic.resources.get(background);
|
|
@@ -29525,6 +29482,32 @@
|
|
|
29525
29482
|
exports.DefaultImageBackgroundRenderContribution = __decorate([
|
|
29526
29483
|
injectable()
|
|
29527
29484
|
], exports.DefaultImageBackgroundRenderContribution);
|
|
29485
|
+
function getActualPosition(graphic) {
|
|
29486
|
+
const boundsPadding = parsePadding(graphic.attribute.boundsPadding);
|
|
29487
|
+
const bounds = graphic.AABBBounds;
|
|
29488
|
+
let x = bounds.x1;
|
|
29489
|
+
let y = bounds.y1;
|
|
29490
|
+
let width = bounds.width();
|
|
29491
|
+
let height = bounds.height();
|
|
29492
|
+
if (isNumber$1(boundsPadding)) {
|
|
29493
|
+
x += boundsPadding;
|
|
29494
|
+
y += boundsPadding;
|
|
29495
|
+
width -= boundsPadding * 2;
|
|
29496
|
+
height -= boundsPadding * 2;
|
|
29497
|
+
}
|
|
29498
|
+
else {
|
|
29499
|
+
x += boundsPadding[3];
|
|
29500
|
+
y += boundsPadding[0];
|
|
29501
|
+
width -= boundsPadding[1] + boundsPadding[3];
|
|
29502
|
+
height -= boundsPadding[0] + boundsPadding[2];
|
|
29503
|
+
}
|
|
29504
|
+
return {
|
|
29505
|
+
x,
|
|
29506
|
+
y,
|
|
29507
|
+
width,
|
|
29508
|
+
height
|
|
29509
|
+
};
|
|
29510
|
+
}
|
|
29528
29511
|
|
|
29529
29512
|
exports.DefaultRectRenderContribution = class DefaultRectRenderContribution {
|
|
29530
29513
|
constructor() {
|
|
@@ -29533,8 +29516,16 @@
|
|
|
29533
29516
|
this.order = 0;
|
|
29534
29517
|
}
|
|
29535
29518
|
drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb) {
|
|
29536
|
-
const {
|
|
29537
|
-
|
|
29519
|
+
const { outerBorder, innerBorder } = rect.attribute;
|
|
29520
|
+
const doOuterBorder = outerBorder && outerBorder.visible !== false;
|
|
29521
|
+
const doInnerBorder = innerBorder && innerBorder.visible !== false;
|
|
29522
|
+
if (!(doOuterBorder || doInnerBorder)) {
|
|
29523
|
+
return;
|
|
29524
|
+
}
|
|
29525
|
+
const { width = rectAttribute.width, height = rectAttribute.height, cornerRadius = rectAttribute.cornerRadius, opacity = rectAttribute.opacity, x: originX = rectAttribute.x, y: originY = rectAttribute.y, scaleX = rectAttribute.scaleX, scaleY = rectAttribute.scaleY } = rect.attribute;
|
|
29526
|
+
const doStrokeOuter = !!(outerBorder && outerBorder.stroke);
|
|
29527
|
+
const doStrokeInner = !!(innerBorder && innerBorder.stroke);
|
|
29528
|
+
if (doOuterBorder) {
|
|
29538
29529
|
const { distance = rectAttribute.outerBorder.distance } = outerBorder;
|
|
29539
29530
|
const d = getScaledStroke(context, distance, context.dpr);
|
|
29540
29531
|
const nextX = x - d;
|
|
@@ -29552,15 +29543,15 @@
|
|
|
29552
29543
|
if (strokeCb) {
|
|
29553
29544
|
strokeCb(context, outerBorder, rectAttribute.outerBorder);
|
|
29554
29545
|
}
|
|
29555
|
-
else if (
|
|
29546
|
+
else if (doStrokeOuter) {
|
|
29556
29547
|
const lastOpacity = rectAttribute.outerBorder.opacity;
|
|
29557
29548
|
rectAttribute.outerBorder.opacity = opacity;
|
|
29558
|
-
context.setStrokeStyle(rect, outerBorder, x, y, rectAttribute.outerBorder);
|
|
29549
|
+
context.setStrokeStyle(rect, outerBorder, (originX - x) / scaleX, (originY - y) / scaleY, rectAttribute.outerBorder);
|
|
29559
29550
|
rectAttribute.outerBorder.opacity = lastOpacity;
|
|
29560
29551
|
context.stroke();
|
|
29561
29552
|
}
|
|
29562
29553
|
}
|
|
29563
|
-
if (
|
|
29554
|
+
if (doInnerBorder) {
|
|
29564
29555
|
const { distance = rectAttribute.innerBorder.distance } = innerBorder;
|
|
29565
29556
|
const d = getScaledStroke(context, distance, context.dpr);
|
|
29566
29557
|
const nextX = x + d;
|
|
@@ -29578,10 +29569,10 @@
|
|
|
29578
29569
|
if (strokeCb) {
|
|
29579
29570
|
strokeCb(context, innerBorder, rectAttribute.innerBorder);
|
|
29580
29571
|
}
|
|
29581
|
-
else if (
|
|
29572
|
+
else if (doStrokeInner) {
|
|
29582
29573
|
const lastOpacity = rectAttribute.innerBorder.opacity;
|
|
29583
29574
|
rectAttribute.innerBorder.opacity = opacity;
|
|
29584
|
-
context.setStrokeStyle(rect, innerBorder, x, y, rectAttribute.innerBorder);
|
|
29575
|
+
context.setStrokeStyle(rect, innerBorder, (originX - x) / scaleX, (originY - y) / scaleY, rectAttribute.innerBorder);
|
|
29585
29576
|
rectAttribute.innerBorder.opacity = lastOpacity;
|
|
29586
29577
|
context.stroke();
|
|
29587
29578
|
}
|
|
@@ -29678,12 +29669,20 @@
|
|
|
29678
29669
|
this.order = 0;
|
|
29679
29670
|
}
|
|
29680
29671
|
drawShape(symbol, context, x, y, doFill, doStroke, fVisible, sVisible, symbolAttribute, drawContext, fillCb, strokeCb) {
|
|
29681
|
-
const { size = symbolAttribute.size, opacity = symbolAttribute.opacity, outerBorder, innerBorder } = symbol.attribute;
|
|
29682
29672
|
const parsedPath = symbol.getParsedPath();
|
|
29683
29673
|
if (!parsedPath) {
|
|
29684
29674
|
return;
|
|
29685
29675
|
}
|
|
29686
|
-
|
|
29676
|
+
const { outerBorder, innerBorder } = symbol.attribute;
|
|
29677
|
+
const doOuterBorder = outerBorder && outerBorder.visible !== false;
|
|
29678
|
+
const doInnerBorder = innerBorder && innerBorder.visible !== false;
|
|
29679
|
+
if (!(doOuterBorder || doInnerBorder)) {
|
|
29680
|
+
return;
|
|
29681
|
+
}
|
|
29682
|
+
const { size = symbolAttribute.size, opacity = symbolAttribute.opacity, x: originX = symbolAttribute.x, y: originY = symbolAttribute.y, scaleX = symbolAttribute.scaleX, scaleY = symbolAttribute.scaleY } = symbol.attribute;
|
|
29683
|
+
const doStrokeOuter = !!(outerBorder && outerBorder.stroke);
|
|
29684
|
+
const doStrokeInner = !!(innerBorder && innerBorder.stroke);
|
|
29685
|
+
if (doOuterBorder) {
|
|
29687
29686
|
const { distance = symbolAttribute.outerBorder.distance } = outerBorder;
|
|
29688
29687
|
const d = getScaledStroke(context, distance, context.dpr);
|
|
29689
29688
|
context.beginPath();
|
|
@@ -29694,15 +29693,15 @@
|
|
|
29694
29693
|
if (strokeCb) {
|
|
29695
29694
|
strokeCb(context, outerBorder, symbolAttribute.outerBorder);
|
|
29696
29695
|
}
|
|
29697
|
-
else if (
|
|
29696
|
+
else if (doStrokeOuter) {
|
|
29698
29697
|
const lastOpacity = symbolAttribute.outerBorder.opacity;
|
|
29699
29698
|
symbolAttribute.outerBorder.opacity = opacity;
|
|
29700
|
-
context.setStrokeStyle(symbol, outerBorder, x, y, symbolAttribute.outerBorder);
|
|
29699
|
+
context.setStrokeStyle(symbol, outerBorder, (originX - x) / scaleX, (originY - y) / scaleY, symbolAttribute.outerBorder);
|
|
29701
29700
|
symbolAttribute.outerBorder.opacity = lastOpacity;
|
|
29702
29701
|
context.stroke();
|
|
29703
29702
|
}
|
|
29704
29703
|
}
|
|
29705
|
-
if (
|
|
29704
|
+
if (doInnerBorder) {
|
|
29706
29705
|
const { distance = symbolAttribute.innerBorder.distance } = innerBorder;
|
|
29707
29706
|
const d = getScaledStroke(context, distance, context.dpr);
|
|
29708
29707
|
context.beginPath();
|
|
@@ -29713,10 +29712,10 @@
|
|
|
29713
29712
|
if (strokeCb) {
|
|
29714
29713
|
strokeCb(context, innerBorder, symbolAttribute.innerBorder);
|
|
29715
29714
|
}
|
|
29716
|
-
else if (
|
|
29715
|
+
else if (doStrokeInner) {
|
|
29717
29716
|
const lastOpacity = symbolAttribute.innerBorder.opacity;
|
|
29718
29717
|
symbolAttribute.innerBorder.opacity = opacity;
|
|
29719
|
-
context.setStrokeStyle(symbol, innerBorder, x, y, symbolAttribute.innerBorder);
|
|
29718
|
+
context.setStrokeStyle(symbol, innerBorder, (originX - x) / scaleX, (originY - y) / scaleY, symbolAttribute.innerBorder);
|
|
29720
29719
|
symbolAttribute.innerBorder.opacity = lastOpacity;
|
|
29721
29720
|
context.stroke();
|
|
29722
29721
|
}
|
|
@@ -29764,10 +29763,10 @@
|
|
|
29764
29763
|
return;
|
|
29765
29764
|
}
|
|
29766
29765
|
draw(params) {
|
|
29767
|
-
this.drawContribution.draw(this, {
|
|
29766
|
+
this.drawContribution.draw(this, Object.assign({}, this.drawParams));
|
|
29768
29767
|
}
|
|
29769
29768
|
afterDraw(params) {
|
|
29770
|
-
this.drawContribution.afterDraw && this.drawContribution.afterDraw(this, {
|
|
29769
|
+
this.drawContribution.afterDraw && this.drawContribution.afterDraw(this, Object.assign({}, this.drawParams));
|
|
29771
29770
|
return;
|
|
29772
29771
|
}
|
|
29773
29772
|
render(groups, params) {
|
|
@@ -29850,8 +29849,10 @@
|
|
|
29850
29849
|
graphic.forEachChildren(cb, reverse);
|
|
29851
29850
|
}
|
|
29852
29851
|
}
|
|
29853
|
-
|
|
29854
|
-
|
|
29852
|
+
function foreachAsync(graphic, defaultZIndex, cb, reverse = false) {
|
|
29853
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29854
|
+
yield graphic.forEachChildrenAsync(cb, reverse);
|
|
29855
|
+
});
|
|
29855
29856
|
}
|
|
29856
29857
|
function findNextGraphic(graphic, id, defaultZIndex, reverse = false) {
|
|
29857
29858
|
const childMap = {};
|
|
@@ -30459,12 +30460,12 @@
|
|
|
30459
30460
|
}
|
|
30460
30461
|
class OrthoCamera {
|
|
30461
30462
|
set params(params) {
|
|
30462
|
-
this._params = {
|
|
30463
|
+
this._params = Object.assign({}, params);
|
|
30463
30464
|
this._projectionMatrixCached = this.forceGetProjectionMatrix();
|
|
30464
30465
|
this._viewMatrixCached = this.forceGetViewMatrix();
|
|
30465
30466
|
}
|
|
30466
30467
|
get params() {
|
|
30467
|
-
return {
|
|
30468
|
+
return Object.assign({}, this._params);
|
|
30468
30469
|
}
|
|
30469
30470
|
constructor(params) {
|
|
30470
30471
|
this.params = params;
|
|
@@ -30678,9 +30679,9 @@
|
|
|
30678
30679
|
}
|
|
30679
30680
|
}
|
|
30680
30681
|
constructor(canvas, dpr) {
|
|
30681
|
-
this.fillAttributes = {
|
|
30682
|
-
this.strokeAttributes = {
|
|
30683
|
-
this.textAttributes = {
|
|
30682
|
+
this.fillAttributes = Object.assign(Object.assign({}, DefaultFillStyle), { opacity: 1 });
|
|
30683
|
+
this.strokeAttributes = Object.assign(Object.assign({}, DefaultStrokeStyle), { opacity: 1 });
|
|
30684
|
+
this.textAttributes = Object.assign(Object.assign({}, DefaultTextStyle), { opacity: 1 });
|
|
30684
30685
|
this._clearShadowStyle = false;
|
|
30685
30686
|
this._clearFilterStyle = false;
|
|
30686
30687
|
const context = canvas.nativeCanvas.getContext('2d');
|
|
@@ -32885,28 +32886,30 @@
|
|
|
32885
32886
|
injectable()
|
|
32886
32887
|
], NodeEnvContribution);
|
|
32887
32888
|
|
|
32888
|
-
|
|
32889
|
-
|
|
32890
|
-
|
|
32891
|
-
|
|
32892
|
-
|
|
32893
|
-
|
|
32894
|
-
.
|
|
32895
|
-
|
|
32896
|
-
|
|
32897
|
-
|
|
32898
|
-
|
|
32899
|
-
|
|
32900
|
-
|
|
32901
|
-
|
|
32902
|
-
|
|
32903
|
-
|
|
32904
|
-
|
|
32905
|
-
|
|
32906
|
-
|
|
32889
|
+
function makeUpCanvas(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList) {
|
|
32890
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32891
|
+
const dpr = wx.getSystemInfoSync().pixelRatio;
|
|
32892
|
+
for (let i = 0; i < canvasIdLists.length; i++) {
|
|
32893
|
+
const id = canvasIdLists[i];
|
|
32894
|
+
yield new Promise(resolve => {
|
|
32895
|
+
wx.createSelectorQuery()
|
|
32896
|
+
.select(`#${id}`)
|
|
32897
|
+
.fields({ node: true, size: true })
|
|
32898
|
+
.exec((res) => {
|
|
32899
|
+
const canvas = res[0].node;
|
|
32900
|
+
const width = res[0].width;
|
|
32901
|
+
const height = res[0].height;
|
|
32902
|
+
canvas.width = width * dpr;
|
|
32903
|
+
canvas.height = height * dpr;
|
|
32904
|
+
canvasMap.set(id, canvas);
|
|
32905
|
+
if (i >= freeCanvasIdx) {
|
|
32906
|
+
freeCanvasList.push(canvas);
|
|
32907
|
+
}
|
|
32908
|
+
resolve(null);
|
|
32909
|
+
});
|
|
32907
32910
|
});
|
|
32908
|
-
}
|
|
32909
|
-
}
|
|
32911
|
+
}
|
|
32912
|
+
});
|
|
32910
32913
|
}
|
|
32911
32914
|
let WxEnvContribution = class WxEnvContribution extends exports.BaseEnvContribution {
|
|
32912
32915
|
constructor() {
|
|
@@ -33033,6 +33036,12 @@
|
|
|
33033
33036
|
release(...params) {
|
|
33034
33037
|
this.releaseWindow();
|
|
33035
33038
|
}
|
|
33039
|
+
isVisible(bbox) {
|
|
33040
|
+
return true;
|
|
33041
|
+
}
|
|
33042
|
+
onVisibleChange(cb) {
|
|
33043
|
+
return;
|
|
33044
|
+
}
|
|
33036
33045
|
};
|
|
33037
33046
|
exports.BaseWindowHandlerContribution = __decorate([
|
|
33038
33047
|
injectable(),
|
|
@@ -33047,6 +33056,7 @@
|
|
|
33047
33056
|
super();
|
|
33048
33057
|
this.global = global;
|
|
33049
33058
|
this.type = 'browser';
|
|
33059
|
+
this._canvasIsIntersecting = true;
|
|
33050
33060
|
}
|
|
33051
33061
|
getTitle() {
|
|
33052
33062
|
return this.canvas.id.toString();
|
|
@@ -33067,6 +33077,37 @@
|
|
|
33067
33077
|
else {
|
|
33068
33078
|
this.createWindowByCanvas(params);
|
|
33069
33079
|
}
|
|
33080
|
+
this.postInit();
|
|
33081
|
+
}
|
|
33082
|
+
postInit() {
|
|
33083
|
+
this.observerCanvas();
|
|
33084
|
+
}
|
|
33085
|
+
isElementVisible(el) {
|
|
33086
|
+
const rect = el.getBoundingClientRect();
|
|
33087
|
+
const vWidth = window.innerWidth || document.documentElement.clientWidth;
|
|
33088
|
+
const vHeight = window.innerHeight || document.documentElement.clientHeight;
|
|
33089
|
+
if (rect.right < 0 || rect.bottom < 0 || rect.left > vWidth || rect.top > vHeight) {
|
|
33090
|
+
return false;
|
|
33091
|
+
}
|
|
33092
|
+
return true;
|
|
33093
|
+
}
|
|
33094
|
+
observerCanvas() {
|
|
33095
|
+
this._canvasIsIntersecting = this.isElementVisible(this.canvas.nativeCanvas);
|
|
33096
|
+
const observer = new IntersectionObserver((entries, observer) => {
|
|
33097
|
+
entries.forEach(entry => {
|
|
33098
|
+
if (this._canvasIsIntersecting !== entry.isIntersecting) {
|
|
33099
|
+
this._canvasIsIntersecting = entry.isIntersecting;
|
|
33100
|
+
this._onVisibleChangeCb(entry.isIntersecting);
|
|
33101
|
+
}
|
|
33102
|
+
else {
|
|
33103
|
+
this._canvasIsIntersecting = entry.isIntersecting;
|
|
33104
|
+
}
|
|
33105
|
+
});
|
|
33106
|
+
});
|
|
33107
|
+
if (!observer) {
|
|
33108
|
+
return;
|
|
33109
|
+
}
|
|
33110
|
+
observer.observe(this.canvas.nativeCanvas);
|
|
33070
33111
|
}
|
|
33071
33112
|
createWindowByConfig(params) {
|
|
33072
33113
|
const nativeCanvas = this.global.createCanvas({
|
|
@@ -33206,6 +33247,12 @@
|
|
|
33206
33247
|
}
|
|
33207
33248
|
context.nativeContext.restore();
|
|
33208
33249
|
}
|
|
33250
|
+
isVisible(bbox) {
|
|
33251
|
+
return this._canvasIsIntersecting;
|
|
33252
|
+
}
|
|
33253
|
+
onVisibleChange(cb) {
|
|
33254
|
+
this._onVisibleChangeCb = cb;
|
|
33255
|
+
}
|
|
33209
33256
|
};
|
|
33210
33257
|
BrowserWindowHandlerContribution.env = 'browser';
|
|
33211
33258
|
BrowserWindowHandlerContribution = __decorate([
|
|
@@ -33902,22 +33949,14 @@
|
|
|
33902
33949
|
}
|
|
33903
33950
|
if (event.changedTouches.length > 0) {
|
|
33904
33951
|
event.changedTouches.forEach((d, i) => {
|
|
33905
|
-
event.changedTouches[i] = {
|
|
33906
|
-
...event.changedTouches[i],
|
|
33907
|
-
offsetX: d.x,
|
|
33908
|
-
offsetY: d.y
|
|
33909
|
-
};
|
|
33952
|
+
event.changedTouches[i] = Object.assign(Object.assign({}, event.changedTouches[i]), { offsetX: d.x, offsetY: d.y });
|
|
33910
33953
|
});
|
|
33911
33954
|
event.offsetX = event.changedTouches[0].offsetX;
|
|
33912
33955
|
event.offsetY = event.changedTouches[0].offsetY;
|
|
33913
33956
|
}
|
|
33914
33957
|
if (event.touches.length > 0) {
|
|
33915
33958
|
event.touches.forEach((d, i) => {
|
|
33916
|
-
event.touches[i] = {
|
|
33917
|
-
...event.touches[i],
|
|
33918
|
-
offsetX: d.x,
|
|
33919
|
-
offsetY: d.y
|
|
33920
|
-
};
|
|
33959
|
+
event.touches[i] = Object.assign(Object.assign({}, event.touches[i]), { offsetX: d.x, offsetY: d.y });
|
|
33921
33960
|
});
|
|
33922
33961
|
}
|
|
33923
33962
|
event.preventDefault = () => {
|
|
@@ -35011,12 +35050,7 @@
|
|
|
35011
35050
|
this.canvas.applyPosition();
|
|
35012
35051
|
}
|
|
35013
35052
|
}
|
|
35014
|
-
params.renderService.render(group, {
|
|
35015
|
-
context: this.context,
|
|
35016
|
-
clear: (_a = params.background) !== null && _a !== void 0 ? _a : '#ffffff',
|
|
35017
|
-
...params,
|
|
35018
|
-
...userParams
|
|
35019
|
-
});
|
|
35053
|
+
params.renderService.render(group, Object.assign(Object.assign({ context: this.context, clear: (_a = params.background) !== null && _a !== void 0 ? _a : '#ffffff' }, params), userParams));
|
|
35020
35054
|
}
|
|
35021
35055
|
merge(layerHandlers) {
|
|
35022
35056
|
layerHandlers.forEach(l => {
|
|
@@ -35031,11 +35065,7 @@
|
|
|
35031
35065
|
drawTo(target, group, params) {
|
|
35032
35066
|
var _a;
|
|
35033
35067
|
const context = target.getContext();
|
|
35034
|
-
params.renderService.render(group, {
|
|
35035
|
-
context,
|
|
35036
|
-
...params,
|
|
35037
|
-
clear: params.clear ? (_a = params.background) !== null && _a !== void 0 ? _a : '#fff' : undefined
|
|
35038
|
-
});
|
|
35068
|
+
params.renderService.render(group, Object.assign(Object.assign({ context }, params), { clear: params.clear ? (_a = params.background) !== null && _a !== void 0 ? _a : '#fff' : undefined }));
|
|
35039
35069
|
return;
|
|
35040
35070
|
}
|
|
35041
35071
|
getContext() {
|
|
@@ -35083,13 +35113,7 @@
|
|
|
35083
35113
|
}
|
|
35084
35114
|
render(group, params) {
|
|
35085
35115
|
var _a;
|
|
35086
|
-
params.renderService.render(group, {
|
|
35087
|
-
context: this.context,
|
|
35088
|
-
...params,
|
|
35089
|
-
x: 0,
|
|
35090
|
-
y: 0,
|
|
35091
|
-
clear: (_a = params.background) !== null && _a !== void 0 ? _a : '#ffffff'
|
|
35092
|
-
});
|
|
35116
|
+
params.renderService.render(group, Object.assign(Object.assign({ context: this.context }, params), { x: 0, y: 0, clear: (_a = params.background) !== null && _a !== void 0 ? _a : '#ffffff' }));
|
|
35093
35117
|
}
|
|
35094
35118
|
prepare(dirtyBounds, params) {
|
|
35095
35119
|
return;
|
|
@@ -35460,15 +35484,7 @@
|
|
|
35460
35484
|
const idc = incrementalLayer.drawContribution || container.get(IncrementalDrawContribution);
|
|
35461
35485
|
idc.dirtyBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);
|
|
35462
35486
|
idc.backupDirtyBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);
|
|
35463
|
-
idc.draw(this.currentRenderService, {
|
|
35464
|
-
...drawContext,
|
|
35465
|
-
drawContribution: idc,
|
|
35466
|
-
clear: 'transparent',
|
|
35467
|
-
layer: incrementalLayer.layer,
|
|
35468
|
-
context: incrementalContext,
|
|
35469
|
-
startAtId: group._uid,
|
|
35470
|
-
break: false
|
|
35471
|
-
});
|
|
35487
|
+
idc.draw(this.currentRenderService, Object.assign(Object.assign({}, drawContext), { drawContribution: idc, clear: 'transparent', layer: incrementalLayer.layer, context: incrementalContext, startAtId: group._uid, break: false }));
|
|
35472
35488
|
incrementalLayer.drawContribution = idc;
|
|
35473
35489
|
const nextGraphic = this._findNextGraphic(group);
|
|
35474
35490
|
if (nextGraphic) {
|
|
@@ -35485,15 +35501,7 @@
|
|
|
35485
35501
|
subLayers.set(nextGraphic._uid, afterLayer);
|
|
35486
35502
|
}
|
|
35487
35503
|
const afterContext = afterLayer.layer.getNativeHandler().getContext();
|
|
35488
|
-
this.draw(this.currentRenderService, {
|
|
35489
|
-
...drawContext,
|
|
35490
|
-
drawContribution: idc,
|
|
35491
|
-
clear: 'transparent',
|
|
35492
|
-
layer: afterLayer.layer,
|
|
35493
|
-
context: afterContext,
|
|
35494
|
-
startAtId: nextGraphic._uid,
|
|
35495
|
-
break: false
|
|
35496
|
-
});
|
|
35504
|
+
this.draw(this.currentRenderService, Object.assign(Object.assign({}, drawContext), { drawContribution: idc, clear: 'transparent', layer: afterLayer.layer, context: afterContext, startAtId: nextGraphic._uid, break: false }));
|
|
35497
35505
|
}
|
|
35498
35506
|
}
|
|
35499
35507
|
}
|
|
@@ -35895,164 +35903,178 @@
|
|
|
35895
35903
|
this.defaultRenderMap.set(this.lineRender.numberType, this.lineRender);
|
|
35896
35904
|
this.defaultRenderMap.set(this.areaRender.numberType, this.areaRender);
|
|
35897
35905
|
}
|
|
35898
|
-
|
|
35899
|
-
|
|
35900
|
-
|
|
35901
|
-
|
|
35902
|
-
|
|
35903
|
-
|
|
35904
|
-
|
|
35905
|
-
|
|
35906
|
-
|
|
35907
|
-
|
|
35908
|
-
|
|
35909
|
-
|
|
35910
|
-
|
|
35911
|
-
|
|
35912
|
-
|
|
35913
|
-
|
|
35914
|
-
|
|
35915
|
-
|
|
35916
|
-
|
|
35917
|
-
|
|
35918
|
-
|
|
35919
|
-
|
|
35920
|
-
|
|
35921
|
-
|
|
35922
|
-
|
|
35923
|
-
.
|
|
35924
|
-
|
|
35925
|
-
|
|
35926
|
-
|
|
35927
|
-
|
|
35928
|
-
|
|
35929
|
-
|
|
35930
|
-
|
|
35931
|
-
|
|
35932
|
-
|
|
35933
|
-
|
|
35934
|
-
|
|
35935
|
-
|
|
35906
|
+
draw(renderService, drawContext) {
|
|
35907
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35908
|
+
if (this.checkingForDrawPromise) {
|
|
35909
|
+
return;
|
|
35910
|
+
}
|
|
35911
|
+
this.lastRenderService = renderService;
|
|
35912
|
+
this.lastDrawContext = drawContext;
|
|
35913
|
+
this.checkingForDrawPromise = this.checkForDraw(drawContext);
|
|
35914
|
+
const skipDraw = yield this.checkingForDrawPromise;
|
|
35915
|
+
this.checkingForDrawPromise = null;
|
|
35916
|
+
if (skipDraw) {
|
|
35917
|
+
return;
|
|
35918
|
+
}
|
|
35919
|
+
this.currentRenderService = renderService;
|
|
35920
|
+
const { context, x = 0, y = 0 } = drawContext;
|
|
35921
|
+
if (!context) {
|
|
35922
|
+
return;
|
|
35923
|
+
}
|
|
35924
|
+
context.inuse = true;
|
|
35925
|
+
context.clearMatrix();
|
|
35926
|
+
context.setTransformForCurrent(true);
|
|
35927
|
+
context.save();
|
|
35928
|
+
drawContext.restartIncremental && this.clearScreen(this.currentRenderService, context, drawContext);
|
|
35929
|
+
context.translate(x, y, true);
|
|
35930
|
+
context.save();
|
|
35931
|
+
renderService.renderTreeRoots
|
|
35932
|
+
.sort((a, b) => {
|
|
35933
|
+
var _a, _b;
|
|
35934
|
+
return ((_a = a.attribute.zIndex) !== null && _a !== void 0 ? _a : DefaultAttribute.zIndex) - ((_b = b.attribute.zIndex) !== null && _b !== void 0 ? _b : DefaultAttribute.zIndex);
|
|
35935
|
+
})
|
|
35936
|
+
.forEach(group => {
|
|
35937
|
+
this.renderGroup(group, drawContext);
|
|
35938
|
+
});
|
|
35939
|
+
this.hooks.completeDraw.tap('top-draw', () => {
|
|
35940
|
+
context.restore();
|
|
35941
|
+
context.restore();
|
|
35942
|
+
context.draw();
|
|
35943
|
+
context.inuse = false;
|
|
35944
|
+
this.rendering = false;
|
|
35945
|
+
});
|
|
35936
35946
|
});
|
|
35937
35947
|
}
|
|
35938
|
-
|
|
35939
|
-
this
|
|
35940
|
-
|
|
35941
|
-
|
|
35948
|
+
_increaseRender(group, drawContext) {
|
|
35949
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35950
|
+
this.rendering = true;
|
|
35951
|
+
yield this._renderIncrementalGroup(group, drawContext);
|
|
35952
|
+
return;
|
|
35953
|
+
});
|
|
35942
35954
|
}
|
|
35943
|
-
|
|
35944
|
-
this
|
|
35945
|
-
|
|
35946
|
-
|
|
35947
|
-
|
|
35948
|
-
|
|
35949
|
-
|
|
35950
|
-
|
|
35951
|
-
if (
|
|
35952
|
-
graphic.incrementalAt
|
|
35955
|
+
_renderIncrementalGroup(group, drawContext) {
|
|
35956
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35957
|
+
this.count = group.count;
|
|
35958
|
+
yield new Promise(resolve => {
|
|
35959
|
+
this.renderItem(group, drawContext, {
|
|
35960
|
+
drawingCb: () => __awaiter(this, void 0, void 0, function* () {
|
|
35961
|
+
if (group.count === 2) {
|
|
35962
|
+
const graphic = group.getChildAt(0);
|
|
35963
|
+
if (graphic.incremental && graphic.attribute.segments) {
|
|
35964
|
+
if (!graphic.incrementalAt) {
|
|
35965
|
+
graphic.incrementalAt = 0;
|
|
35966
|
+
}
|
|
35967
|
+
while (graphic.incrementalAt < graphic.attribute.segments.length) {
|
|
35968
|
+
drawContext.multiGraphicOptions = {
|
|
35969
|
+
startAtIdx: graphic.incrementalAt,
|
|
35970
|
+
length: graphic.incremental
|
|
35971
|
+
};
|
|
35972
|
+
this.renderItem(graphic, drawContext);
|
|
35973
|
+
graphic.incrementalAt += graphic.incremental;
|
|
35974
|
+
yield this.waitToNextFrame();
|
|
35975
|
+
}
|
|
35953
35976
|
}
|
|
35954
|
-
|
|
35955
|
-
drawContext.multiGraphicOptions = {
|
|
35956
|
-
startAtIdx: graphic.incrementalAt,
|
|
35957
|
-
length: graphic.incremental
|
|
35958
|
-
};
|
|
35977
|
+
else {
|
|
35959
35978
|
this.renderItem(graphic, drawContext);
|
|
35960
|
-
graphic.incrementalAt += graphic.incremental;
|
|
35961
|
-
await this.waitToNextFrame();
|
|
35962
35979
|
}
|
|
35980
|
+
resolve(false);
|
|
35981
|
+
return;
|
|
35963
35982
|
}
|
|
35964
|
-
|
|
35965
|
-
this.
|
|
35966
|
-
|
|
35967
|
-
|
|
35968
|
-
|
|
35969
|
-
|
|
35970
|
-
|
|
35971
|
-
|
|
35972
|
-
|
|
35973
|
-
|
|
35974
|
-
|
|
35975
|
-
|
|
35976
|
-
|
|
35977
|
-
|
|
35983
|
+
yield foreachAsync(group, DefaultAttribute.zIndex, (item, i) => {
|
|
35984
|
+
if (this.status === STATUS.STOP) {
|
|
35985
|
+
return true;
|
|
35986
|
+
}
|
|
35987
|
+
if (item.isContainer) {
|
|
35988
|
+
return false;
|
|
35989
|
+
}
|
|
35990
|
+
if (i < this.currentIdx) {
|
|
35991
|
+
return false;
|
|
35992
|
+
}
|
|
35993
|
+
const frameTail = this.currFrameStartAt + group.incremental;
|
|
35994
|
+
if (i < frameTail) {
|
|
35995
|
+
this.currentIdx = i + 1;
|
|
35996
|
+
this.renderItem(item, drawContext);
|
|
35997
|
+
}
|
|
35998
|
+
if (i === frameTail - 1) {
|
|
35999
|
+
this.currFrameStartAt = this.currentIdx;
|
|
36000
|
+
return this.waitToNextFrame();
|
|
36001
|
+
}
|
|
35978
36002
|
return false;
|
|
35979
|
-
}
|
|
35980
|
-
|
|
35981
|
-
|
|
35982
|
-
|
|
35983
|
-
this.renderItem(item, drawContext);
|
|
35984
|
-
}
|
|
35985
|
-
if (i === frameTail - 1) {
|
|
35986
|
-
this.currFrameStartAt = this.currentIdx;
|
|
35987
|
-
return this.waitToNextFrame();
|
|
35988
|
-
}
|
|
35989
|
-
return false;
|
|
35990
|
-
});
|
|
35991
|
-
resolve(false);
|
|
35992
|
-
}
|
|
36003
|
+
});
|
|
36004
|
+
resolve(false);
|
|
36005
|
+
})
|
|
36006
|
+
});
|
|
35993
36007
|
});
|
|
36008
|
+
this.hooks.completeDraw.call();
|
|
35994
36009
|
});
|
|
35995
|
-
this.hooks.completeDraw.call();
|
|
35996
36010
|
}
|
|
35997
|
-
|
|
35998
|
-
return
|
|
35999
|
-
|
|
36000
|
-
|
|
36011
|
+
waitToNextFrame() {
|
|
36012
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36013
|
+
return new Promise(resolve => {
|
|
36014
|
+
this.global.getRequestAnimationFrame()(() => {
|
|
36015
|
+
resolve(false);
|
|
36016
|
+
});
|
|
36001
36017
|
});
|
|
36002
36018
|
});
|
|
36003
36019
|
}
|
|
36004
|
-
|
|
36005
|
-
|
|
36006
|
-
|
|
36007
|
-
|
|
36008
|
-
|
|
36009
|
-
|
|
36010
|
-
|
|
36011
|
-
|
|
36020
|
+
checkForDraw(drawContext) {
|
|
36021
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36022
|
+
let skip = this.rendering;
|
|
36023
|
+
if (drawContext.restartIncremental) {
|
|
36024
|
+
skip = false;
|
|
36025
|
+
yield this.forceStop();
|
|
36026
|
+
this.resetToInit();
|
|
36027
|
+
}
|
|
36028
|
+
return skip;
|
|
36029
|
+
});
|
|
36012
36030
|
}
|
|
36013
|
-
|
|
36014
|
-
|
|
36015
|
-
this.
|
|
36016
|
-
|
|
36017
|
-
|
|
36018
|
-
this.
|
|
36019
|
-
|
|
36020
|
-
|
|
36031
|
+
forceStop() {
|
|
36032
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36033
|
+
if (this.rendering) {
|
|
36034
|
+
this.status = STATUS.STOP;
|
|
36035
|
+
yield new Promise(resolve => {
|
|
36036
|
+
this.hooks.completeDraw.tap('stopCb', () => {
|
|
36037
|
+
this.status = STATUS.NORMAL;
|
|
36038
|
+
this.hooks.completeDraw.taps = this.hooks.completeDraw.taps.filter(item => {
|
|
36039
|
+
return item.name !== 'stopCb';
|
|
36040
|
+
});
|
|
36041
|
+
resolve(false);
|
|
36021
36042
|
});
|
|
36022
|
-
resolve(false);
|
|
36023
36043
|
});
|
|
36024
|
-
}
|
|
36025
|
-
}
|
|
36044
|
+
}
|
|
36045
|
+
});
|
|
36026
36046
|
}
|
|
36027
36047
|
resetToInit() {
|
|
36028
36048
|
this.currFrameStartAt = 0;
|
|
36029
36049
|
this.currentIdx = 0;
|
|
36030
36050
|
}
|
|
36031
|
-
|
|
36032
|
-
|
|
36033
|
-
|
|
36034
|
-
|
|
36035
|
-
|
|
36036
|
-
|
|
36037
|
-
|
|
36038
|
-
|
|
36039
|
-
|
|
36040
|
-
|
|
36041
|
-
|
|
36042
|
-
|
|
36043
|
-
|
|
36044
|
-
|
|
36045
|
-
|
|
36046
|
-
|
|
36047
|
-
|
|
36048
|
-
|
|
36049
|
-
|
|
36050
|
-
|
|
36051
|
-
|
|
36052
|
-
|
|
36053
|
-
|
|
36054
|
-
|
|
36055
|
-
|
|
36051
|
+
renderGroup(group, drawContext) {
|
|
36052
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36053
|
+
if (drawContext.break || group.attribute.visibleAll === false) {
|
|
36054
|
+
return;
|
|
36055
|
+
}
|
|
36056
|
+
if (group.incremental && drawContext.startAtId === group._uid) {
|
|
36057
|
+
yield this._increaseRender(group, drawContext);
|
|
36058
|
+
drawContext.break = true;
|
|
36059
|
+
return;
|
|
36060
|
+
}
|
|
36061
|
+
yield new Promise(resolve => {
|
|
36062
|
+
this.renderItem(group, drawContext, {
|
|
36063
|
+
drawingCb: () => __awaiter(this, void 0, void 0, function* () {
|
|
36064
|
+
yield foreachAsync(group, DefaultAttribute.zIndex, (item) => __awaiter(this, void 0, void 0, function* () {
|
|
36065
|
+
if (drawContext.break) {
|
|
36066
|
+
return;
|
|
36067
|
+
}
|
|
36068
|
+
if (item.isContainer) {
|
|
36069
|
+
yield this.renderGroup(item, drawContext);
|
|
36070
|
+
}
|
|
36071
|
+
else {
|
|
36072
|
+
return;
|
|
36073
|
+
}
|
|
36074
|
+
}));
|
|
36075
|
+
resolve(false);
|
|
36076
|
+
})
|
|
36077
|
+
});
|
|
36056
36078
|
});
|
|
36057
36079
|
});
|
|
36058
36080
|
}
|
|
@@ -37031,7 +37053,7 @@
|
|
|
37031
37053
|
}
|
|
37032
37054
|
let picked = true;
|
|
37033
37055
|
if (!onlyTranslate ||
|
|
37034
|
-
(isNumber(cornerRadius, true) && cornerRadius !== 0) ||
|
|
37056
|
+
(isNumber$1(cornerRadius, true) && cornerRadius !== 0) ||
|
|
37035
37057
|
(isArray(cornerRadius) && cornerRadius.some(num => num !== 0))) {
|
|
37036
37058
|
picked = false;
|
|
37037
37059
|
this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => {
|
|
@@ -37913,7 +37935,7 @@
|
|
|
37913
37935
|
}
|
|
37914
37936
|
let picked = true;
|
|
37915
37937
|
if (!onlyTranslate ||
|
|
37916
|
-
(isNumber(cornerRadius, true) && cornerRadius !== 0) ||
|
|
37938
|
+
(isNumber$1(cornerRadius, true) && cornerRadius !== 0) ||
|
|
37917
37939
|
(isArray(cornerRadius) && cornerRadius.some(num => num !== 0))) {
|
|
37918
37940
|
picked = false;
|
|
37919
37941
|
this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => {
|
|
@@ -38597,20 +38619,8 @@
|
|
|
38597
38619
|
if (!subLayer || !subLayer.drawContribution) {
|
|
38598
38620
|
return;
|
|
38599
38621
|
}
|
|
38600
|
-
subLayer.drawContribution.draw(stage.renderService, {
|
|
38601
|
-
|
|
38602
|
-
y: stage.y,
|
|
38603
|
-
width: layer.viewWidth,
|
|
38604
|
-
height: layer.viewHeight,
|
|
38605
|
-
stage,
|
|
38606
|
-
layer,
|
|
38607
|
-
clear: 'transparent',
|
|
38608
|
-
renderService: stage.renderService,
|
|
38609
|
-
updateBounds: false,
|
|
38610
|
-
startAtId: group._uid,
|
|
38611
|
-
context: subLayer.layer.getNativeHandler().getContext(),
|
|
38612
|
-
...this.nextUserParams
|
|
38613
|
-
});
|
|
38622
|
+
subLayer.drawContribution.draw(stage.renderService, Object.assign({ x: stage.x, y: stage.y, width: layer.viewWidth, height: layer.viewHeight, stage,
|
|
38623
|
+
layer, clear: 'transparent', renderService: stage.renderService, updateBounds: false, startAtId: group._uid, context: subLayer.layer.getNativeHandler().getContext() }, this.nextUserParams));
|
|
38614
38624
|
});
|
|
38615
38625
|
this.nextUserParams = {};
|
|
38616
38626
|
this.nextFrameRenderGroupSet.clear();
|
|
@@ -38797,10 +38807,11 @@
|
|
|
38797
38807
|
this.activeEvent = 'onRegister';
|
|
38798
38808
|
this.id = Generator.GenAutoIncrementId();
|
|
38799
38809
|
this.key = this.name + this.id;
|
|
38810
|
+
this.tempBounds = new AABBBounds();
|
|
38800
38811
|
}
|
|
38801
38812
|
tryLayout(graphic) {
|
|
38802
38813
|
const p = graphic.parent;
|
|
38803
|
-
if (!p) {
|
|
38814
|
+
if (!p || !graphic.needUpdateLayout()) {
|
|
38804
38815
|
return;
|
|
38805
38816
|
}
|
|
38806
38817
|
const theme = getTheme(p).group;
|
|
@@ -38808,10 +38819,37 @@
|
|
|
38808
38819
|
if (display !== 'flex') {
|
|
38809
38820
|
return;
|
|
38810
38821
|
}
|
|
38811
|
-
const {
|
|
38812
|
-
|
|
38822
|
+
const { flexDirection = theme.flexDirection, flexWrap = theme.flexWrap, justifyContent = theme.justifyContent, alignItems = theme.alignItems, alignContent = theme.alignContent, clip = theme.clip } = p.attribute;
|
|
38823
|
+
let childrenWidth = 0;
|
|
38824
|
+
let childrenHeight = 0;
|
|
38825
|
+
let boundsLegal = 0;
|
|
38826
|
+
p.forEachChildren((child) => {
|
|
38827
|
+
const bounds = child.AABBBounds;
|
|
38828
|
+
if (flexDirection === 'column' || flexDirection === 'column-reverse') {
|
|
38829
|
+
childrenHeight += bounds.height();
|
|
38830
|
+
childrenWidth = Math.max(childrenWidth, bounds.width());
|
|
38831
|
+
}
|
|
38832
|
+
else {
|
|
38833
|
+
childrenWidth += bounds.width();
|
|
38834
|
+
childrenHeight = Math.max(childrenHeight, bounds.height());
|
|
38835
|
+
}
|
|
38836
|
+
boundsLegal += bounds.x1;
|
|
38837
|
+
boundsLegal += bounds.y1;
|
|
38838
|
+
boundsLegal += bounds.x2;
|
|
38839
|
+
boundsLegal += bounds.y2;
|
|
38840
|
+
});
|
|
38841
|
+
if (!isFinite(boundsLegal)) {
|
|
38813
38842
|
return;
|
|
38814
38843
|
}
|
|
38844
|
+
const width = p.attribute.width || childrenWidth;
|
|
38845
|
+
const height = p.attribute.height || childrenHeight;
|
|
38846
|
+
if (!p.attribute.width) {
|
|
38847
|
+
p.attribute.width = 0;
|
|
38848
|
+
}
|
|
38849
|
+
if (!p.attribute.height) {
|
|
38850
|
+
p.attribute.height = 0;
|
|
38851
|
+
}
|
|
38852
|
+
this.tempBounds.copy(p._AABBBounds);
|
|
38815
38853
|
const result = {
|
|
38816
38854
|
main: { len: width, field: 'x' },
|
|
38817
38855
|
cross: { len: height, field: 'y' },
|
|
@@ -38889,6 +38927,11 @@
|
|
|
38889
38927
|
const anchorPos = cross.len / 2;
|
|
38890
38928
|
this.layoutCross(children, alignItems, cross, anchorPos, mianLenArray, mainList[0], 0);
|
|
38891
38929
|
}
|
|
38930
|
+
else {
|
|
38931
|
+
children.forEach(child => {
|
|
38932
|
+
child.attribute[cross.field] = getPadding(child, cross.field);
|
|
38933
|
+
});
|
|
38934
|
+
}
|
|
38892
38935
|
}
|
|
38893
38936
|
else {
|
|
38894
38937
|
if (alignContent === 'flex-start') {
|
|
@@ -38931,12 +38974,21 @@
|
|
|
38931
38974
|
});
|
|
38932
38975
|
}
|
|
38933
38976
|
}
|
|
38977
|
+
children.forEach((child, idx) => {
|
|
38978
|
+
child.addUpdateBoundTag();
|
|
38979
|
+
child.addUpdatePositionTag();
|
|
38980
|
+
child.clearUpdateLayoutTag();
|
|
38981
|
+
});
|
|
38982
|
+
p.addUpdateLayoutTag();
|
|
38983
|
+
if (!clip && !this.tempBounds.equals(p.AABBBounds)) {
|
|
38984
|
+
this.tryLayout(p);
|
|
38985
|
+
}
|
|
38934
38986
|
}
|
|
38935
38987
|
layoutMain(p, children, justifyContent, main, mianLenArray, lastIdx, currSeg) {
|
|
38936
38988
|
if (justifyContent === 'flex-start') {
|
|
38937
38989
|
let pos = 0;
|
|
38938
38990
|
for (let i = lastIdx; i <= currSeg.idx; i++) {
|
|
38939
|
-
children[i].attribute[main.field] = pos;
|
|
38991
|
+
children[i].attribute[main.field] = pos + getPadding(children[i], main.field);
|
|
38940
38992
|
pos += mianLenArray[i].mainLen;
|
|
38941
38993
|
}
|
|
38942
38994
|
}
|
|
@@ -38944,14 +38996,14 @@
|
|
|
38944
38996
|
let pos = main.len;
|
|
38945
38997
|
for (let i = lastIdx; i <= currSeg.idx; i++) {
|
|
38946
38998
|
pos -= mianLenArray[i].mainLen;
|
|
38947
|
-
children[i].attribute[main.field] = pos;
|
|
38999
|
+
children[i].attribute[main.field] = pos + getPadding(children[i], main.field);
|
|
38948
39000
|
}
|
|
38949
39001
|
}
|
|
38950
39002
|
else if (justifyContent === 'space-around') {
|
|
38951
39003
|
if (currSeg.mainLen >= main.len) {
|
|
38952
39004
|
let pos = 0;
|
|
38953
39005
|
for (let i = lastIdx; i <= currSeg.idx; i++) {
|
|
38954
|
-
children[i].attribute[main.field] = pos;
|
|
39006
|
+
children[i].attribute[main.field] = pos + getPadding(children[i], main.field);
|
|
38955
39007
|
pos += mianLenArray[i].mainLen;
|
|
38956
39008
|
}
|
|
38957
39009
|
}
|
|
@@ -38960,7 +39012,7 @@
|
|
|
38960
39012
|
const padding = (main.len - currSeg.mainLen) / size / 2;
|
|
38961
39013
|
let pos = padding;
|
|
38962
39014
|
for (let i = lastIdx; i <= currSeg.idx; i++) {
|
|
38963
|
-
children[i].attribute[main.field] = pos;
|
|
39015
|
+
children[i].attribute[main.field] = pos + getPadding(children[i], main.field);
|
|
38964
39016
|
pos += mianLenArray[i].mainLen + padding * 2;
|
|
38965
39017
|
}
|
|
38966
39018
|
}
|
|
@@ -38969,7 +39021,7 @@
|
|
|
38969
39021
|
if (currSeg.mainLen >= main.len) {
|
|
38970
39022
|
let pos = 0;
|
|
38971
39023
|
for (let i = lastIdx; i <= currSeg.idx; i++) {
|
|
38972
|
-
children[i].attribute[main.field] = pos;
|
|
39024
|
+
children[i].attribute[main.field] = pos + getPadding(children[i], main.field);
|
|
38973
39025
|
pos += mianLenArray[i].mainLen;
|
|
38974
39026
|
}
|
|
38975
39027
|
}
|
|
@@ -38978,7 +39030,7 @@
|
|
|
38978
39030
|
const padding = (main.len - currSeg.mainLen) / (size * 2 - 2);
|
|
38979
39031
|
let pos = 0;
|
|
38980
39032
|
for (let i = lastIdx; i <= currSeg.idx; i++) {
|
|
38981
|
-
children[i].attribute[main.field] = pos;
|
|
39033
|
+
children[i].attribute[main.field] = pos + getPadding(children[i], main.field);
|
|
38982
39034
|
pos += mianLenArray[i].mainLen + padding * 2;
|
|
38983
39035
|
}
|
|
38984
39036
|
}
|
|
@@ -38987,17 +39039,18 @@
|
|
|
38987
39039
|
layoutCross(children, alignItem, cross, anchorPos, lenArray, currSeg, lastIdx) {
|
|
38988
39040
|
if (alignItem === 'flex-end') {
|
|
38989
39041
|
for (let i = lastIdx; i <= currSeg.idx; i++) {
|
|
38990
|
-
children[i].attribute[cross.field] = anchorPos - lenArray[i].crossLen;
|
|
39042
|
+
children[i].attribute[cross.field] = anchorPos - lenArray[i].crossLen + getPadding(children[i], cross.field);
|
|
38991
39043
|
}
|
|
38992
39044
|
}
|
|
38993
39045
|
else if (alignItem === 'center') {
|
|
38994
39046
|
for (let i = lastIdx; i <= currSeg.idx; i++) {
|
|
38995
|
-
children[i].attribute[cross.field] =
|
|
39047
|
+
children[i].attribute[cross.field] =
|
|
39048
|
+
anchorPos - lenArray[i].crossLen / 2 + getPadding(children[i], cross.field);
|
|
38996
39049
|
}
|
|
38997
39050
|
}
|
|
38998
39051
|
else {
|
|
38999
39052
|
for (let i = lastIdx; i <= currSeg.idx; i++) {
|
|
39000
|
-
children[i].attribute[cross.field] = anchorPos;
|
|
39053
|
+
children[i].attribute[cross.field] = anchorPos + getPadding(children[i], cross.field);
|
|
39001
39054
|
}
|
|
39002
39055
|
}
|
|
39003
39056
|
}
|
|
@@ -39025,11 +39078,30 @@
|
|
|
39025
39078
|
});
|
|
39026
39079
|
}
|
|
39027
39080
|
}
|
|
39081
|
+
function getPadding(graphic, field) {
|
|
39082
|
+
if (!graphic.attribute.boundsPadding) {
|
|
39083
|
+
return 0;
|
|
39084
|
+
}
|
|
39085
|
+
else if (isNumber(graphic.attribute.boundsPadding)) {
|
|
39086
|
+
return graphic.attribute.boundsPadding;
|
|
39087
|
+
}
|
|
39088
|
+
else if (isArray(graphic.attribute.boundsPadding) && graphic.attribute.boundsPadding.length === 1) {
|
|
39089
|
+
return graphic.attribute.boundsPadding[0];
|
|
39090
|
+
}
|
|
39091
|
+
const paddingArray = parsePadding(graphic.attribute.boundsPadding);
|
|
39092
|
+
if (field === 'x') {
|
|
39093
|
+
return paddingArray[3];
|
|
39094
|
+
}
|
|
39095
|
+
else if (field === 'y') {
|
|
39096
|
+
return paddingArray[0];
|
|
39097
|
+
}
|
|
39098
|
+
return 0;
|
|
39099
|
+
}
|
|
39028
39100
|
|
|
39029
39101
|
const defaultTicker = new DefaultTicker();
|
|
39030
39102
|
defaultTicker.addTimeline(defaultTimeline);
|
|
39031
|
-
const
|
|
39032
|
-
defaultTicker.setFPS(
|
|
39103
|
+
const TICKER_FPS = 60;
|
|
39104
|
+
defaultTicker.setFPS(TICKER_FPS);
|
|
39033
39105
|
|
|
39034
39106
|
class DirectionalLight {
|
|
39035
39107
|
constructor(dir, color, ambient = 0.8) {
|
|
@@ -39214,19 +39286,46 @@
|
|
|
39214
39286
|
this._afterRender = params.afterRender;
|
|
39215
39287
|
this.ticker = params.ticker || defaultTicker;
|
|
39216
39288
|
this.supportInteractiveLayer = params.interactiveLayer !== false;
|
|
39289
|
+
this.timeline = new DefaultTimeline();
|
|
39290
|
+
this.ticker.addTimeline(this.timeline);
|
|
39291
|
+
this.timeline.pause();
|
|
39292
|
+
this.optmize(params.optimize);
|
|
39293
|
+
}
|
|
39294
|
+
optmize(params) {
|
|
39295
|
+
this.optmizeRender(params === null || params === void 0 ? void 0 : params.skipRenderWithOutRange);
|
|
39296
|
+
}
|
|
39297
|
+
optmizeRender(skipRenderWithOutRange = true) {
|
|
39298
|
+
if (!skipRenderWithOutRange) {
|
|
39299
|
+
return;
|
|
39300
|
+
}
|
|
39301
|
+
this._skipRender = this.window.isVisible() ? 0 : 1;
|
|
39302
|
+
this.window.onVisibleChange(visible => {
|
|
39303
|
+
if (visible) {
|
|
39304
|
+
if (this.dirtyBounds) {
|
|
39305
|
+
this.dirtyBounds.setValue(0, 0, this._viewBox.width(), this._viewBox.height());
|
|
39306
|
+
}
|
|
39307
|
+
if (this._skipRender > 1) {
|
|
39308
|
+
this.renderNextFrame();
|
|
39309
|
+
}
|
|
39310
|
+
this._skipRender = 0;
|
|
39311
|
+
}
|
|
39312
|
+
else {
|
|
39313
|
+
this._skipRender = 1;
|
|
39314
|
+
}
|
|
39315
|
+
});
|
|
39316
|
+
}
|
|
39317
|
+
getTimeline() {
|
|
39318
|
+
return this.timeline;
|
|
39217
39319
|
}
|
|
39218
39320
|
get3dOptions(options) {
|
|
39219
39321
|
const { center = { x: this.width / 2, y: this.height / 2, z: 0, dx: 0, dy: 0, dz: 0 }, light = {}, alpha = 0, beta = 0, camera, fieldRatio = 1, fieldDepth } = options;
|
|
39220
|
-
return {
|
|
39221
|
-
...options,
|
|
39222
|
-
center,
|
|
39322
|
+
return Object.assign(Object.assign({}, options), { center,
|
|
39223
39323
|
light,
|
|
39224
39324
|
alpha,
|
|
39225
39325
|
beta,
|
|
39226
39326
|
camera,
|
|
39227
39327
|
fieldRatio,
|
|
39228
|
-
fieldDepth
|
|
39229
|
-
};
|
|
39328
|
+
fieldDepth });
|
|
39230
39329
|
}
|
|
39231
39330
|
set3dOptions(options) {
|
|
39232
39331
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -39422,18 +39521,22 @@
|
|
|
39422
39521
|
}
|
|
39423
39522
|
render(layers, params) {
|
|
39424
39523
|
this.ticker.start();
|
|
39425
|
-
this.
|
|
39426
|
-
this.
|
|
39427
|
-
|
|
39428
|
-
|
|
39429
|
-
|
|
39430
|
-
|
|
39431
|
-
|
|
39432
|
-
|
|
39433
|
-
|
|
39434
|
-
|
|
39435
|
-
|
|
39436
|
-
|
|
39524
|
+
this.timeline.resume();
|
|
39525
|
+
if (!this._skipRender) {
|
|
39526
|
+
this.lastRenderparams = params;
|
|
39527
|
+
this.hooks.beforeRender.call(this);
|
|
39528
|
+
(layers || this).forEach((layer, i) => {
|
|
39529
|
+
layer.render({
|
|
39530
|
+
renderService: this.renderService,
|
|
39531
|
+
background: layer === this.defaultLayer ? this.background : undefined,
|
|
39532
|
+
updateBounds: !!this.dirtyBounds
|
|
39533
|
+
}, Object.assign({ renderStyle: this.renderStyle }, params));
|
|
39534
|
+
});
|
|
39535
|
+
this.combineLayersToWindow();
|
|
39536
|
+
this.nextFrameRenderLayerSet.clear();
|
|
39537
|
+
this.hooks.afterRender.call(this);
|
|
39538
|
+
}
|
|
39539
|
+
this._skipRender && this._skipRender++;
|
|
39437
39540
|
}
|
|
39438
39541
|
combineLayersToWindow() {
|
|
39439
39542
|
this.forEach((layer, i) => {
|
|
@@ -39463,8 +39566,9 @@
|
|
|
39463
39566
|
}
|
|
39464
39567
|
}
|
|
39465
39568
|
_doRenderInThisFrame() {
|
|
39466
|
-
|
|
39467
|
-
|
|
39569
|
+
this.timeline.resume();
|
|
39570
|
+
this.ticker.start();
|
|
39571
|
+
if (this.nextFrameRenderLayerSet.size && !this._skipRender) {
|
|
39468
39572
|
this.hooks.beforeRender.call(this);
|
|
39469
39573
|
this.forEach((layer) => {
|
|
39470
39574
|
if (this.nextFrameRenderLayerSet.has(layer)) {
|
|
@@ -39472,13 +39576,14 @@
|
|
|
39472
39576
|
renderService: this.renderService,
|
|
39473
39577
|
background: layer === this.defaultLayer ? this.background : undefined,
|
|
39474
39578
|
updateBounds: !!this.dirtyBounds
|
|
39475
|
-
}, { renderStyle: this.renderStyle,
|
|
39579
|
+
}, Object.assign({ renderStyle: this.renderStyle }, (this.lastRenderparams || {})));
|
|
39476
39580
|
}
|
|
39477
39581
|
});
|
|
39478
39582
|
this.combineLayersToWindow();
|
|
39479
39583
|
this.hooks.afterRender.call(this);
|
|
39480
39584
|
this.nextFrameRenderLayerSet.clear();
|
|
39481
39585
|
}
|
|
39586
|
+
this._skipRender && this._skipRender++;
|
|
39482
39587
|
}
|
|
39483
39588
|
resizeWindow(w, h, rerender = true) {
|
|
39484
39589
|
this.window.resize(w, h);
|
|
@@ -39500,7 +39605,7 @@
|
|
|
39500
39605
|
this.forEachChildren(c => {
|
|
39501
39606
|
c.resizeView(w, h);
|
|
39502
39607
|
});
|
|
39503
|
-
this.camera && (this.camera.params = {
|
|
39608
|
+
this.camera && (this.camera.params = Object.assign(Object.assign({}, this.camera.params), { right: this.width, bottom: this.height }));
|
|
39504
39609
|
rerender && this.render();
|
|
39505
39610
|
}
|
|
39506
39611
|
setViewBox(x, y, w, h, rerender) {
|
|
@@ -39576,13 +39681,7 @@
|
|
|
39576
39681
|
}
|
|
39577
39682
|
renderTo(window, params) {
|
|
39578
39683
|
this.forEachChildren((layer, i) => {
|
|
39579
|
-
layer.drawTo(window, {
|
|
39580
|
-
...params,
|
|
39581
|
-
renderService: this.renderService,
|
|
39582
|
-
background: layer === this.defaultLayer ? this.background : undefined,
|
|
39583
|
-
clear: i === 0,
|
|
39584
|
-
updateBounds: !!this.dirtyBounds
|
|
39585
|
-
});
|
|
39684
|
+
layer.drawTo(window, Object.assign(Object.assign({}, params), { renderService: this.renderService, background: layer === this.defaultLayer ? this.background : undefined, clear: i === 0, updateBounds: !!this.dirtyBounds }));
|
|
39586
39685
|
});
|
|
39587
39686
|
}
|
|
39588
39687
|
renderToNewWindow(fullImage = true, viewBox) {
|
|
@@ -39614,8 +39713,8 @@
|
|
|
39614
39713
|
this.renderTo(window, {
|
|
39615
39714
|
x,
|
|
39616
39715
|
y,
|
|
39617
|
-
width: window.width,
|
|
39618
|
-
height: window.height
|
|
39716
|
+
width: viewBox ? viewBox.x2 : window.width,
|
|
39717
|
+
height: viewBox ? viewBox.y2 : window.height
|
|
39619
39718
|
});
|
|
39620
39719
|
return window;
|
|
39621
39720
|
}
|
|
@@ -39756,16 +39855,10 @@
|
|
|
39756
39855
|
return createRichText(params ? params.attribute : {});
|
|
39757
39856
|
}
|
|
39758
39857
|
VRichText.Text = function (params) {
|
|
39759
|
-
return {
|
|
39760
|
-
type: 'rich/text',
|
|
39761
|
-
...params
|
|
39762
|
-
};
|
|
39858
|
+
return Object.assign({ type: 'rich/text' }, params);
|
|
39763
39859
|
};
|
|
39764
39860
|
VRichText.Image = function (params) {
|
|
39765
|
-
return {
|
|
39766
|
-
type: 'rich/image',
|
|
39767
|
-
...params
|
|
39768
|
-
};
|
|
39861
|
+
return Object.assign({ type: 'rich/image' }, params);
|
|
39769
39862
|
};
|
|
39770
39863
|
|
|
39771
39864
|
function flatten(list, out) {
|
|
@@ -39775,7 +39868,7 @@
|
|
|
39775
39868
|
out.push(list);
|
|
39776
39869
|
}
|
|
39777
39870
|
function jsx(type, config, ...children) {
|
|
39778
|
-
const { key, attribute,
|
|
39871
|
+
const _a = config || {}, { key, attribute, stateProxy } = _a, props = __rest(_a, ["key", "attribute", "stateProxy"]);
|
|
39779
39872
|
let c = type;
|
|
39780
39873
|
if (isString(type)) {
|
|
39781
39874
|
c = graphicCreator[type];
|
|
@@ -39787,6 +39880,9 @@
|
|
|
39787
39880
|
if (c.type === 'richtext') ;
|
|
39788
39881
|
const g = c.prototype.type ? new c(attribute) : c(config);
|
|
39789
39882
|
parseToGraphic(g, childrenList, props);
|
|
39883
|
+
if (stateProxy) {
|
|
39884
|
+
g.stateProxy = stateProxy;
|
|
39885
|
+
}
|
|
39790
39886
|
return g;
|
|
39791
39887
|
}
|
|
39792
39888
|
function parseToGraphic(g, childrenList, props) {
|
|
@@ -39806,7 +39902,7 @@
|
|
|
39806
39902
|
}
|
|
39807
39903
|
if (isGraphic) {
|
|
39808
39904
|
childrenList.forEach((c) => {
|
|
39809
|
-
g.add(c);
|
|
39905
|
+
c && g.add(c);
|
|
39810
39906
|
});
|
|
39811
39907
|
Object.keys(props).forEach(k => {
|
|
39812
39908
|
const en = REACT_TO_CANOPUS_EVENTS[k];
|
|
@@ -39830,7 +39926,7 @@
|
|
|
39830
39926
|
}
|
|
39831
39927
|
}
|
|
39832
39928
|
|
|
39833
|
-
const version = "0.15.0-alpha.
|
|
39929
|
+
const version = "0.15.0-alpha.3";
|
|
39834
39930
|
|
|
39835
39931
|
exports.ACustomAnimate = ACustomAnimate;
|
|
39836
39932
|
exports.ARC3D_NUMBER_TYPE = ARC3D_NUMBER_TYPE;
|