@visactor/vrender-core 0.23.0-alpha.2 → 1.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/canvas/empty-context.d.ts +1 -0
- package/cjs/canvas/empty-context.js +4 -0
- package/cjs/canvas/empty-context.js.map +1 -1
- package/cjs/color-string/index.js +2 -1
- package/cjs/common/diff.d.ts +1 -0
- package/cjs/common/diff.js +19 -0
- package/cjs/common/diff.js.map +1 -0
- package/cjs/common/enums.d.ts +0 -16
- package/cjs/common/enums.js +2 -11
- package/cjs/common/enums.js.map +1 -1
- package/cjs/common/path-svg.js +2 -1
- package/cjs/common/performance-raf.d.ts +2 -0
- package/cjs/common/performance-raf.js +8 -3
- package/cjs/common/performance-raf.js.map +1 -1
- package/cjs/common/split-path.js +1 -2
- package/cjs/core/global-module.js +2 -0
- package/cjs/core/global.d.ts +3 -0
- package/cjs/core/global.js +13 -3
- package/cjs/core/global.js.map +1 -1
- package/cjs/core/stage.d.ts +1 -0
- package/cjs/core/stage.js +7 -6
- package/cjs/core/stage.js.map +1 -1
- package/cjs/event/event-system.js +6 -7
- package/cjs/event/event-system.js.map +1 -1
- package/cjs/event/federated-event/base-event.js +1 -1
- package/cjs/event/federated-event/base-event.js.map +1 -1
- package/cjs/graphic/graphic.d.ts +3 -9
- package/cjs/graphic/graphic.js +13 -80
- package/cjs/graphic/graphic.js.map +1 -1
- package/cjs/graphic/richtext/paragraph.d.ts +3 -0
- package/cjs/graphic/richtext/paragraph.js +14 -10
- package/cjs/graphic/richtext/paragraph.js.map +1 -1
- package/cjs/graphic/richtext/utils.js +12 -2
- package/cjs/graphic/richtext/utils.js.map +1 -1
- package/cjs/graphic/richtext.d.ts +3 -0
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +7 -6
- package/cjs/index.js.map +1 -1
- package/cjs/interface/animate.d.ts +1 -165
- package/cjs/interface/animate.js +1 -4
- package/cjs/interface/animate.js.map +1 -1
- package/cjs/interface/animation/animate.d.ts +100 -0
- package/cjs/interface/animation/animate.js +10 -0
- package/cjs/interface/animation/animate.js.map +1 -0
- package/cjs/interface/animation/easing.d.ts +3 -0
- package/cjs/interface/animation/easing.js +6 -0
- package/cjs/interface/animation/easing.js.map +1 -0
- package/cjs/interface/animation/index.d.ts +5 -0
- package/cjs/interface/animation/index.js +23 -0
- package/cjs/interface/animation/index.js.map +1 -0
- package/cjs/interface/animation/ticker.d.ts +37 -0
- package/cjs/interface/animation/ticker.js +11 -0
- package/cjs/interface/animation/ticker.js.map +1 -0
- package/cjs/interface/animation/timeline.d.ts +17 -0
- package/cjs/interface/animation/timeline.js +6 -0
- package/cjs/interface/animation/timeline.js.map +1 -0
- package/cjs/interface/animation/type.d.ts +13 -0
- package/cjs/interface/animation/type.js +15 -0
- package/cjs/interface/animation/type.js.map +1 -0
- package/cjs/interface/context.d.ts +1 -0
- package/cjs/interface/context.js.map +1 -1
- package/cjs/interface/global.d.ts +2 -0
- package/cjs/interface/global.js.map +1 -1
- package/cjs/interface/graphic/richText.d.ts +3 -0
- package/cjs/interface/graphic/richText.js.map +1 -1
- package/cjs/interface/graphic.d.ts +2 -2
- package/cjs/interface/graphic.js.map +1 -1
- package/cjs/interface/index.d.ts +1 -1
- package/cjs/interface/index.js +1 -1
- package/cjs/interface/index.js.map +1 -1
- package/cjs/interface/render.d.ts +6 -0
- package/cjs/interface/render.js.map +1 -1
- package/cjs/interface/stage.d.ts +2 -2
- package/cjs/interface/stage.js.map +1 -1
- package/cjs/plugins/builtin-plugin/edit-module.js +11 -8
- package/cjs/plugins/builtin-plugin/edit-module.js.map +1 -1
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js +1 -1
- package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
- package/cjs/render/contributions/render/arc-render.d.ts +4 -2
- package/cjs/render/contributions/render/arc-render.js +19 -17
- package/cjs/render/contributions/render/arc-render.js.map +1 -1
- package/cjs/render/contributions/render/base-render.d.ts +2 -2
- package/cjs/render/contributions/render/base-render.js +2 -2
- package/cjs/render/contributions/render/base-render.js.map +1 -1
- package/cjs/render/contributions/render/draw-contribution.d.ts +1 -0
- package/cjs/render/contributions/render/draw-contribution.js +23 -19
- package/cjs/render/contributions/render/draw-contribution.js.map +1 -1
- package/cjs/render/contributions/render/draw-interceptor.js +1 -0
- package/cjs/render/contributions/render/draw-interceptor.js.map +1 -1
- package/cjs/render/contributions/render/group-render.d.ts +2 -2
- package/cjs/render/contributions/render/group-render.js +14 -10
- package/cjs/render/contributions/render/group-render.js.map +1 -1
- package/cjs/render/contributions/render/rect-render.d.ts +3 -1
- package/cjs/render/contributions/render/rect-render.js +17 -15
- package/cjs/render/contributions/render/rect-render.js.map +1 -1
- package/cjs/render/contributions/render/symbol-render.d.ts +4 -2
- package/cjs/render/contributions/render/symbol-render.js +16 -11
- package/cjs/render/contributions/render/symbol-render.js.map +1 -1
- package/dist/index.es.js +643 -670
- package/es/canvas/empty-context.d.ts +1 -0
- package/es/canvas/empty-context.js +4 -0
- package/es/canvas/empty-context.js.map +1 -1
- package/es/color-string/index.js +2 -1
- package/es/common/diff.d.ts +1 -0
- package/es/common/diff.js +11 -0
- package/es/common/diff.js.map +1 -0
- package/es/common/enums.d.ts +0 -16
- package/es/common/enums.js +0 -20
- package/es/common/enums.js.map +1 -1
- package/es/common/path-svg.js +2 -1
- package/es/common/performance-raf.d.ts +2 -0
- package/es/common/performance-raf.js +8 -3
- package/es/common/performance-raf.js.map +1 -1
- package/es/common/split-path.js +1 -2
- package/es/core/global-module.js +2 -0
- package/es/core/global.d.ts +3 -0
- package/es/core/global.js +14 -2
- package/es/core/global.js.map +1 -1
- package/es/core/stage.d.ts +1 -0
- package/es/core/stage.js +7 -6
- package/es/core/stage.js.map +1 -1
- package/es/event/event-system.js +6 -7
- package/es/event/event-system.js.map +1 -1
- package/es/event/federated-event/base-event.js +1 -1
- package/es/event/federated-event/base-event.js.map +1 -1
- package/es/graphic/graphic.d.ts +3 -9
- package/es/graphic/graphic.js +13 -82
- package/es/graphic/graphic.js.map +1 -1
- package/es/graphic/richtext/paragraph.d.ts +3 -0
- package/es/graphic/richtext/paragraph.js +14 -10
- package/es/graphic/richtext/paragraph.js.map +1 -1
- package/es/graphic/richtext/utils.js +12 -2
- package/es/graphic/richtext/utils.js.map +1 -1
- package/es/graphic/richtext.d.ts +3 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -0
- package/es/index.js.map +1 -1
- package/es/interface/animate.d.ts +1 -165
- package/es/interface/animate.js +2 -1
- package/es/interface/animate.js.map +1 -1
- package/es/interface/animation/animate.d.ts +100 -0
- package/es/interface/animation/animate.js +6 -0
- package/es/interface/animation/animate.js.map +1 -0
- package/es/interface/animation/easing.d.ts +3 -0
- package/es/interface/animation/easing.js +2 -0
- package/es/interface/animation/easing.js.map +1 -0
- package/es/interface/animation/index.d.ts +5 -0
- package/es/interface/animation/index.js +10 -0
- package/es/interface/animation/index.js.map +1 -0
- package/es/interface/animation/ticker.d.ts +37 -0
- package/es/interface/animation/ticker.js +7 -0
- package/es/interface/animation/ticker.js.map +1 -0
- package/es/interface/animation/timeline.d.ts +17 -0
- package/es/interface/animation/timeline.js +2 -0
- package/es/interface/animation/timeline.js.map +1 -0
- package/es/interface/animation/type.d.ts +13 -0
- package/es/interface/animation/type.js +14 -0
- package/es/interface/animation/type.js.map +1 -0
- package/es/interface/context.d.ts +1 -0
- package/es/interface/context.js.map +1 -1
- package/es/interface/global.d.ts +2 -0
- package/es/interface/global.js.map +1 -1
- package/es/interface/graphic/richText.d.ts +3 -0
- package/es/interface/graphic/richText.js.map +1 -1
- package/es/interface/graphic.d.ts +2 -2
- package/es/interface/graphic.js.map +1 -1
- package/es/interface/index.d.ts +1 -1
- package/es/interface/index.js +1 -1
- package/es/interface/index.js.map +1 -1
- package/es/interface/render.d.ts +6 -0
- package/es/interface/render.js.map +1 -1
- package/es/interface/stage.d.ts +2 -2
- package/es/interface/stage.js.map +1 -1
- package/es/plugins/builtin-plugin/edit-module.js +11 -8
- package/es/plugins/builtin-plugin/edit-module.js.map +1 -1
- package/es/plugins/builtin-plugin/richtext-edit-plugin.js +1 -1
- package/es/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
- package/es/render/contributions/render/arc-render.d.ts +4 -2
- package/es/render/contributions/render/arc-render.js +19 -17
- package/es/render/contributions/render/arc-render.js.map +1 -1
- package/es/render/contributions/render/base-render.d.ts +2 -2
- package/es/render/contributions/render/base-render.js +2 -2
- package/es/render/contributions/render/base-render.js.map +1 -1
- package/es/render/contributions/render/draw-contribution.d.ts +1 -0
- package/es/render/contributions/render/draw-contribution.js +23 -19
- package/es/render/contributions/render/draw-contribution.js.map +1 -1
- package/es/render/contributions/render/draw-interceptor.js +1 -0
- package/es/render/contributions/render/draw-interceptor.js.map +1 -1
- package/es/render/contributions/render/group-render.d.ts +2 -2
- package/es/render/contributions/render/group-render.js +14 -10
- package/es/render/contributions/render/group-render.js.map +1 -1
- package/es/render/contributions/render/rect-render.d.ts +3 -1
- package/es/render/contributions/render/rect-render.js +17 -14
- package/es/render/contributions/render/rect-render.js.map +1 -1
- package/es/render/contributions/render/symbol-render.d.ts +4 -2
- package/es/render/contributions/render/symbol-render.js +16 -11
- package/es/render/contributions/render/symbol-render.js.map +1 -1
- package/package.json +4 -4
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { tau, halfPi as halfPi$1, AABBBounds, degreeToRadian, PointService, Point, abs, max, min, atan2, epsilon, Matrix, pi2, Logger, pi, isArray, isPointInLine, isNumberClose, TextMeasure, EventEmitter, isBoolean, isObject, isFunction, isString, has, isUndefined,
|
|
1
|
+
import { tau, halfPi as halfPi$1, AABBBounds, degreeToRadian, PointService, Point, abs, max, min, atan2, epsilon, Matrix, pi2, Logger, pi, isArray, isPointInLine, isNumberClose, TextMeasure, EventEmitter, isBoolean, isObject, isFunction, isString, has, isUndefined, cos, sin, pointAt, isNumber, sqrt, OBBBounds, isNil, normalTransform, isValidUrl, isBase64, acos, Color, DEFAULT_COLORS, LRU, lowerCamelCaseToMiddle, isValid, transformBoundsWithMatrix, getContextFont, rotatePoint, clampAngleByRadian, asin, arrayEqual, Bounds, getRectIntersect, isRectIntersect, isEqual, getAngleByPoint, getIntersectPoint, merge, calculateAnchorOfBounds, styleStringToObject } from '@visactor/vutils';
|
|
2
2
|
|
|
3
3
|
class Generator {
|
|
4
4
|
static GenAutoIncrementId() {
|
|
@@ -852,6 +852,41 @@ const EnvContribution = Symbol.for('EnvContribution');
|
|
|
852
852
|
const VGlobal = Symbol.for('VGlobal');
|
|
853
853
|
const DEFAULT_TEXT_FONT_FAMILY = 'PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol';
|
|
854
854
|
|
|
855
|
+
class PerformanceRAF {
|
|
856
|
+
constructor() {
|
|
857
|
+
this.nextAnimationFrameCbs = [];
|
|
858
|
+
this._rafHandle = null;
|
|
859
|
+
this.runAnimationFrame = (time) => {
|
|
860
|
+
this._rafHandle = null;
|
|
861
|
+
const cbs = this.nextAnimationFrameCbs;
|
|
862
|
+
this.nextAnimationFrameCbs = [];
|
|
863
|
+
for (let i = 0; i < cbs.length; i++) {
|
|
864
|
+
if (cbs[i]) {
|
|
865
|
+
cbs[i](time);
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
};
|
|
869
|
+
this.tryRunAnimationFrameNextFrame = () => {
|
|
870
|
+
if (this._rafHandle !== null || this.nextAnimationFrameCbs.length === 0) {
|
|
871
|
+
return;
|
|
872
|
+
}
|
|
873
|
+
this._rafHandle = vglobal.getRequestAnimationFrame()(this.runAnimationFrame);
|
|
874
|
+
};
|
|
875
|
+
}
|
|
876
|
+
addAnimationFrameCb(callback) {
|
|
877
|
+
this.nextAnimationFrameCbs.push(callback);
|
|
878
|
+
this.tryRunAnimationFrameNextFrame();
|
|
879
|
+
return this.nextAnimationFrameCbs.length - 1;
|
|
880
|
+
}
|
|
881
|
+
removeAnimationFrameCb(index) {
|
|
882
|
+
if (index >= 0 && index < this.nextAnimationFrameCbs.length) {
|
|
883
|
+
this.nextAnimationFrameCbs[index] = null;
|
|
884
|
+
return true;
|
|
885
|
+
}
|
|
886
|
+
return false;
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
|
|
855
890
|
const defaultEnv = 'browser';
|
|
856
891
|
let DefaultGlobal = class DefaultGlobal {
|
|
857
892
|
get env() {
|
|
@@ -932,6 +967,7 @@ let DefaultGlobal = class DefaultGlobal {
|
|
|
932
967
|
constructor(contributions) {
|
|
933
968
|
this.contributions = contributions;
|
|
934
969
|
this._isImageAnonymous = true;
|
|
970
|
+
this._performanceRAFList = [];
|
|
935
971
|
this.id = Generator.GenAutoIncrementId();
|
|
936
972
|
this.hooks = {
|
|
937
973
|
onSetEnv: new SyncHook(['lastEnv', 'env', 'global'])
|
|
@@ -1031,6 +1067,30 @@ let DefaultGlobal = class DefaultGlobal {
|
|
|
1031
1067
|
}
|
|
1032
1068
|
return this.envContribution.getRequestAnimationFrame();
|
|
1033
1069
|
}
|
|
1070
|
+
getSpecifiedRequestAnimationFrame(id) {
|
|
1071
|
+
if (!this._env) {
|
|
1072
|
+
this.setEnv(defaultEnv);
|
|
1073
|
+
}
|
|
1074
|
+
if (!this._performanceRAFList[id]) {
|
|
1075
|
+
this._performanceRAFList[id] = new PerformanceRAF();
|
|
1076
|
+
}
|
|
1077
|
+
const performanceRAF = this._performanceRAFList[id];
|
|
1078
|
+
return (callback) => {
|
|
1079
|
+
return performanceRAF.addAnimationFrameCb(callback);
|
|
1080
|
+
};
|
|
1081
|
+
}
|
|
1082
|
+
getSpecifiedCancelAnimationFrame(id) {
|
|
1083
|
+
if (!this._env) {
|
|
1084
|
+
this.setEnv(defaultEnv);
|
|
1085
|
+
}
|
|
1086
|
+
if (!this._performanceRAFList[id]) {
|
|
1087
|
+
return () => false;
|
|
1088
|
+
}
|
|
1089
|
+
const performanceRAF = this._performanceRAFList[id];
|
|
1090
|
+
return (handle) => {
|
|
1091
|
+
return performanceRAF.removeAnimationFrameCb(handle);
|
|
1092
|
+
};
|
|
1093
|
+
}
|
|
1034
1094
|
getCancelAnimationFrame() {
|
|
1035
1095
|
if (!this._env) {
|
|
1036
1096
|
this.setEnv(defaultEnv);
|
|
@@ -1220,6 +1280,34 @@ const strCommandMap = [
|
|
|
1220
1280
|
'rect'
|
|
1221
1281
|
];
|
|
1222
1282
|
|
|
1283
|
+
var AnimateMode;
|
|
1284
|
+
(function (AnimateMode) {
|
|
1285
|
+
AnimateMode[AnimateMode["NORMAL"] = 0] = "NORMAL";
|
|
1286
|
+
AnimateMode[AnimateMode["SET_ATTR_IMMEDIATELY"] = 1] = "SET_ATTR_IMMEDIATELY";
|
|
1287
|
+
})(AnimateMode || (AnimateMode = {}));
|
|
1288
|
+
|
|
1289
|
+
var STATUS$1;
|
|
1290
|
+
(function (STATUS) {
|
|
1291
|
+
STATUS[STATUS["INITIAL"] = 0] = "INITIAL";
|
|
1292
|
+
STATUS[STATUS["RUNNING"] = 1] = "RUNNING";
|
|
1293
|
+
STATUS[STATUS["PAUSE"] = 2] = "PAUSE";
|
|
1294
|
+
})(STATUS$1 || (STATUS$1 = {}));
|
|
1295
|
+
|
|
1296
|
+
var AnimateStepType;
|
|
1297
|
+
(function (AnimateStepType) {
|
|
1298
|
+
AnimateStepType["wait"] = "wait";
|
|
1299
|
+
AnimateStepType["from"] = "from";
|
|
1300
|
+
AnimateStepType["to"] = "to";
|
|
1301
|
+
AnimateStepType["customAnimate"] = "customAnimate";
|
|
1302
|
+
})(AnimateStepType || (AnimateStepType = {}));
|
|
1303
|
+
var AnimateStatus;
|
|
1304
|
+
(function (AnimateStatus) {
|
|
1305
|
+
AnimateStatus[AnimateStatus["INITIAL"] = 0] = "INITIAL";
|
|
1306
|
+
AnimateStatus[AnimateStatus["RUNNING"] = 1] = "RUNNING";
|
|
1307
|
+
AnimateStatus[AnimateStatus["PAUSED"] = 2] = "PAUSED";
|
|
1308
|
+
AnimateStatus[AnimateStatus["END"] = 3] = "END";
|
|
1309
|
+
})(AnimateStatus || (AnimateStatus = {}));
|
|
1310
|
+
|
|
1223
1311
|
const circleThreshold = tau - 1e-8;
|
|
1224
1312
|
class BoundsContext {
|
|
1225
1313
|
constructor(bounds) {
|
|
@@ -1481,25 +1569,6 @@ var AttributeUpdateType;
|
|
|
1481
1569
|
AttributeUpdateType[AttributeUpdateType["ROTATE"] = 24] = "ROTATE";
|
|
1482
1570
|
AttributeUpdateType[AttributeUpdateType["ROTATE_TO"] = 25] = "ROTATE_TO";
|
|
1483
1571
|
})(AttributeUpdateType || (AttributeUpdateType = {}));
|
|
1484
|
-
var AnimateStatus;
|
|
1485
|
-
(function (AnimateStatus) {
|
|
1486
|
-
AnimateStatus[AnimateStatus["INITIAL"] = 0] = "INITIAL";
|
|
1487
|
-
AnimateStatus[AnimateStatus["RUNNING"] = 1] = "RUNNING";
|
|
1488
|
-
AnimateStatus[AnimateStatus["PAUSED"] = 2] = "PAUSED";
|
|
1489
|
-
AnimateStatus[AnimateStatus["END"] = 3] = "END";
|
|
1490
|
-
})(AnimateStatus || (AnimateStatus = {}));
|
|
1491
|
-
var AnimateMode;
|
|
1492
|
-
(function (AnimateMode) {
|
|
1493
|
-
AnimateMode[AnimateMode["NORMAL"] = 0] = "NORMAL";
|
|
1494
|
-
AnimateMode[AnimateMode["SET_ATTR_IMMEDIATELY"] = 1] = "SET_ATTR_IMMEDIATELY";
|
|
1495
|
-
})(AnimateMode || (AnimateMode = {}));
|
|
1496
|
-
var AnimateStepType;
|
|
1497
|
-
(function (AnimateStepType) {
|
|
1498
|
-
AnimateStepType["wait"] = "wait";
|
|
1499
|
-
AnimateStepType["from"] = "from";
|
|
1500
|
-
AnimateStepType["to"] = "to";
|
|
1501
|
-
AnimateStepType["customAnimate"] = "customAnimate";
|
|
1502
|
-
})(AnimateStepType || (AnimateStepType = {}));
|
|
1503
1572
|
var Direction;
|
|
1504
1573
|
(function (Direction) {
|
|
1505
1574
|
Direction[Direction["ROW"] = 1] = "ROW";
|
|
@@ -3873,6 +3942,9 @@ function applyStrokeStyle(ctx, character) {
|
|
|
3873
3942
|
setTextStyle(ctx, character);
|
|
3874
3943
|
}
|
|
3875
3944
|
function getStrByWithCanvas(desc, width, character, guessIndex, needTestLetter) {
|
|
3945
|
+
if (desc.length <= 1) {
|
|
3946
|
+
return 0;
|
|
3947
|
+
}
|
|
3876
3948
|
if (!width || width <= 0) {
|
|
3877
3949
|
return 0;
|
|
3878
3950
|
}
|
|
@@ -3953,6 +4025,15 @@ function testLetter2(string, index) {
|
|
|
3953
4025
|
return i + 1;
|
|
3954
4026
|
}
|
|
3955
4027
|
function measureTextCanvas(text, character, mode = 'actual') {
|
|
4028
|
+
var _a;
|
|
4029
|
+
if (text === '') {
|
|
4030
|
+
return {
|
|
4031
|
+
ascent: 0,
|
|
4032
|
+
height: 0,
|
|
4033
|
+
descent: 0,
|
|
4034
|
+
width: 0
|
|
4035
|
+
};
|
|
4036
|
+
}
|
|
3956
4037
|
const textMeasure = application.graphicUtil.textMeasure;
|
|
3957
4038
|
const measurement = textMeasure.measureText(text, character);
|
|
3958
4039
|
const result = {
|
|
@@ -3975,6 +4056,8 @@ function measureTextCanvas(text, character, mode = 'actual') {
|
|
|
3975
4056
|
result.ascent = Math.floor(ascent);
|
|
3976
4057
|
result.descent = result.height - result.ascent;
|
|
3977
4058
|
}
|
|
4059
|
+
const space = (_a = character.space) !== null && _a !== void 0 ? _a : 0;
|
|
4060
|
+
result.width += space;
|
|
3978
4061
|
return result;
|
|
3979
4062
|
}
|
|
3980
4063
|
|
|
@@ -6397,7 +6480,7 @@ class FederatedEvent {
|
|
|
6397
6480
|
}
|
|
6398
6481
|
_composedDetailPath(params) {
|
|
6399
6482
|
if (params && params.graphic) {
|
|
6400
|
-
const g =
|
|
6483
|
+
const g = params.graphic;
|
|
6401
6484
|
if (g.stage) {
|
|
6402
6485
|
const path = g.stage.eventSystem.manager.propagationPath(g);
|
|
6403
6486
|
this.detailPath.push(path);
|
|
@@ -7392,32 +7475,22 @@ class EventSystem {
|
|
|
7392
7475
|
this.eventsAdded = true;
|
|
7393
7476
|
}
|
|
7394
7477
|
removeEvents() {
|
|
7478
|
+
var _a;
|
|
7395
7479
|
if (!this.eventsAdded || !this.domElement) {
|
|
7396
7480
|
return;
|
|
7397
7481
|
}
|
|
7398
7482
|
const { globalObj, domElement } = this;
|
|
7483
|
+
const globalDocument = (_a = globalObj.getDocument()) !== null && _a !== void 0 ? _a : domElement;
|
|
7399
7484
|
if (this.supportsPointerEvents) {
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
globalObj.getDocument().removeEventListener('pointerup', this.onPointerUp, true);
|
|
7403
|
-
}
|
|
7404
|
-
else {
|
|
7405
|
-
domElement.removeEventListener('pointermove', this.onPointerMove, true);
|
|
7406
|
-
domElement.removeEventListener('pointerup', this.onPointerUp, true);
|
|
7407
|
-
}
|
|
7485
|
+
globalDocument.removeEventListener('pointermove', this.onPointerMove, true);
|
|
7486
|
+
globalDocument.removeEventListener('pointerup', this.onPointerUp, true);
|
|
7408
7487
|
domElement.removeEventListener('pointerdown', this.onPointerDown, true);
|
|
7409
7488
|
domElement.removeEventListener('pointerleave', this.onPointerOverOut, true);
|
|
7410
7489
|
domElement.removeEventListener('pointerover', this.onPointerOverOut, true);
|
|
7411
7490
|
}
|
|
7412
7491
|
else {
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
globalObj.getDocument().removeEventListener('mouseup', this.onPointerUp, true);
|
|
7416
|
-
}
|
|
7417
|
-
else {
|
|
7418
|
-
domElement.removeEventListener('mousemove', this.onPointerMove, true);
|
|
7419
|
-
domElement.removeEventListener('mouseup', this.onPointerUp, true);
|
|
7420
|
-
}
|
|
7492
|
+
globalDocument.removeEventListener('mousemove', this.onPointerMove, true);
|
|
7493
|
+
globalDocument.removeEventListener('mouseup', this.onPointerUp, true);
|
|
7421
7494
|
domElement.removeEventListener('mousedown', this.onPointerDown, true);
|
|
7422
7495
|
domElement.removeEventListener('mouseout', this.onPointerOverOut, true);
|
|
7423
7496
|
domElement.removeEventListener('mouseover', this.onPointerOverOut, true);
|
|
@@ -7663,325 +7736,97 @@ class EventSystem {
|
|
|
7663
7736
|
}
|
|
7664
7737
|
}
|
|
7665
7738
|
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
(
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
})
|
|
7676
|
-
class ColorStore {
|
|
7677
|
-
static Get(str, size = ColorType.Color1, arr = [0, 0, 0, 1]) {
|
|
7678
|
-
if (size === ColorType.Color1) {
|
|
7679
|
-
const color = ColorStore.store1[str];
|
|
7680
|
-
if (color) {
|
|
7681
|
-
arr[0] = color[0];
|
|
7682
|
-
arr[1] = color[1];
|
|
7683
|
-
arr[2] = color[2];
|
|
7684
|
-
arr[3] = color[3];
|
|
7685
|
-
return arr;
|
|
7739
|
+
const PARALLEL_NUMBER = 10;
|
|
7740
|
+
class ResourceLoader {
|
|
7741
|
+
static GetImage(url, mark) {
|
|
7742
|
+
var _a;
|
|
7743
|
+
const data = ResourceLoader.cache.get(url);
|
|
7744
|
+
if (data) {
|
|
7745
|
+
if (data.loadState === 'fail') {
|
|
7746
|
+
application.global.getRequestAnimationFrame()(() => {
|
|
7747
|
+
mark.imageLoadFail(url);
|
|
7748
|
+
});
|
|
7686
7749
|
}
|
|
7687
|
-
|
|
7688
|
-
|
|
7689
|
-
|
|
7690
|
-
|
|
7691
|
-
|
|
7692
|
-
arr[0] = data[0];
|
|
7693
|
-
arr[1] = data[1];
|
|
7694
|
-
arr[2] = data[2];
|
|
7695
|
-
arr[3] = data[3];
|
|
7750
|
+
else if (data.loadState === 'init' || data.loadState === 'loading') {
|
|
7751
|
+
(_a = data.waitingMark) === null || _a === void 0 ? void 0 : _a.push(mark);
|
|
7752
|
+
}
|
|
7753
|
+
else if (mark) {
|
|
7754
|
+
mark.imageLoadSuccess(url, data.data);
|
|
7696
7755
|
}
|
|
7697
|
-
return arr;
|
|
7698
|
-
}
|
|
7699
|
-
const color = ColorStore.store255[str];
|
|
7700
|
-
if (color) {
|
|
7701
|
-
arr[0] = color[0];
|
|
7702
|
-
arr[1] = color[1];
|
|
7703
|
-
arr[2] = color[2];
|
|
7704
|
-
arr[3] = color[3];
|
|
7705
|
-
return arr;
|
|
7706
7756
|
}
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
ColorStore.store1[str] = [c.r / 255, c.g / 255, c.b / 255, c.opacity];
|
|
7710
|
-
ColorStore.store255[str] = [c.r, c.g, c.b, c.opacity];
|
|
7711
|
-
arr[0] = c.r;
|
|
7712
|
-
arr[1] = c.g;
|
|
7713
|
-
arr[2] = c.b;
|
|
7714
|
-
arr[3] = c.opacity;
|
|
7757
|
+
else {
|
|
7758
|
+
ResourceLoader.loadImage(url, mark);
|
|
7715
7759
|
}
|
|
7716
|
-
return arr;
|
|
7717
7760
|
}
|
|
7718
|
-
static
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7761
|
+
static GetSvg(svgStr, mark) {
|
|
7762
|
+
var _a;
|
|
7763
|
+
let data = ResourceLoader.cache.get(svgStr);
|
|
7764
|
+
if (data) {
|
|
7765
|
+
if (data.loadState === 'fail') {
|
|
7766
|
+
application.global.getRequestAnimationFrame()(() => {
|
|
7767
|
+
mark.imageLoadFail(svgStr);
|
|
7768
|
+
});
|
|
7769
|
+
}
|
|
7770
|
+
else if (data.loadState === 'init' || data.loadState === 'loading') {
|
|
7771
|
+
(_a = data.waitingMark) === null || _a === void 0 ? void 0 : _a.push(mark);
|
|
7772
|
+
}
|
|
7773
|
+
else if (mark) {
|
|
7774
|
+
mark.imageLoadSuccess(svgStr, data.data);
|
|
7722
7775
|
}
|
|
7723
|
-
ColorStore.store1[str] = arr;
|
|
7724
|
-
ColorStore.store255[str] = [
|
|
7725
|
-
Math.floor(arr[0] * 255),
|
|
7726
|
-
Math.floor(arr[1] * 255),
|
|
7727
|
-
Math.floor(arr[2] * 255),
|
|
7728
|
-
Math.floor(arr[3] * 255)
|
|
7729
|
-
];
|
|
7730
7776
|
}
|
|
7731
7777
|
else {
|
|
7732
|
-
|
|
7733
|
-
|
|
7778
|
+
data = { type: 'image', loadState: 'init' };
|
|
7779
|
+
ResourceLoader.cache.set(svgStr, data);
|
|
7780
|
+
data.dataPromise = application.global.loadSvg(svgStr);
|
|
7781
|
+
if (!data.dataPromise) {
|
|
7782
|
+
data.loadState = 'fail';
|
|
7783
|
+
mark.imageLoadFail(svgStr);
|
|
7784
|
+
}
|
|
7785
|
+
else {
|
|
7786
|
+
data.waitingMark = [mark];
|
|
7787
|
+
data.dataPromise.then(res => {
|
|
7788
|
+
var _a;
|
|
7789
|
+
data.loadState = (res === null || res === void 0 ? void 0 : res.data) ? 'success' : 'fail';
|
|
7790
|
+
data.data = res === null || res === void 0 ? void 0 : res.data;
|
|
7791
|
+
(_a = data.waitingMark) === null || _a === void 0 ? void 0 : _a.map((mark, index) => {
|
|
7792
|
+
if (res === null || res === void 0 ? void 0 : res.data) {
|
|
7793
|
+
data.loadState = 'success';
|
|
7794
|
+
data.data = res.data;
|
|
7795
|
+
mark.imageLoadSuccess(svgStr, res.data);
|
|
7796
|
+
}
|
|
7797
|
+
else {
|
|
7798
|
+
data.loadState = 'fail';
|
|
7799
|
+
mark.imageLoadFail(svgStr);
|
|
7800
|
+
}
|
|
7801
|
+
});
|
|
7802
|
+
data.waitingMark && (data.waitingMark = []);
|
|
7803
|
+
});
|
|
7734
7804
|
}
|
|
7735
|
-
ColorStore.store255[str] = arr;
|
|
7736
|
-
ColorStore.store1[str] = [arr[0] / 255, arr[1] / 255, arr[2] / 255, arr[3]];
|
|
7737
7805
|
}
|
|
7738
7806
|
}
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
}
|
|
7751
|
-
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
return (from && colorArrayToString(from)) || (to && colorArrayToString(to)) || false;
|
|
7763
|
-
}
|
|
7764
|
-
let fromArray;
|
|
7765
|
-
let toArray;
|
|
7766
|
-
let fromGradient = false;
|
|
7767
|
-
let toGradient = false;
|
|
7768
|
-
if (Array.isArray(from)) {
|
|
7769
|
-
fromArray = from;
|
|
7770
|
-
}
|
|
7771
|
-
else if (typeof from === 'string') {
|
|
7772
|
-
fromArray = ColorStore.Get(from, ColorType.Color255);
|
|
7773
|
-
}
|
|
7774
|
-
else {
|
|
7775
|
-
fromGradient = true;
|
|
7776
|
-
}
|
|
7777
|
-
if (Array.isArray(to)) {
|
|
7778
|
-
toArray = to;
|
|
7779
|
-
}
|
|
7780
|
-
else if (typeof to === 'string') {
|
|
7781
|
-
toArray = ColorStore.Get(to, ColorType.Color255);
|
|
7782
|
-
}
|
|
7783
|
-
else {
|
|
7784
|
-
toGradient = true;
|
|
7785
|
-
}
|
|
7786
|
-
if (fromGradient !== toGradient) {
|
|
7787
|
-
const gradient = (fromGradient ? from : to);
|
|
7788
|
-
const pure = (fromGradient ? to : from);
|
|
7789
|
-
const gradientFromPure = Object.assign(Object.assign({}, gradient), { stops: gradient.stops.map(v => (Object.assign(Object.assign({}, v), { color: colorArrayToString(pure) }))) });
|
|
7790
|
-
return fromGradient
|
|
7791
|
-
? interpolateColor(gradient, gradientFromPure, ratio, alphaChannel, cb)
|
|
7792
|
-
: interpolateColor(gradientFromPure, gradient, ratio, alphaChannel, cb);
|
|
7793
|
-
}
|
|
7794
|
-
if (fromGradient) {
|
|
7795
|
-
if (from.gradient === to.gradient) {
|
|
7796
|
-
const fc = from;
|
|
7797
|
-
const tc = to;
|
|
7798
|
-
const fromStops = fc.stops;
|
|
7799
|
-
const toStops = tc.stops;
|
|
7800
|
-
if (fromStops.length !== toStops.length) {
|
|
7801
|
-
return false;
|
|
7802
|
-
}
|
|
7803
|
-
if (fc.gradient === 'linear') {
|
|
7804
|
-
return interpolateGradientLinearColor(fc, tc, ratio);
|
|
7805
|
-
}
|
|
7806
|
-
else if (fc.gradient === 'radial') {
|
|
7807
|
-
return interpolateGradientRadialColor(fc, tc, ratio);
|
|
7808
|
-
}
|
|
7809
|
-
else if (fc.gradient === 'conical') {
|
|
7810
|
-
return interpolateGradientConicalColor(fc, tc, ratio);
|
|
7811
|
-
}
|
|
7812
|
-
}
|
|
7813
|
-
return false;
|
|
7814
|
-
}
|
|
7815
|
-
cb && cb(fromArray, toArray);
|
|
7816
|
-
const result = interpolatePureColorArray(fromArray, toArray, ratio);
|
|
7817
|
-
return colorArrayToString(result, alphaChannel);
|
|
7818
|
-
}
|
|
7819
|
-
function interpolateGradientLinearColor(fc, tc, ratio) {
|
|
7820
|
-
const fStops = fc.stops;
|
|
7821
|
-
const tStops = tc.stops;
|
|
7822
|
-
const color = {
|
|
7823
|
-
gradient: 'linear',
|
|
7824
|
-
x0: fc.x0 + (tc.x0 - fc.x0) * ratio,
|
|
7825
|
-
x1: fc.x1 + (tc.x1 - fc.x1) * ratio,
|
|
7826
|
-
y0: fc.y0 + (tc.y0 - fc.y0) * ratio,
|
|
7827
|
-
y1: fc.y1 + (tc.y1 - fc.y1) * ratio,
|
|
7828
|
-
stops: new Array(fStops.length).fill(0).map((_, i) => {
|
|
7829
|
-
return {
|
|
7830
|
-
color: colorStringInterpolationToStr(fStops[i].color, tStops[i].color, ratio),
|
|
7831
|
-
offset: fStops[i].offset + (tStops[i].offset - fStops[i].offset) * ratio
|
|
7832
|
-
};
|
|
7833
|
-
})
|
|
7834
|
-
};
|
|
7835
|
-
return color;
|
|
7836
|
-
}
|
|
7837
|
-
function interpolateGradientRadialColor(fc, tc, ratio) {
|
|
7838
|
-
const fStops = fc.stops;
|
|
7839
|
-
const tStops = tc.stops;
|
|
7840
|
-
const color = {
|
|
7841
|
-
gradient: 'radial',
|
|
7842
|
-
x0: fc.x0 + (tc.x0 - fc.x0) * ratio,
|
|
7843
|
-
x1: fc.x1 + (tc.x1 - fc.x1) * ratio,
|
|
7844
|
-
y0: fc.y0 + (tc.y0 - fc.y0) * ratio,
|
|
7845
|
-
y1: fc.y1 + (tc.y1 - fc.y1) * ratio,
|
|
7846
|
-
r0: fc.r0 + (tc.r0 - fc.r0) * ratio,
|
|
7847
|
-
r1: fc.r1 + (tc.r1 - fc.r1) * ratio,
|
|
7848
|
-
stops: new Array(fStops.length).fill(0).map((_, i) => {
|
|
7849
|
-
return {
|
|
7850
|
-
color: colorStringInterpolationToStr(fStops[i].color, tStops[i].color, ratio),
|
|
7851
|
-
offset: fStops[i].offset + (tStops[i].offset - fStops[i].offset) * ratio
|
|
7852
|
-
};
|
|
7853
|
-
})
|
|
7854
|
-
};
|
|
7855
|
-
return color;
|
|
7856
|
-
}
|
|
7857
|
-
function interpolateGradientConicalColor(fc, tc, ratio) {
|
|
7858
|
-
const fStops = fc.stops;
|
|
7859
|
-
const tStops = tc.stops;
|
|
7860
|
-
const color = {
|
|
7861
|
-
gradient: 'conical',
|
|
7862
|
-
startAngle: fc.startAngle + (tc.startAngle - fc.startAngle) * ratio,
|
|
7863
|
-
endAngle: fc.endAngle + (tc.endAngle - fc.endAngle) * ratio,
|
|
7864
|
-
x: fc.x + (tc.x - fc.x) * ratio,
|
|
7865
|
-
y: fc.y + (tc.y - fc.y) * ratio,
|
|
7866
|
-
stops: new Array(fStops.length).fill(0).map((_, i) => {
|
|
7867
|
-
return {
|
|
7868
|
-
color: colorStringInterpolationToStr(fStops[i].color, tStops[i].color, ratio),
|
|
7869
|
-
offset: fStops[i].offset + (tStops[i].offset - fStops[i].offset) * ratio
|
|
7870
|
-
};
|
|
7871
|
-
})
|
|
7872
|
-
};
|
|
7873
|
-
return color;
|
|
7874
|
-
}
|
|
7875
|
-
function interpolatePureColorArray(from, to, ratio) {
|
|
7876
|
-
return [
|
|
7877
|
-
from[0] + (to[0] - from[0]) * ratio,
|
|
7878
|
-
from[1] + (to[1] - from[1]) * ratio,
|
|
7879
|
-
from[2] + (to[2] - from[2]) * ratio,
|
|
7880
|
-
from[3] + (to[3] - from[3]) * ratio
|
|
7881
|
-
];
|
|
7882
|
-
}
|
|
7883
|
-
function interpolatePureColorArrayToStr(from, to, ratio) {
|
|
7884
|
-
return `rgba(${from[0] + (to[0] - from[0]) * ratio},${from[1] + (to[1] - from[1]) * ratio},${from[2] + (to[2] - from[2]) * ratio},${from[3] + (to[3] - from[3]) * ratio})`;
|
|
7885
|
-
}
|
|
7886
|
-
const _fromColorRGB = [0, 0, 0, 0];
|
|
7887
|
-
const _toColorRGB = [0, 0, 0, 0];
|
|
7888
|
-
function colorStringInterpolationToStr(fromColor, toColor, ratio) {
|
|
7889
|
-
ColorStore.Get(fromColor, ColorType.Color255, _fromColorRGB);
|
|
7890
|
-
ColorStore.Get(toColor, ColorType.Color255, _toColorRGB);
|
|
7891
|
-
return `rgba(${Math.round(_fromColorRGB[0] + (_toColorRGB[0] - _fromColorRGB[0]) * ratio)},${Math.round(_fromColorRGB[1] + (_toColorRGB[1] - _fromColorRGB[1]) * ratio)},${Math.round(_fromColorRGB[2] + (_toColorRGB[2] - _fromColorRGB[2]) * ratio)},${_fromColorRGB[3] + (_toColorRGB[3] - _fromColorRGB[3]) * ratio})`;
|
|
7892
|
-
}
|
|
7893
|
-
|
|
7894
|
-
const PARALLEL_NUMBER = 10;
|
|
7895
|
-
class ResourceLoader {
|
|
7896
|
-
static GetImage(url, mark) {
|
|
7897
|
-
var _a;
|
|
7898
|
-
const data = ResourceLoader.cache.get(url);
|
|
7899
|
-
if (data) {
|
|
7900
|
-
if (data.loadState === 'fail') {
|
|
7901
|
-
application.global.getRequestAnimationFrame()(() => {
|
|
7902
|
-
mark.imageLoadFail(url);
|
|
7903
|
-
});
|
|
7904
|
-
}
|
|
7905
|
-
else if (data.loadState === 'init' || data.loadState === 'loading') {
|
|
7906
|
-
(_a = data.waitingMark) === null || _a === void 0 ? void 0 : _a.push(mark);
|
|
7907
|
-
}
|
|
7908
|
-
else if (mark) {
|
|
7909
|
-
mark.imageLoadSuccess(url, data.data);
|
|
7910
|
-
}
|
|
7911
|
-
}
|
|
7912
|
-
else {
|
|
7913
|
-
ResourceLoader.loadImage(url, mark);
|
|
7914
|
-
}
|
|
7915
|
-
}
|
|
7916
|
-
static GetSvg(svgStr, mark) {
|
|
7917
|
-
var _a;
|
|
7918
|
-
let data = ResourceLoader.cache.get(svgStr);
|
|
7919
|
-
if (data) {
|
|
7920
|
-
if (data.loadState === 'fail') {
|
|
7921
|
-
application.global.getRequestAnimationFrame()(() => {
|
|
7922
|
-
mark.imageLoadFail(svgStr);
|
|
7923
|
-
});
|
|
7924
|
-
}
|
|
7925
|
-
else if (data.loadState === 'init' || data.loadState === 'loading') {
|
|
7926
|
-
(_a = data.waitingMark) === null || _a === void 0 ? void 0 : _a.push(mark);
|
|
7927
|
-
}
|
|
7928
|
-
else if (mark) {
|
|
7929
|
-
mark.imageLoadSuccess(svgStr, data.data);
|
|
7930
|
-
}
|
|
7931
|
-
}
|
|
7932
|
-
else {
|
|
7933
|
-
data = { type: 'image', loadState: 'init' };
|
|
7934
|
-
ResourceLoader.cache.set(svgStr, data);
|
|
7935
|
-
data.dataPromise = application.global.loadSvg(svgStr);
|
|
7936
|
-
if (!data.dataPromise) {
|
|
7937
|
-
data.loadState = 'fail';
|
|
7938
|
-
mark.imageLoadFail(svgStr);
|
|
7939
|
-
}
|
|
7940
|
-
else {
|
|
7941
|
-
data.waitingMark = [mark];
|
|
7942
|
-
data.dataPromise.then(res => {
|
|
7943
|
-
var _a;
|
|
7944
|
-
data.loadState = (res === null || res === void 0 ? void 0 : res.data) ? 'success' : 'fail';
|
|
7945
|
-
data.data = res === null || res === void 0 ? void 0 : res.data;
|
|
7946
|
-
(_a = data.waitingMark) === null || _a === void 0 ? void 0 : _a.map((mark, index) => {
|
|
7947
|
-
if (res === null || res === void 0 ? void 0 : res.data) {
|
|
7948
|
-
data.loadState = 'success';
|
|
7949
|
-
data.data = res.data;
|
|
7950
|
-
mark.imageLoadSuccess(svgStr, res.data);
|
|
7951
|
-
}
|
|
7952
|
-
else {
|
|
7953
|
-
data.loadState = 'fail';
|
|
7954
|
-
mark.imageLoadFail(svgStr);
|
|
7955
|
-
}
|
|
7956
|
-
});
|
|
7957
|
-
data.waitingMark && (data.waitingMark = []);
|
|
7958
|
-
});
|
|
7959
|
-
}
|
|
7960
|
-
}
|
|
7961
|
-
}
|
|
7962
|
-
static GetFile(url, type) {
|
|
7963
|
-
let data = ResourceLoader.cache.get(url);
|
|
7964
|
-
if (data) {
|
|
7965
|
-
if (data.loadState === 'fail') {
|
|
7966
|
-
return Promise.reject();
|
|
7967
|
-
}
|
|
7968
|
-
else if (data.loadState === 'init' || data.loadState === 'loading') {
|
|
7969
|
-
return data.dataPromise.then(data => data.data);
|
|
7970
|
-
}
|
|
7971
|
-
return Promise.resolve(data.data);
|
|
7972
|
-
}
|
|
7973
|
-
data = { type, loadState: 'init' };
|
|
7974
|
-
ResourceLoader.cache.set(url, data);
|
|
7975
|
-
if (type === 'arrayBuffer') {
|
|
7976
|
-
data.dataPromise = application.global.loadArrayBuffer(url);
|
|
7977
|
-
}
|
|
7978
|
-
else if (type === 'blob') {
|
|
7979
|
-
data.dataPromise = application.global.loadBlob(url);
|
|
7980
|
-
}
|
|
7981
|
-
else if (type === 'json') {
|
|
7982
|
-
data.dataPromise = application.global.loadJson(url);
|
|
7983
|
-
}
|
|
7984
|
-
return data.dataPromise.then(data => data.data);
|
|
7807
|
+
static GetFile(url, type) {
|
|
7808
|
+
let data = ResourceLoader.cache.get(url);
|
|
7809
|
+
if (data) {
|
|
7810
|
+
if (data.loadState === 'fail') {
|
|
7811
|
+
return Promise.reject();
|
|
7812
|
+
}
|
|
7813
|
+
else if (data.loadState === 'init' || data.loadState === 'loading') {
|
|
7814
|
+
return data.dataPromise.then(data => data.data);
|
|
7815
|
+
}
|
|
7816
|
+
return Promise.resolve(data.data);
|
|
7817
|
+
}
|
|
7818
|
+
data = { type, loadState: 'init' };
|
|
7819
|
+
ResourceLoader.cache.set(url, data);
|
|
7820
|
+
if (type === 'arrayBuffer') {
|
|
7821
|
+
data.dataPromise = application.global.loadArrayBuffer(url);
|
|
7822
|
+
}
|
|
7823
|
+
else if (type === 'blob') {
|
|
7824
|
+
data.dataPromise = application.global.loadBlob(url);
|
|
7825
|
+
}
|
|
7826
|
+
else if (type === 'json') {
|
|
7827
|
+
data.dataPromise = application.global.loadJson(url);
|
|
7828
|
+
}
|
|
7829
|
+
return data.dataPromise.then(data => data.data);
|
|
7985
7830
|
}
|
|
7986
7831
|
static loading() {
|
|
7987
7832
|
setTimeout(() => {
|
|
@@ -9982,6 +9827,15 @@ class Graphic extends Node {
|
|
|
9982
9827
|
}
|
|
9983
9828
|
return picker.containsPoint(this, { x, y });
|
|
9984
9829
|
}
|
|
9830
|
+
setAttributesAndPreventAnimate(params, forceUpdateTag = false, context) {
|
|
9831
|
+
this.setAttributes(params, forceUpdateTag, context);
|
|
9832
|
+
this.animates &&
|
|
9833
|
+
this.animates.forEach(animate => {
|
|
9834
|
+
Object.keys(params).forEach(key => {
|
|
9835
|
+
animate.preventAttr(key);
|
|
9836
|
+
});
|
|
9837
|
+
});
|
|
9838
|
+
}
|
|
9985
9839
|
setAttributes(params, forceUpdateTag = false, context) {
|
|
9986
9840
|
params =
|
|
9987
9841
|
(this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context)) || params;
|
|
@@ -10301,11 +10155,11 @@ class Graphic extends Node {
|
|
|
10301
10155
|
}
|
|
10302
10156
|
}
|
|
10303
10157
|
]);
|
|
10304
|
-
noAnimateAttrs && this.
|
|
10158
|
+
noAnimateAttrs && this.setAttributesAndPreventAnimate(noAnimateAttrs, false, { type: AttributeUpdateType.STATE });
|
|
10305
10159
|
}
|
|
10306
10160
|
else {
|
|
10307
10161
|
this.stopStateAnimates();
|
|
10308
|
-
this.
|
|
10162
|
+
this.setAttributesAndPreventAnimate(attrs, false, { type: AttributeUpdateType.STATE });
|
|
10309
10163
|
}
|
|
10310
10164
|
}
|
|
10311
10165
|
updateNormalAttrs(stateAttrs) {
|
|
@@ -10342,18 +10196,12 @@ class Graphic extends Node {
|
|
|
10342
10196
|
}
|
|
10343
10197
|
}
|
|
10344
10198
|
getNormalAttribute(key) {
|
|
10345
|
-
|
|
10199
|
+
var _a, _b;
|
|
10200
|
+
const value = this.attribute[key];
|
|
10346
10201
|
if (this.animates) {
|
|
10347
|
-
this.
|
|
10348
|
-
if (animate.stateNames) {
|
|
10349
|
-
const endProps = animate.getEndProps();
|
|
10350
|
-
if (has(endProps, key)) {
|
|
10351
|
-
value = endProps[key];
|
|
10352
|
-
}
|
|
10353
|
-
}
|
|
10354
|
-
});
|
|
10202
|
+
return (_a = this.finalAttribute) === null || _a === void 0 ? void 0 : _a[key];
|
|
10355
10203
|
}
|
|
10356
|
-
return value;
|
|
10204
|
+
return value !== null && value !== void 0 ? value : (_b = this.finalAttribute) === null || _b === void 0 ? void 0 : _b[key];
|
|
10357
10205
|
}
|
|
10358
10206
|
clearStates(hasAnimation) {
|
|
10359
10207
|
if (this.hasState() && this.normalAttrs) {
|
|
@@ -10570,135 +10418,6 @@ class Graphic extends Node {
|
|
|
10570
10418
|
this.setAttributes(props, false, { type: AttributeUpdateType.ANIMATE_END });
|
|
10571
10419
|
}
|
|
10572
10420
|
}
|
|
10573
|
-
onStep(subAnimate, animate, step, ratio, end) {
|
|
10574
|
-
const nextAttributes = {};
|
|
10575
|
-
if (step.customAnimate) {
|
|
10576
|
-
step.customAnimate.update(end, ratio, nextAttributes);
|
|
10577
|
-
}
|
|
10578
|
-
else {
|
|
10579
|
-
const nextProps = step.props;
|
|
10580
|
-
const nextParsedProps = step.parsedProps;
|
|
10581
|
-
const propKeys = step.propKeys;
|
|
10582
|
-
this.stepInterpolate(subAnimate, animate, nextAttributes, step, ratio, end, nextProps, undefined, nextParsedProps, propKeys);
|
|
10583
|
-
}
|
|
10584
|
-
this.setAttributes(nextAttributes, false, {
|
|
10585
|
-
type: AttributeUpdateType.ANIMATE_UPDATE,
|
|
10586
|
-
animationState: {
|
|
10587
|
-
ratio,
|
|
10588
|
-
end,
|
|
10589
|
-
step,
|
|
10590
|
-
isFirstFrameOfStep: subAnimate.getLastStep() !== step
|
|
10591
|
-
}
|
|
10592
|
-
});
|
|
10593
|
-
this.stage && this.stage.renderNextFrame();
|
|
10594
|
-
}
|
|
10595
|
-
stepInterpolate(subAnimate, animate, nextAttributes, step, ratio, end, nextProps, lastProps, nextParsedProps, propKeys) {
|
|
10596
|
-
if (!propKeys) {
|
|
10597
|
-
propKeys = Object.keys(nextProps);
|
|
10598
|
-
step.propKeys = propKeys;
|
|
10599
|
-
}
|
|
10600
|
-
if (end) {
|
|
10601
|
-
step.propKeys.forEach(key => {
|
|
10602
|
-
if (!animate.validAttr(key)) {
|
|
10603
|
-
return;
|
|
10604
|
-
}
|
|
10605
|
-
nextAttributes[key] = nextProps[key];
|
|
10606
|
-
});
|
|
10607
|
-
}
|
|
10608
|
-
else {
|
|
10609
|
-
propKeys.forEach(key => {
|
|
10610
|
-
var _a;
|
|
10611
|
-
if (!animate.validAttr(key)) {
|
|
10612
|
-
return;
|
|
10613
|
-
}
|
|
10614
|
-
const nextStepVal = nextProps[key];
|
|
10615
|
-
const lastStepVal = (_a = (lastProps && lastProps[key])) !== null && _a !== void 0 ? _a : subAnimate.getLastPropByName(key, step);
|
|
10616
|
-
if (nextStepVal == null || lastStepVal == null || nextStepVal === lastStepVal) {
|
|
10617
|
-
nextAttributes[key] = nextStepVal;
|
|
10618
|
-
return;
|
|
10619
|
-
}
|
|
10620
|
-
let match;
|
|
10621
|
-
match =
|
|
10622
|
-
animate.interpolateFunc && animate.interpolateFunc(key, ratio, lastStepVal, nextStepVal, nextAttributes);
|
|
10623
|
-
if (match) {
|
|
10624
|
-
return;
|
|
10625
|
-
}
|
|
10626
|
-
match = animate.customInterpolate(key, ratio, lastStepVal, nextStepVal, this, nextAttributes);
|
|
10627
|
-
if (match) {
|
|
10628
|
-
return;
|
|
10629
|
-
}
|
|
10630
|
-
if (!this.defaultInterpolate(nextStepVal, lastStepVal, key, nextAttributes, nextParsedProps, ratio)) {
|
|
10631
|
-
this._interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes);
|
|
10632
|
-
}
|
|
10633
|
-
});
|
|
10634
|
-
}
|
|
10635
|
-
step.parsedProps = nextParsedProps;
|
|
10636
|
-
}
|
|
10637
|
-
defaultInterpolate(nextStepVal, lastStepVal, key, nextAttributes, nextParsedProps, ratio) {
|
|
10638
|
-
if (Number.isFinite(nextStepVal) && Number.isFinite(lastStepVal)) {
|
|
10639
|
-
nextAttributes[key] = lastStepVal + (nextStepVal - lastStepVal) * ratio;
|
|
10640
|
-
return true;
|
|
10641
|
-
}
|
|
10642
|
-
else if (key === 'fill') {
|
|
10643
|
-
if (!nextParsedProps) {
|
|
10644
|
-
nextParsedProps = {};
|
|
10645
|
-
}
|
|
10646
|
-
const fillColorArray = nextParsedProps.fillColorArray;
|
|
10647
|
-
const color = interpolateColor(lastStepVal, fillColorArray !== null && fillColorArray !== void 0 ? fillColorArray : nextStepVal, ratio, false, (fArray, tArray) => {
|
|
10648
|
-
nextParsedProps.fillColorArray = tArray;
|
|
10649
|
-
});
|
|
10650
|
-
if (color) {
|
|
10651
|
-
nextAttributes[key] = color;
|
|
10652
|
-
}
|
|
10653
|
-
return true;
|
|
10654
|
-
}
|
|
10655
|
-
else if (key === 'stroke') {
|
|
10656
|
-
if (!nextParsedProps) {
|
|
10657
|
-
nextParsedProps = {};
|
|
10658
|
-
}
|
|
10659
|
-
const strokeColorArray = nextParsedProps.strokeColorArray;
|
|
10660
|
-
const color = interpolateColor(lastStepVal, strokeColorArray !== null && strokeColorArray !== void 0 ? strokeColorArray : nextStepVal, ratio, false, (fArray, tArray) => {
|
|
10661
|
-
nextParsedProps.strokeColorArray = tArray;
|
|
10662
|
-
});
|
|
10663
|
-
if (color) {
|
|
10664
|
-
nextAttributes[key] = color;
|
|
10665
|
-
}
|
|
10666
|
-
return true;
|
|
10667
|
-
}
|
|
10668
|
-
else if (key === 'shadowColor') {
|
|
10669
|
-
if (!nextParsedProps) {
|
|
10670
|
-
nextParsedProps = {};
|
|
10671
|
-
}
|
|
10672
|
-
const shadowColorArray = nextParsedProps.shadowColorArray;
|
|
10673
|
-
const color = interpolateColor(lastStepVal, shadowColorArray !== null && shadowColorArray !== void 0 ? shadowColorArray : nextStepVal, ratio, true, (fArray, tArray) => {
|
|
10674
|
-
nextParsedProps.shadowColorArray = tArray;
|
|
10675
|
-
});
|
|
10676
|
-
if (color) {
|
|
10677
|
-
nextAttributes[key] = color;
|
|
10678
|
-
}
|
|
10679
|
-
return true;
|
|
10680
|
-
}
|
|
10681
|
-
else if (Array.isArray(nextStepVal) && nextStepVal.length === lastStepVal.length) {
|
|
10682
|
-
const nextList = [];
|
|
10683
|
-
let valid = true;
|
|
10684
|
-
for (let i = 0; i < nextStepVal.length; i++) {
|
|
10685
|
-
const v = lastStepVal[i];
|
|
10686
|
-
const val = v + (nextStepVal[i] - v) * ratio;
|
|
10687
|
-
if (!Number.isFinite(val)) {
|
|
10688
|
-
valid = false;
|
|
10689
|
-
break;
|
|
10690
|
-
}
|
|
10691
|
-
nextList.push(val);
|
|
10692
|
-
}
|
|
10693
|
-
if (valid) {
|
|
10694
|
-
nextAttributes[key] = nextList;
|
|
10695
|
-
}
|
|
10696
|
-
}
|
|
10697
|
-
return false;
|
|
10698
|
-
}
|
|
10699
|
-
_interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes) {
|
|
10700
|
-
return;
|
|
10701
|
-
}
|
|
10702
10421
|
getDefaultAttribute(name) {
|
|
10703
10422
|
return this.getGraphicTheme()[name];
|
|
10704
10423
|
}
|
|
@@ -11679,6 +11398,234 @@ function drawArcPath$1(arc, context, cx, cy, outerRadius, innerRadius, partStrok
|
|
|
11679
11398
|
return collapsedToLine;
|
|
11680
11399
|
}
|
|
11681
11400
|
|
|
11401
|
+
function colorEqual(color1, color2) {
|
|
11402
|
+
const c1 = Color.parseColorString(color1);
|
|
11403
|
+
const c2 = Color.parseColorString(color2);
|
|
11404
|
+
return c1 && c2 ? c1.r === c2.r && c1.g === c2.g && c1.b === c2.b && c1.opacity === c2.opacity : false;
|
|
11405
|
+
}
|
|
11406
|
+
var ColorType;
|
|
11407
|
+
(function (ColorType) {
|
|
11408
|
+
ColorType[ColorType["Color255"] = 0] = "Color255";
|
|
11409
|
+
ColorType[ColorType["Color1"] = 1] = "Color1";
|
|
11410
|
+
})(ColorType || (ColorType = {}));
|
|
11411
|
+
class ColorStore {
|
|
11412
|
+
static Get(str, size = ColorType.Color1, arr = [0, 0, 0, 1]) {
|
|
11413
|
+
if (size === ColorType.Color1) {
|
|
11414
|
+
const color = ColorStore.store1[str];
|
|
11415
|
+
if (color) {
|
|
11416
|
+
arr[0] = color[0];
|
|
11417
|
+
arr[1] = color[1];
|
|
11418
|
+
arr[2] = color[2];
|
|
11419
|
+
arr[3] = color[3];
|
|
11420
|
+
return arr;
|
|
11421
|
+
}
|
|
11422
|
+
const c = Color.parseColorString(str);
|
|
11423
|
+
if (c) {
|
|
11424
|
+
const data = [c.r / 255, c.g / 255, c.b / 255, c.opacity];
|
|
11425
|
+
ColorStore.store1[str] = data;
|
|
11426
|
+
ColorStore.store255[str] = [c.r, c.g, c.b, c.opacity];
|
|
11427
|
+
arr[0] = data[0];
|
|
11428
|
+
arr[1] = data[1];
|
|
11429
|
+
arr[2] = data[2];
|
|
11430
|
+
arr[3] = data[3];
|
|
11431
|
+
}
|
|
11432
|
+
return arr;
|
|
11433
|
+
}
|
|
11434
|
+
const color = ColorStore.store255[str];
|
|
11435
|
+
if (color) {
|
|
11436
|
+
arr[0] = color[0];
|
|
11437
|
+
arr[1] = color[1];
|
|
11438
|
+
arr[2] = color[2];
|
|
11439
|
+
arr[3] = color[3];
|
|
11440
|
+
return arr;
|
|
11441
|
+
}
|
|
11442
|
+
const c = Color.parseColorString(str);
|
|
11443
|
+
if (c) {
|
|
11444
|
+
ColorStore.store1[str] = [c.r / 255, c.g / 255, c.b / 255, c.opacity];
|
|
11445
|
+
ColorStore.store255[str] = [c.r, c.g, c.b, c.opacity];
|
|
11446
|
+
arr[0] = c.r;
|
|
11447
|
+
arr[1] = c.g;
|
|
11448
|
+
arr[2] = c.b;
|
|
11449
|
+
arr[3] = c.opacity;
|
|
11450
|
+
}
|
|
11451
|
+
return arr;
|
|
11452
|
+
}
|
|
11453
|
+
static Set(str, size, arr) {
|
|
11454
|
+
if (size === ColorType.Color1) {
|
|
11455
|
+
if (ColorStore.store1[str]) {
|
|
11456
|
+
return;
|
|
11457
|
+
}
|
|
11458
|
+
ColorStore.store1[str] = arr;
|
|
11459
|
+
ColorStore.store255[str] = [
|
|
11460
|
+
Math.floor(arr[0] * 255),
|
|
11461
|
+
Math.floor(arr[1] * 255),
|
|
11462
|
+
Math.floor(arr[2] * 255),
|
|
11463
|
+
Math.floor(arr[3] * 255)
|
|
11464
|
+
];
|
|
11465
|
+
}
|
|
11466
|
+
else {
|
|
11467
|
+
if (ColorStore.store255[str]) {
|
|
11468
|
+
return;
|
|
11469
|
+
}
|
|
11470
|
+
ColorStore.store255[str] = arr;
|
|
11471
|
+
ColorStore.store1[str] = [arr[0] / 255, arr[1] / 255, arr[2] / 255, arr[3]];
|
|
11472
|
+
}
|
|
11473
|
+
}
|
|
11474
|
+
}
|
|
11475
|
+
ColorStore.store255 = {};
|
|
11476
|
+
ColorStore.store1 = {};
|
|
11477
|
+
|
|
11478
|
+
function colorArrayToString(color, alphaChannel = false) {
|
|
11479
|
+
if (Array.isArray(color) && isNumber(color[0])) {
|
|
11480
|
+
return alphaChannel
|
|
11481
|
+
? `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])},${color[3].toFixed(2)})`
|
|
11482
|
+
: `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])})`;
|
|
11483
|
+
}
|
|
11484
|
+
return color;
|
|
11485
|
+
}
|
|
11486
|
+
function interpolateColor(from, to, ratio, alphaChannel, cb) {
|
|
11487
|
+
if ((Array.isArray(from) && !isNumber(from[0])) || (Array.isArray(to) && !isNumber(to[0]))) {
|
|
11488
|
+
const out = new Array(4).fill(0).map((_, index) => {
|
|
11489
|
+
return _interpolateColor(isArray(from) ? from[index] : from, isArray(to) ? to[index] : to, ratio, alphaChannel);
|
|
11490
|
+
});
|
|
11491
|
+
return out;
|
|
11492
|
+
}
|
|
11493
|
+
return _interpolateColor(from, to, ratio, alphaChannel, cb);
|
|
11494
|
+
}
|
|
11495
|
+
function _interpolateColor(from, to, ratio, alphaChannel, cb) {
|
|
11496
|
+
if (!(from && to)) {
|
|
11497
|
+
return (from && colorArrayToString(from)) || (to && colorArrayToString(to)) || false;
|
|
11498
|
+
}
|
|
11499
|
+
let fromArray;
|
|
11500
|
+
let toArray;
|
|
11501
|
+
let fromGradient = false;
|
|
11502
|
+
let toGradient = false;
|
|
11503
|
+
if (Array.isArray(from)) {
|
|
11504
|
+
fromArray = from;
|
|
11505
|
+
}
|
|
11506
|
+
else if (typeof from === 'string') {
|
|
11507
|
+
fromArray = ColorStore.Get(from, ColorType.Color255);
|
|
11508
|
+
}
|
|
11509
|
+
else {
|
|
11510
|
+
fromGradient = true;
|
|
11511
|
+
}
|
|
11512
|
+
if (Array.isArray(to)) {
|
|
11513
|
+
toArray = to;
|
|
11514
|
+
}
|
|
11515
|
+
else if (typeof to === 'string') {
|
|
11516
|
+
toArray = ColorStore.Get(to, ColorType.Color255);
|
|
11517
|
+
}
|
|
11518
|
+
else {
|
|
11519
|
+
toGradient = true;
|
|
11520
|
+
}
|
|
11521
|
+
if (fromGradient !== toGradient) {
|
|
11522
|
+
const gradient = (fromGradient ? from : to);
|
|
11523
|
+
const pure = (fromGradient ? to : from);
|
|
11524
|
+
const gradientFromPure = Object.assign(Object.assign({}, gradient), { stops: gradient.stops.map(v => (Object.assign(Object.assign({}, v), { color: colorArrayToString(pure) }))) });
|
|
11525
|
+
return fromGradient
|
|
11526
|
+
? interpolateColor(gradient, gradientFromPure, ratio, alphaChannel, cb)
|
|
11527
|
+
: interpolateColor(gradientFromPure, gradient, ratio, alphaChannel, cb);
|
|
11528
|
+
}
|
|
11529
|
+
if (fromGradient) {
|
|
11530
|
+
if (from.gradient === to.gradient) {
|
|
11531
|
+
const fc = from;
|
|
11532
|
+
const tc = to;
|
|
11533
|
+
const fromStops = fc.stops;
|
|
11534
|
+
const toStops = tc.stops;
|
|
11535
|
+
if (fromStops.length !== toStops.length) {
|
|
11536
|
+
return false;
|
|
11537
|
+
}
|
|
11538
|
+
if (fc.gradient === 'linear') {
|
|
11539
|
+
return interpolateGradientLinearColor(fc, tc, ratio);
|
|
11540
|
+
}
|
|
11541
|
+
else if (fc.gradient === 'radial') {
|
|
11542
|
+
return interpolateGradientRadialColor(fc, tc, ratio);
|
|
11543
|
+
}
|
|
11544
|
+
else if (fc.gradient === 'conical') {
|
|
11545
|
+
return interpolateGradientConicalColor(fc, tc, ratio);
|
|
11546
|
+
}
|
|
11547
|
+
}
|
|
11548
|
+
return false;
|
|
11549
|
+
}
|
|
11550
|
+
cb && cb(fromArray, toArray);
|
|
11551
|
+
const result = interpolatePureColorArray(fromArray, toArray, ratio);
|
|
11552
|
+
return colorArrayToString(result, alphaChannel);
|
|
11553
|
+
}
|
|
11554
|
+
function interpolateGradientLinearColor(fc, tc, ratio) {
|
|
11555
|
+
const fStops = fc.stops;
|
|
11556
|
+
const tStops = tc.stops;
|
|
11557
|
+
const color = {
|
|
11558
|
+
gradient: 'linear',
|
|
11559
|
+
x0: fc.x0 + (tc.x0 - fc.x0) * ratio,
|
|
11560
|
+
x1: fc.x1 + (tc.x1 - fc.x1) * ratio,
|
|
11561
|
+
y0: fc.y0 + (tc.y0 - fc.y0) * ratio,
|
|
11562
|
+
y1: fc.y1 + (tc.y1 - fc.y1) * ratio,
|
|
11563
|
+
stops: new Array(fStops.length).fill(0).map((_, i) => {
|
|
11564
|
+
return {
|
|
11565
|
+
color: colorStringInterpolationToStr(fStops[i].color, tStops[i].color, ratio),
|
|
11566
|
+
offset: fStops[i].offset + (tStops[i].offset - fStops[i].offset) * ratio
|
|
11567
|
+
};
|
|
11568
|
+
})
|
|
11569
|
+
};
|
|
11570
|
+
return color;
|
|
11571
|
+
}
|
|
11572
|
+
function interpolateGradientRadialColor(fc, tc, ratio) {
|
|
11573
|
+
const fStops = fc.stops;
|
|
11574
|
+
const tStops = tc.stops;
|
|
11575
|
+
const color = {
|
|
11576
|
+
gradient: 'radial',
|
|
11577
|
+
x0: fc.x0 + (tc.x0 - fc.x0) * ratio,
|
|
11578
|
+
x1: fc.x1 + (tc.x1 - fc.x1) * ratio,
|
|
11579
|
+
y0: fc.y0 + (tc.y0 - fc.y0) * ratio,
|
|
11580
|
+
y1: fc.y1 + (tc.y1 - fc.y1) * ratio,
|
|
11581
|
+
r0: fc.r0 + (tc.r0 - fc.r0) * ratio,
|
|
11582
|
+
r1: fc.r1 + (tc.r1 - fc.r1) * ratio,
|
|
11583
|
+
stops: new Array(fStops.length).fill(0).map((_, i) => {
|
|
11584
|
+
return {
|
|
11585
|
+
color: colorStringInterpolationToStr(fStops[i].color, tStops[i].color, ratio),
|
|
11586
|
+
offset: fStops[i].offset + (tStops[i].offset - fStops[i].offset) * ratio
|
|
11587
|
+
};
|
|
11588
|
+
})
|
|
11589
|
+
};
|
|
11590
|
+
return color;
|
|
11591
|
+
}
|
|
11592
|
+
function interpolateGradientConicalColor(fc, tc, ratio) {
|
|
11593
|
+
const fStops = fc.stops;
|
|
11594
|
+
const tStops = tc.stops;
|
|
11595
|
+
const color = {
|
|
11596
|
+
gradient: 'conical',
|
|
11597
|
+
startAngle: fc.startAngle + (tc.startAngle - fc.startAngle) * ratio,
|
|
11598
|
+
endAngle: fc.endAngle + (tc.endAngle - fc.endAngle) * ratio,
|
|
11599
|
+
x: fc.x + (tc.x - fc.x) * ratio,
|
|
11600
|
+
y: fc.y + (tc.y - fc.y) * ratio,
|
|
11601
|
+
stops: new Array(fStops.length).fill(0).map((_, i) => {
|
|
11602
|
+
return {
|
|
11603
|
+
color: colorStringInterpolationToStr(fStops[i].color, tStops[i].color, ratio),
|
|
11604
|
+
offset: fStops[i].offset + (tStops[i].offset - fStops[i].offset) * ratio
|
|
11605
|
+
};
|
|
11606
|
+
})
|
|
11607
|
+
};
|
|
11608
|
+
return color;
|
|
11609
|
+
}
|
|
11610
|
+
function interpolatePureColorArray(from, to, ratio) {
|
|
11611
|
+
return [
|
|
11612
|
+
from[0] + (to[0] - from[0]) * ratio,
|
|
11613
|
+
from[1] + (to[1] - from[1]) * ratio,
|
|
11614
|
+
from[2] + (to[2] - from[2]) * ratio,
|
|
11615
|
+
from[3] + (to[3] - from[3]) * ratio
|
|
11616
|
+
];
|
|
11617
|
+
}
|
|
11618
|
+
function interpolatePureColorArrayToStr(from, to, ratio) {
|
|
11619
|
+
return `rgba(${from[0] + (to[0] - from[0]) * ratio},${from[1] + (to[1] - from[1]) * ratio},${from[2] + (to[2] - from[2]) * ratio},${from[3] + (to[3] - from[3]) * ratio})`;
|
|
11620
|
+
}
|
|
11621
|
+
const _fromColorRGB = [0, 0, 0, 0];
|
|
11622
|
+
const _toColorRGB = [0, 0, 0, 0];
|
|
11623
|
+
function colorStringInterpolationToStr(fromColor, toColor, ratio) {
|
|
11624
|
+
ColorStore.Get(fromColor, ColorType.Color255, _fromColorRGB);
|
|
11625
|
+
ColorStore.Get(toColor, ColorType.Color255, _toColorRGB);
|
|
11626
|
+
return `rgba(${Math.round(_fromColorRGB[0] + (_toColorRGB[0] - _fromColorRGB[0]) * ratio)},${Math.round(_fromColorRGB[1] + (_toColorRGB[1] - _fromColorRGB[1]) * ratio)},${Math.round(_fromColorRGB[2] + (_toColorRGB[2] - _fromColorRGB[2]) * ratio)},${_fromColorRGB[3] + (_toColorRGB[3] - _fromColorRGB[3]) * ratio})`;
|
|
11627
|
+
}
|
|
11628
|
+
|
|
11682
11629
|
Object.keys(DEFAULT_COLORS).forEach(k => {
|
|
11683
11630
|
DEFAULT_COLORS[k];
|
|
11684
11631
|
});
|
|
@@ -14416,6 +14363,7 @@ function getFixedLRTB(left, right, top, bottom) {
|
|
|
14416
14363
|
}
|
|
14417
14364
|
class Paragraph {
|
|
14418
14365
|
constructor(text, newLine, character, ascentDescentMode) {
|
|
14366
|
+
var _a, _b;
|
|
14419
14367
|
this.fontSize = character.fontSize || 16;
|
|
14420
14368
|
this.textBaseline = character.textBaseline || 'alphabetic';
|
|
14421
14369
|
this.ascentDescentMode = ascentDescentMode;
|
|
@@ -14462,6 +14410,9 @@ class Paragraph {
|
|
|
14462
14410
|
this.ellipsis = 'normal';
|
|
14463
14411
|
this.ellipsisWidth = 0;
|
|
14464
14412
|
this.ellipsisOtherParagraphWidth = 0;
|
|
14413
|
+
this.space = character.space;
|
|
14414
|
+
this.dx = (_a = character.dx) !== null && _a !== void 0 ? _a : 0;
|
|
14415
|
+
this.dy = (_b = character.dy) !== null && _b !== void 0 ? _b : 0;
|
|
14465
14416
|
if (character.direction === 'vertical') {
|
|
14466
14417
|
this.direction = character.direction;
|
|
14467
14418
|
this.widthOrigin = this.width;
|
|
@@ -14512,9 +14463,9 @@ class Paragraph {
|
|
|
14512
14463
|
text = text.slice(0, index);
|
|
14513
14464
|
text += this.ellipsisStr;
|
|
14514
14465
|
if (textAlign === 'right' || textAlign === 'end') {
|
|
14515
|
-
const { width } = measureTextCanvas(this.text.slice(index), this.character, this.ascentDescentMode);
|
|
14516
14466
|
if (direction === 'vertical') ;
|
|
14517
14467
|
else {
|
|
14468
|
+
const { width } = measureTextCanvas(this.text.slice(index), this.character, this.ascentDescentMode);
|
|
14518
14469
|
left -= this.ellipsisWidth - width;
|
|
14519
14470
|
}
|
|
14520
14471
|
}
|
|
@@ -14525,9 +14476,10 @@ class Paragraph {
|
|
|
14525
14476
|
return Object.assign(Object.assign({}, lrtb), { fillStyle: this.character.background, globalAlpha: this.character.backgroundOpacity });
|
|
14526
14477
|
}
|
|
14527
14478
|
draw(ctx, top, ascent, deltaLeft, isLineFirst, textAlign, lineHeight) {
|
|
14479
|
+
var _a;
|
|
14528
14480
|
let baseline = top + ascent;
|
|
14529
14481
|
let text = this.text;
|
|
14530
|
-
let left = this.left + deltaLeft;
|
|
14482
|
+
let left = this.left + deltaLeft + ((_a = this.space) !== null && _a !== void 0 ? _a : 0) / 2;
|
|
14531
14483
|
baseline += this.top;
|
|
14532
14484
|
let direction = this.direction;
|
|
14533
14485
|
if (this.verticalEllipsis) {
|
|
@@ -14549,9 +14501,9 @@ class Paragraph {
|
|
|
14549
14501
|
text = text.slice(0, index);
|
|
14550
14502
|
text += this.ellipsisStr;
|
|
14551
14503
|
if (textAlign === 'right' || textAlign === 'end') {
|
|
14552
|
-
const { width } = measureTextCanvas(this.text.slice(index), this.character, this.ascentDescentMode);
|
|
14553
14504
|
if (direction === 'vertical') ;
|
|
14554
14505
|
else {
|
|
14506
|
+
const { width } = measureTextCanvas(this.text.slice(index), this.character, this.ascentDescentMode);
|
|
14555
14507
|
left -= this.ellipsisWidth - width;
|
|
14556
14508
|
}
|
|
14557
14509
|
}
|
|
@@ -14574,10 +14526,10 @@ class Paragraph {
|
|
|
14574
14526
|
}
|
|
14575
14527
|
const { lineWidth = 1 } = this.character;
|
|
14576
14528
|
if (this.character.stroke && lineWidth) {
|
|
14577
|
-
ctx.strokeText(text, left, baseline);
|
|
14529
|
+
ctx.strokeText(text, left + this.dx, baseline + this.dy);
|
|
14578
14530
|
}
|
|
14579
14531
|
if (this.character.fill) {
|
|
14580
|
-
ctx.fillText(text, left, baseline);
|
|
14532
|
+
ctx.fillText(text, left + this.dx, baseline + this.dy);
|
|
14581
14533
|
}
|
|
14582
14534
|
if (this.character.fill) {
|
|
14583
14535
|
if (this.character.lineThrough || this.character.underline) {
|
|
@@ -17672,7 +17624,7 @@ class BaseRender {
|
|
|
17672
17624
|
context.translate(-p.x, -p.y, false);
|
|
17673
17625
|
context.setTransformForCurrent();
|
|
17674
17626
|
}
|
|
17675
|
-
_draw(graphic, defaultAttr, computed3dMatrix, drawContext, params) {
|
|
17627
|
+
_draw(graphic, defaultAttr, computed3dMatrix, drawContext, params, themeAttribute) {
|
|
17676
17628
|
const { context } = drawContext;
|
|
17677
17629
|
if (!context) {
|
|
17678
17630
|
return;
|
|
@@ -17689,7 +17641,7 @@ class BaseRender {
|
|
|
17689
17641
|
context.highPerformanceRestore();
|
|
17690
17642
|
return;
|
|
17691
17643
|
}
|
|
17692
|
-
this.drawShape(graphic, context, x, y, drawContext, params);
|
|
17644
|
+
this.drawShape(graphic, context, x, y, drawContext, params, null, null, themeAttribute);
|
|
17693
17645
|
this.z = 0;
|
|
17694
17646
|
if (context.modelMatrix !== lastModelMatrix) {
|
|
17695
17647
|
mat4Allocate.free(context.modelMatrix);
|
|
@@ -17773,8 +17725,8 @@ let DefaultCanvasArcRender = class DefaultCanvasArcRender extends BaseRender {
|
|
|
17773
17725
|
}
|
|
17774
17726
|
return collapsedToLine;
|
|
17775
17727
|
}
|
|
17776
|
-
drawShape(arc, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
17777
|
-
|
|
17728
|
+
drawShape(arc, context, x, y, drawContext, params, fillCb, strokeCb, arcAttribute) {
|
|
17729
|
+
arcAttribute = arcAttribute !== null && arcAttribute !== void 0 ? arcAttribute : getTheme(arc, params === null || params === void 0 ? void 0 : params.theme).arc;
|
|
17778
17730
|
const { fill = arcAttribute.fill, stroke = arcAttribute.stroke, x: originX = arcAttribute.x, y: originY = arcAttribute.y, fillStrokeOrder = arcAttribute.fillStrokeOrder } = arc.attribute;
|
|
17779
17731
|
const data = this.valid(arc, arcAttribute, fillCb, strokeCb);
|
|
17780
17732
|
if (!data) {
|
|
@@ -17803,35 +17755,13 @@ let DefaultCanvasArcRender = class DefaultCanvasArcRender extends BaseRender {
|
|
|
17803
17755
|
beforeRenderContribitionsRuned = true;
|
|
17804
17756
|
context.setShadowBlendStyle && context.setShadowBlendStyle(arc, arc.attribute, arcAttribute);
|
|
17805
17757
|
this.beforeRenderStep(arc, context, x, y, doFill, doStroke, fVisible, sVisible, arcAttribute, drawContext, fillCb, strokeCb);
|
|
17806
|
-
const _runFill = () => {
|
|
17807
|
-
if (doFill) {
|
|
17808
|
-
if (fillCb) {
|
|
17809
|
-
fillCb(context, arc.attribute, arcAttribute);
|
|
17810
|
-
}
|
|
17811
|
-
else if (fVisible) {
|
|
17812
|
-
context.setCommonStyle(arc, arc.attribute, originX - x, originY - y, arcAttribute);
|
|
17813
|
-
context.fill();
|
|
17814
|
-
}
|
|
17815
|
-
}
|
|
17816
|
-
};
|
|
17817
|
-
const _runStroke = () => {
|
|
17818
|
-
if (doStroke && isFullStroke) {
|
|
17819
|
-
if (strokeCb) {
|
|
17820
|
-
strokeCb(context, arc.attribute, arcAttribute);
|
|
17821
|
-
}
|
|
17822
|
-
else if (sVisible) {
|
|
17823
|
-
context.setStrokeStyle(arc, arc.attribute, originX - x, originY - y, arcAttribute);
|
|
17824
|
-
context.stroke();
|
|
17825
|
-
}
|
|
17826
|
-
}
|
|
17827
|
-
};
|
|
17828
17758
|
if (!fillStrokeOrder) {
|
|
17829
|
-
_runFill();
|
|
17830
|
-
_runStroke();
|
|
17759
|
+
this._runFill(arc, context, x, y, arcAttribute, doFill, fVisible, originX, originY, fillCb);
|
|
17760
|
+
this._runStroke(arc, context, x, y, arcAttribute, doStroke, sVisible, strokeCb);
|
|
17831
17761
|
}
|
|
17832
17762
|
else {
|
|
17833
|
-
_runStroke();
|
|
17834
|
-
_runFill();
|
|
17763
|
+
this._runStroke(arc, context, x, y, arcAttribute, doStroke, sVisible, strokeCb);
|
|
17764
|
+
this._runFill(arc, context, x, y, arcAttribute, doFill, fVisible, originX, originY, fillCb);
|
|
17835
17765
|
}
|
|
17836
17766
|
}
|
|
17837
17767
|
if (!isFullStroke && doStroke) {
|
|
@@ -17900,9 +17830,29 @@ let DefaultCanvasArcRender = class DefaultCanvasArcRender extends BaseRender {
|
|
|
17900
17830
|
fill.endAngle += conicalOffset;
|
|
17901
17831
|
}
|
|
17902
17832
|
}
|
|
17833
|
+
_runFill(arc, context, x, y, arcAttribute, doFill, fVisible, originX, originY, fillCb) {
|
|
17834
|
+
if (doFill) {
|
|
17835
|
+
if (fillCb) {
|
|
17836
|
+
fillCb(context, arc.attribute, arcAttribute);
|
|
17837
|
+
}
|
|
17838
|
+
else if (fVisible) {
|
|
17839
|
+
context.setCommonStyle(arc, arc.attribute, originX - x, originY - y, arcAttribute);
|
|
17840
|
+
context.fill();
|
|
17841
|
+
}
|
|
17842
|
+
}
|
|
17843
|
+
}
|
|
17844
|
+
_runStroke(arc, context, x, y, arcAttribute, doStroke, sVisible, strokeCb) {
|
|
17845
|
+
if (doStroke) {
|
|
17846
|
+
if (strokeCb) ;
|
|
17847
|
+
else if (sVisible) {
|
|
17848
|
+
context.setStrokeStyle(arc, arc.attribute, x, y, arcAttribute);
|
|
17849
|
+
context.stroke();
|
|
17850
|
+
}
|
|
17851
|
+
}
|
|
17852
|
+
}
|
|
17903
17853
|
draw(arc, renderService, drawContext, params) {
|
|
17904
17854
|
const arcAttribute = getTheme(arc, params === null || params === void 0 ? void 0 : params.theme).arc;
|
|
17905
|
-
this._draw(arc, arcAttribute, false, drawContext, params);
|
|
17855
|
+
this._draw(arc, arcAttribute, false, drawContext, params, arcAttribute);
|
|
17906
17856
|
}
|
|
17907
17857
|
};
|
|
17908
17858
|
DefaultCanvasArcRender = __decorate([
|
|
@@ -18923,9 +18873,8 @@ let DefaultCanvasRectRender = class DefaultCanvasRectRender extends BaseRender {
|
|
|
18923
18873
|
];
|
|
18924
18874
|
this.init(rectRenderContribitions);
|
|
18925
18875
|
}
|
|
18926
|
-
drawShape(rect, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
18927
|
-
|
|
18928
|
-
const rectAttribute = (_a = this.tempTheme) !== null && _a !== void 0 ? _a : getTheme(rect, params === null || params === void 0 ? void 0 : params.theme).rect;
|
|
18876
|
+
drawShape(rect, context, x, y, drawContext, params, fillCb, strokeCb, rectAttribute) {
|
|
18877
|
+
rectAttribute = rectAttribute !== null && rectAttribute !== void 0 ? rectAttribute : getTheme(rect, params === null || params === void 0 ? void 0 : params.theme).rect;
|
|
18929
18878
|
const { fill = rectAttribute.fill, background, stroke = rectAttribute.stroke, cornerRadius = rectAttribute.cornerRadius, cornerType = rectAttribute.cornerType, opacity = rectAttribute.opacity, fillOpacity = rectAttribute.fillOpacity, lineWidth = rectAttribute.lineWidth, strokeOpacity = rectAttribute.strokeOpacity, visible = rectAttribute.visible, x1, y1, x: originX = rectAttribute.x, y: originY = rectAttribute.y, fillStrokeOrder = rectAttribute.fillStrokeOrder } = rect.attribute;
|
|
18930
18879
|
let { width, height } = rect.attribute;
|
|
18931
18880
|
width = (width !== null && width !== void 0 ? width : x1 - originX) || 0;
|
|
@@ -18957,43 +18906,41 @@ let DefaultCanvasRectRender = class DefaultCanvasRectRender extends BaseRender {
|
|
|
18957
18906
|
};
|
|
18958
18907
|
context.setShadowBlendStyle && context.setShadowBlendStyle(rect, rect.attribute, rectAttribute);
|
|
18959
18908
|
this.beforeRenderStep(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb, doFillOrStroke);
|
|
18960
|
-
const _runFill = () => {
|
|
18961
|
-
if (doFillOrStroke.doFill) {
|
|
18962
|
-
if (fillCb) {
|
|
18963
|
-
fillCb(context, rect.attribute, rectAttribute);
|
|
18964
|
-
}
|
|
18965
|
-
else if (fVisible) {
|
|
18966
|
-
context.setCommonStyle(rect, rect.attribute, originX - x, originY - y, rectAttribute);
|
|
18967
|
-
context.fill();
|
|
18968
|
-
}
|
|
18969
|
-
}
|
|
18970
|
-
};
|
|
18971
|
-
const _runStroke = () => {
|
|
18972
|
-
if (doFillOrStroke.doStroke) {
|
|
18973
|
-
if (strokeCb) {
|
|
18974
|
-
strokeCb(context, rect.attribute, rectAttribute);
|
|
18975
|
-
}
|
|
18976
|
-
else if (sVisible) {
|
|
18977
|
-
context.setStrokeStyle(rect, rect.attribute, originX - x, originY - y, rectAttribute);
|
|
18978
|
-
context.stroke();
|
|
18979
|
-
}
|
|
18980
|
-
}
|
|
18981
|
-
};
|
|
18982
18909
|
if (!fillStrokeOrder) {
|
|
18983
|
-
_runFill();
|
|
18984
|
-
_runStroke();
|
|
18910
|
+
this._runFill(rect, context, x, y, rectAttribute, doFillOrStroke, fVisible, originX, originY, fillCb);
|
|
18911
|
+
this._runStroke(rect, context, x, y, rectAttribute, doFillOrStroke, sVisible, originX, originY, strokeCb);
|
|
18985
18912
|
}
|
|
18986
18913
|
else {
|
|
18987
|
-
_runStroke();
|
|
18988
|
-
_runFill();
|
|
18914
|
+
this._runStroke(rect, context, x, y, rectAttribute, doFillOrStroke, sVisible, originX, originY, strokeCb);
|
|
18915
|
+
this._runFill(rect, context, x, y, rectAttribute, doFillOrStroke, fVisible, originX, originY, fillCb);
|
|
18989
18916
|
}
|
|
18990
18917
|
this.afterRenderStep(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb);
|
|
18991
18918
|
}
|
|
18919
|
+
_runFill(rect, context, x, y, rectAttribute, doFillOrStroke, fVisible, originX, originY, fillCb) {
|
|
18920
|
+
if (doFillOrStroke.doFill) {
|
|
18921
|
+
if (fillCb) {
|
|
18922
|
+
fillCb(context, rect.attribute, rectAttribute);
|
|
18923
|
+
}
|
|
18924
|
+
else if (fVisible) {
|
|
18925
|
+
context.setCommonStyle(rect, rect.attribute, originX - x, originY - y, rectAttribute);
|
|
18926
|
+
context.fill();
|
|
18927
|
+
}
|
|
18928
|
+
}
|
|
18929
|
+
}
|
|
18930
|
+
_runStroke(rect, context, x, y, rectAttribute, doFillOrStroke, sVisible, originX, originY, strokeCb) {
|
|
18931
|
+
if (doFillOrStroke.doStroke) {
|
|
18932
|
+
if (strokeCb) {
|
|
18933
|
+
strokeCb(context, rect.attribute, rectAttribute);
|
|
18934
|
+
}
|
|
18935
|
+
else if (sVisible) {
|
|
18936
|
+
context.setStrokeStyle(rect, rect.attribute, originX - x, originY - y, rectAttribute);
|
|
18937
|
+
context.stroke();
|
|
18938
|
+
}
|
|
18939
|
+
}
|
|
18940
|
+
}
|
|
18992
18941
|
draw(rect, renderService, drawContext, params) {
|
|
18993
18942
|
const rectAttribute = getTheme(rect, params === null || params === void 0 ? void 0 : params.theme).rect;
|
|
18994
|
-
this.
|
|
18995
|
-
this._draw(rect, rectAttribute, false, drawContext, params);
|
|
18996
|
-
this.tempTheme = null;
|
|
18943
|
+
this._draw(rect, rectAttribute, false, drawContext, params, rectAttribute);
|
|
18997
18944
|
}
|
|
18998
18945
|
};
|
|
18999
18946
|
DefaultCanvasRectRender = __decorate([
|
|
@@ -19016,9 +18963,9 @@ let DefaultCanvasSymbolRender = class DefaultCanvasSymbolRender extends BaseRend
|
|
|
19016
18963
|
];
|
|
19017
18964
|
this.init(symbolRenderContribitions);
|
|
19018
18965
|
}
|
|
19019
|
-
drawShape(symbol, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
18966
|
+
drawShape(symbol, context, x, y, drawContext, params, fillCb, strokeCb, symbolAttribute) {
|
|
19020
18967
|
var _a;
|
|
19021
|
-
|
|
18968
|
+
symbolAttribute = symbolAttribute !== null && symbolAttribute !== void 0 ? symbolAttribute : getTheme(symbol, params === null || params === void 0 ? void 0 : params.theme).symbol;
|
|
19022
18969
|
const { size = symbolAttribute.size, x: originX = symbolAttribute.x, y: originY = symbolAttribute.y, scaleX = symbolAttribute.scaleX, scaleY = symbolAttribute.scaleY, fillStrokeOrder = symbolAttribute.fillStrokeOrder, clipRange = symbolAttribute.clipRange } = symbol.attribute;
|
|
19023
18970
|
const data = this.valid(symbol, symbolAttribute, fillCb, strokeCb);
|
|
19024
18971
|
if (!data) {
|
|
@@ -19092,38 +19039,38 @@ let DefaultCanvasSymbolRender = class DefaultCanvasSymbolRender extends BaseRend
|
|
|
19092
19039
|
context.camera = camera;
|
|
19093
19040
|
context.setShadowBlendStyle && context.setShadowBlendStyle(symbol, symbol.attribute, symbolAttribute);
|
|
19094
19041
|
this.beforeRenderStep(symbol, context, x, y, doFill, doStroke, fVisible, sVisible, symbolAttribute, drawContext, fillCb, strokeCb);
|
|
19095
|
-
const _runFill = () => {
|
|
19096
|
-
if (doFill && !parsedPath.isSvg) {
|
|
19097
|
-
if (fillCb) {
|
|
19098
|
-
fillCb(context, symbol.attribute, symbolAttribute);
|
|
19099
|
-
}
|
|
19100
|
-
else if (fVisible) {
|
|
19101
|
-
context.setCommonStyle(symbol, symbol.attribute, originX - x, originY - y, symbolAttribute);
|
|
19102
|
-
context.fill();
|
|
19103
|
-
}
|
|
19104
|
-
}
|
|
19105
|
-
};
|
|
19106
|
-
const _runStroke = () => {
|
|
19107
|
-
if (doStroke && !parsedPath.isSvg) {
|
|
19108
|
-
if (strokeCb) {
|
|
19109
|
-
strokeCb(context, symbol.attribute, symbolAttribute);
|
|
19110
|
-
}
|
|
19111
|
-
else if (sVisible && clipRange >= 1) {
|
|
19112
|
-
context.setStrokeStyle(symbol, symbol.attribute, (originX - x) / scaleX, (originY - y) / scaleY, symbolAttribute);
|
|
19113
|
-
context.stroke();
|
|
19114
|
-
}
|
|
19115
|
-
}
|
|
19116
|
-
};
|
|
19117
19042
|
if (!fillStrokeOrder) {
|
|
19118
|
-
_runFill();
|
|
19119
|
-
_runStroke();
|
|
19043
|
+
this._runFill(symbol, context, x, y, symbolAttribute, doFill, fVisible, originX, originY, parsedPath, fillCb);
|
|
19044
|
+
this._runStroke(symbol, context, x, y, symbolAttribute, doStroke, sVisible, originX, originY, parsedPath, clipRange, scaleX, scaleY, strokeCb);
|
|
19120
19045
|
}
|
|
19121
19046
|
else {
|
|
19122
|
-
_runStroke();
|
|
19123
|
-
_runFill();
|
|
19047
|
+
this._runStroke(symbol, context, x, y, symbolAttribute, doStroke, sVisible, originX, originY, parsedPath, clipRange, scaleX, scaleY, strokeCb);
|
|
19048
|
+
this._runFill(symbol, context, x, y, symbolAttribute, doFill, fVisible, originX, originY, parsedPath, fillCb);
|
|
19124
19049
|
}
|
|
19125
19050
|
this.afterRenderStep(symbol, context, x, y, doFill, doStroke, fVisible, sVisible, symbolAttribute, drawContext, fillCb, strokeCb);
|
|
19126
19051
|
}
|
|
19052
|
+
_runFill(symbol, context, x, y, symbolAttribute, doFill, fVisible, originX, originY, parsedPath, fillCb) {
|
|
19053
|
+
if (doFill && !parsedPath.isSvg) {
|
|
19054
|
+
if (fillCb) {
|
|
19055
|
+
fillCb(context, symbol.attribute, symbolAttribute);
|
|
19056
|
+
}
|
|
19057
|
+
else if (fVisible) {
|
|
19058
|
+
context.setCommonStyle(symbol, symbol.attribute, originX - x, originY - y, symbolAttribute);
|
|
19059
|
+
context.fill();
|
|
19060
|
+
}
|
|
19061
|
+
}
|
|
19062
|
+
}
|
|
19063
|
+
_runStroke(symbol, context, x, y, symbolAttribute, doStroke, sVisible, originX, originY, parsedPath, clipRange, scaleX, scaleY, strokeCb) {
|
|
19064
|
+
if (doStroke && !parsedPath.isSvg) {
|
|
19065
|
+
if (strokeCb) {
|
|
19066
|
+
strokeCb(context, symbol.attribute, symbolAttribute);
|
|
19067
|
+
}
|
|
19068
|
+
else if (sVisible && clipRange >= 1) {
|
|
19069
|
+
context.setStrokeStyle(symbol, symbol.attribute, (originX - x) / scaleX, (originY - y) / scaleY, symbolAttribute);
|
|
19070
|
+
context.stroke();
|
|
19071
|
+
}
|
|
19072
|
+
}
|
|
19073
|
+
}
|
|
19127
19074
|
draw(symbol, renderService, drawContext, params) {
|
|
19128
19075
|
const symbolAttribute = getTheme(symbol, params === null || params === void 0 ? void 0 : params.theme).symbol;
|
|
19129
19076
|
this._draw(symbol, symbolAttribute, false, drawContext, params);
|
|
@@ -19619,9 +19566,13 @@ let DefaultCanvasGroupRender = class DefaultCanvasGroupRender {
|
|
|
19619
19566
|
this.groupRenderContribitions = groupRenderContribitions;
|
|
19620
19567
|
this.numberType = GROUP_NUMBER_TYPE;
|
|
19621
19568
|
}
|
|
19622
|
-
drawShape(group, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
19623
|
-
const
|
|
19624
|
-
|
|
19569
|
+
drawShape(group, context, x, y, drawContext, params, fillCb, strokeCb, groupAttribute) {
|
|
19570
|
+
const { clip, fill, stroke, background } = group.attribute;
|
|
19571
|
+
if (!(clip || fill || stroke || background)) {
|
|
19572
|
+
return;
|
|
19573
|
+
}
|
|
19574
|
+
groupAttribute = groupAttribute !== null && groupAttribute !== void 0 ? groupAttribute : getTheme(group, params === null || params === void 0 ? void 0 : params.theme).group;
|
|
19575
|
+
const { opacity = groupAttribute.opacity, width = groupAttribute.width, height = groupAttribute.height, fillOpacity = groupAttribute.fillOpacity, strokeOpacity = groupAttribute.strokeOpacity, cornerRadius = groupAttribute.cornerRadius, path = groupAttribute.path, lineWidth = groupAttribute.lineWidth, visible = groupAttribute.visible, fillStrokeOrder = groupAttribute.fillStrokeOrder, cornerType = groupAttribute.cornerType, x: originX = groupAttribute.x, y: originY = groupAttribute.y } = group.attribute;
|
|
19625
19576
|
const fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill);
|
|
19626
19577
|
const sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height);
|
|
19627
19578
|
const doFill = runFill(fill, background);
|
|
@@ -19714,14 +19665,16 @@ let DefaultCanvasGroupRender = class DefaultCanvasGroupRender {
|
|
|
19714
19665
|
});
|
|
19715
19666
|
}
|
|
19716
19667
|
draw(group, renderService, drawContext, params) {
|
|
19668
|
+
var _a;
|
|
19717
19669
|
const { context } = drawContext;
|
|
19718
19670
|
if (!context) {
|
|
19719
19671
|
return;
|
|
19720
19672
|
}
|
|
19721
|
-
const { clip, baseOpacity = 1, drawMode
|
|
19673
|
+
const { clip, baseOpacity = 1, drawMode } = group.attribute;
|
|
19722
19674
|
const lastNativeContext = context.nativeContext;
|
|
19723
19675
|
const lastNativeCanvas = context.canvas.nativeCanvas;
|
|
19724
19676
|
if (drawMode > 0) {
|
|
19677
|
+
const { x, y, width, height } = group.attribute;
|
|
19725
19678
|
const canvas = context.canvas;
|
|
19726
19679
|
const newCanvas = vglobal.createCanvas({ width: canvas.width, height: canvas.height, dpr: 1 });
|
|
19727
19680
|
const newContext = newCanvas.getContext('2d');
|
|
@@ -19747,10 +19700,10 @@ let DefaultCanvasGroupRender = class DefaultCanvasGroupRender {
|
|
|
19747
19700
|
}
|
|
19748
19701
|
const baseGlobalAlpha = context.baseGlobalAlpha;
|
|
19749
19702
|
context.baseGlobalAlpha *= baseOpacity;
|
|
19750
|
-
const groupAttribute = getTheme(group, params === null || params === void 0 ? void 0 : params.theme).group;
|
|
19751
19703
|
const lastModelMatrix = context.modelMatrix;
|
|
19752
19704
|
const camera = context.camera;
|
|
19753
19705
|
if (camera) {
|
|
19706
|
+
const groupAttribute = getTheme(group, params === null || params === void 0 ? void 0 : params.theme).group;
|
|
19754
19707
|
const nextModelMatrix = mat4Allocate.allocate();
|
|
19755
19708
|
const modelMatrix = mat4Allocate.allocate();
|
|
19756
19709
|
getModelMatrix(modelMatrix, group, groupAttribute);
|
|
@@ -19772,15 +19725,15 @@ let DefaultCanvasGroupRender = class DefaultCanvasGroupRender {
|
|
|
19772
19725
|
this.drawShape(group, context, 0, 0, drawContext, params, () => false, () => false);
|
|
19773
19726
|
}
|
|
19774
19727
|
else {
|
|
19775
|
-
this.drawShape(group, context, 0, 0, drawContext);
|
|
19728
|
+
this.drawShape(group, context, 0, 0, drawContext, null, null, null);
|
|
19776
19729
|
}
|
|
19777
|
-
const { scrollX
|
|
19730
|
+
const { scrollX, scrollY } = group.attribute;
|
|
19778
19731
|
if (scrollX || scrollY) {
|
|
19779
19732
|
context.translate(scrollX, scrollY);
|
|
19780
19733
|
}
|
|
19781
19734
|
let p;
|
|
19782
|
-
if (params && params.
|
|
19783
|
-
p = params.
|
|
19735
|
+
if (params && params.renderInGroup) {
|
|
19736
|
+
p = params.renderInGroup(params.skipDraw, group, drawContext, (_a = params.renderInGroupParams) === null || _a === void 0 ? void 0 : _a.nextM);
|
|
19784
19737
|
}
|
|
19785
19738
|
if (context.modelMatrix !== lastModelMatrix) {
|
|
19786
19739
|
mat4Allocate.free(context.modelMatrix);
|
|
@@ -19788,6 +19741,7 @@ let DefaultCanvasGroupRender = class DefaultCanvasGroupRender {
|
|
|
19788
19741
|
context.modelMatrix = lastModelMatrix;
|
|
19789
19742
|
context.baseGlobalAlpha = baseGlobalAlpha;
|
|
19790
19743
|
if (drawMode > 0) {
|
|
19744
|
+
const { x, y, width, height } = group.attribute;
|
|
19791
19745
|
const newContext = context.nativeContext;
|
|
19792
19746
|
const newCanvas = context.canvas.nativeCanvas;
|
|
19793
19747
|
lastNativeContext.save();
|
|
@@ -20169,6 +20123,11 @@ let CommonDrawItemInterceptorContribution = class CommonDrawItemInterceptorContr
|
|
|
20169
20123
|
];
|
|
20170
20124
|
}
|
|
20171
20125
|
afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
|
|
20126
|
+
if ((!graphic.in3dMode || drawContext.in3dInterceptor) &&
|
|
20127
|
+
!graphic.shadowRoot &&
|
|
20128
|
+
!(graphic.baseGraphic || graphic.attribute.globalZIndex || graphic.interactiveGraphic)) {
|
|
20129
|
+
return false;
|
|
20130
|
+
}
|
|
20172
20131
|
for (let i = 0; i < this.interceptors.length; i++) {
|
|
20173
20132
|
if (this.interceptors[i].afterDrawItem &&
|
|
20174
20133
|
this.interceptors[i].afterDrawItem(graphic, renderService, drawContext, drawContribution, params)) {
|
|
@@ -20871,6 +20830,32 @@ let DefaultDrawContribution = class DefaultDrawContribution {
|
|
|
20871
20830
|
constructor(contributions, drawItemInterceptorContributions) {
|
|
20872
20831
|
this.contributions = contributions;
|
|
20873
20832
|
this.drawItemInterceptorContributions = drawItemInterceptorContributions;
|
|
20833
|
+
this._renderInGroup = (skipSort, group, drawContext, nextM) => {
|
|
20834
|
+
var _a;
|
|
20835
|
+
skipSort
|
|
20836
|
+
? group.forEachChildren((item) => {
|
|
20837
|
+
if (drawContext.break) {
|
|
20838
|
+
return;
|
|
20839
|
+
}
|
|
20840
|
+
if (item.isContainer) {
|
|
20841
|
+
this.renderGroup(item, drawContext, nextM);
|
|
20842
|
+
}
|
|
20843
|
+
else {
|
|
20844
|
+
this.renderItem(item, drawContext);
|
|
20845
|
+
}
|
|
20846
|
+
})
|
|
20847
|
+
: foreach(group, DefaultAttribute.zIndex, (item) => {
|
|
20848
|
+
if (drawContext.break) {
|
|
20849
|
+
return;
|
|
20850
|
+
}
|
|
20851
|
+
if (item.isContainer) {
|
|
20852
|
+
this.renderGroup(item, drawContext, nextM);
|
|
20853
|
+
}
|
|
20854
|
+
else {
|
|
20855
|
+
this.renderItem(item, drawContext);
|
|
20856
|
+
}
|
|
20857
|
+
}, false, !!((_a = drawContext.context) === null || _a === void 0 ? void 0 : _a.camera));
|
|
20858
|
+
};
|
|
20874
20859
|
this.currentRenderMap = new Map();
|
|
20875
20860
|
this.defaultRenderMap = new Map();
|
|
20876
20861
|
this.styleRenderMap = new Map();
|
|
@@ -20931,10 +20916,10 @@ let DefaultDrawContribution = class DefaultDrawContribution {
|
|
|
20931
20916
|
dirtyBounds.y2 = Math.ceil(dirtyBounds.y2 * context.dpr) / context.dpr;
|
|
20932
20917
|
}
|
|
20933
20918
|
this.backupDirtyBounds.copy(dirtyBounds);
|
|
20934
|
-
context.
|
|
20919
|
+
context.save();
|
|
20920
|
+
context.reset(false);
|
|
20935
20921
|
context.setClearMatrix(transMatrix.a, transMatrix.b, transMatrix.c, transMatrix.d, transMatrix.e, transMatrix.f);
|
|
20936
|
-
context.clearMatrix();
|
|
20937
|
-
context.setTransformForCurrent(true);
|
|
20922
|
+
context.clearMatrix(false);
|
|
20938
20923
|
context.translate(viewBox.x1, viewBox.y1, true);
|
|
20939
20924
|
context.beginPath();
|
|
20940
20925
|
context.rect(dirtyBounds.x1, dirtyBounds.y1, dirtyBounds.width(), dirtyBounds.height());
|
|
@@ -20944,7 +20929,6 @@ let DefaultDrawContribution = class DefaultDrawContribution {
|
|
|
20944
20929
|
this.backupDirtyBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);
|
|
20945
20930
|
}
|
|
20946
20931
|
this.clearScreen(renderService, context, drawContext);
|
|
20947
|
-
context.save();
|
|
20948
20932
|
renderService.renderTreeRoots
|
|
20949
20933
|
.sort((a, b) => {
|
|
20950
20934
|
var _a, _b;
|
|
@@ -20956,8 +20940,6 @@ let DefaultDrawContribution = class DefaultDrawContribution {
|
|
|
20956
20940
|
: this.renderItem(group, drawContext);
|
|
20957
20941
|
});
|
|
20958
20942
|
context.restore();
|
|
20959
|
-
context.setClearMatrix(1, 0, 0, 1, 0, 0);
|
|
20960
|
-
context.inuse = false;
|
|
20961
20943
|
context.draw();
|
|
20962
20944
|
}
|
|
20963
20945
|
doRegister() {
|
|
@@ -20998,33 +20980,13 @@ let DefaultDrawContribution = class DefaultDrawContribution {
|
|
|
20998
20980
|
nextM = matrixAllocate.allocateByObj(parentMatrix).multiply(gm.a, gm.b, gm.c, gm.d, gm.e, gm.f);
|
|
20999
20981
|
this.dirtyBounds.copy(this.backupDirtyBounds).transformWithMatrix(nextM.getInverse());
|
|
21000
20982
|
}
|
|
20983
|
+
drawContext.isGroupScroll = !!(group.attribute.scrollX || group.attribute.scrollY);
|
|
21001
20984
|
this.renderItem(group, drawContext, {
|
|
21002
|
-
|
|
21003
|
-
|
|
21004
|
-
|
|
21005
|
-
|
|
21006
|
-
|
|
21007
|
-
return;
|
|
21008
|
-
}
|
|
21009
|
-
if (item.isContainer) {
|
|
21010
|
-
this.renderGroup(item, drawContext, nextM);
|
|
21011
|
-
}
|
|
21012
|
-
else {
|
|
21013
|
-
this.renderItem(item, drawContext);
|
|
21014
|
-
}
|
|
21015
|
-
})
|
|
21016
|
-
: foreach(group, DefaultAttribute.zIndex, (item) => {
|
|
21017
|
-
if (drawContext.break) {
|
|
21018
|
-
return;
|
|
21019
|
-
}
|
|
21020
|
-
if (item.isContainer) {
|
|
21021
|
-
this.renderGroup(item, drawContext, nextM);
|
|
21022
|
-
}
|
|
21023
|
-
else {
|
|
21024
|
-
this.renderItem(item, drawContext);
|
|
21025
|
-
}
|
|
21026
|
-
}, false, !!((_a = drawContext.context) === null || _a === void 0 ? void 0 : _a.camera));
|
|
21027
|
-
}
|
|
20985
|
+
renderInGroupParams: {
|
|
20986
|
+
skipSort,
|
|
20987
|
+
nextM
|
|
20988
|
+
},
|
|
20989
|
+
renderInGroup: this._renderInGroup
|
|
21028
20990
|
});
|
|
21029
20991
|
if (this.useDirtyBounds) {
|
|
21030
20992
|
this.dirtyBounds.copy(tempBounds);
|
|
@@ -21093,17 +21055,15 @@ let DefaultDrawContribution = class DefaultDrawContribution {
|
|
|
21093
21055
|
if (!renderer) {
|
|
21094
21056
|
return;
|
|
21095
21057
|
}
|
|
21096
|
-
let retrans =
|
|
21058
|
+
let retrans = false;
|
|
21097
21059
|
let tempBounds;
|
|
21098
|
-
if (
|
|
21060
|
+
if (drawContext.isGroupScroll) {
|
|
21099
21061
|
const { scrollX = 0, scrollY = 0 } = graphic.parent.attribute;
|
|
21100
|
-
|
|
21101
|
-
|
|
21102
|
-
|
|
21103
|
-
this.scrollMatrix = matrixAllocate.allocate(1, 0, 0, 1, 0, 0);
|
|
21104
|
-
}
|
|
21105
|
-
this.scrollMatrix.translate(-scrollX, -scrollY);
|
|
21062
|
+
retrans = true;
|
|
21063
|
+
if (!this.scrollMatrix) {
|
|
21064
|
+
this.scrollMatrix = matrixAllocate.allocate(1, 0, 0, 1, 0, 0);
|
|
21106
21065
|
}
|
|
21066
|
+
this.scrollMatrix.translate(-scrollX, -scrollY);
|
|
21107
21067
|
}
|
|
21108
21068
|
if (retrans) {
|
|
21109
21069
|
tempBounds = this.dirtyBounds.clone().transformWithMatrix(this.scrollMatrix);
|
|
@@ -21923,7 +21883,7 @@ class Stage extends Group {
|
|
|
21923
21883
|
return this._eventSystem;
|
|
21924
21884
|
}
|
|
21925
21885
|
constructor(params = {}) {
|
|
21926
|
-
var _a;
|
|
21886
|
+
var _a, _b;
|
|
21927
21887
|
super({});
|
|
21928
21888
|
this.tickedBeforeRender = true;
|
|
21929
21889
|
this._onVisibleChange = (visible) => {
|
|
@@ -21955,12 +21915,8 @@ class Stage extends Group {
|
|
|
21955
21915
|
this.tickedBeforeRender = false;
|
|
21956
21916
|
};
|
|
21957
21917
|
this.afterTickCb = () => {
|
|
21958
|
-
var _a;
|
|
21959
21918
|
this.tickedBeforeRender = true;
|
|
21960
|
-
|
|
21961
|
-
else {
|
|
21962
|
-
this.state !== 'rendering' && this.render();
|
|
21963
|
-
}
|
|
21919
|
+
this.state !== 'rendering' && this.render();
|
|
21964
21920
|
};
|
|
21965
21921
|
this.params = params;
|
|
21966
21922
|
this.theme = new Theme();
|
|
@@ -22019,7 +21975,7 @@ class Stage extends Group {
|
|
|
22019
21975
|
this.supportInteractiveLayer = params.interactiveLayer !== false;
|
|
22020
21976
|
if (!params.optimize) {
|
|
22021
21977
|
params.optimize = {
|
|
22022
|
-
|
|
21978
|
+
tickRenderMode: 'performance'
|
|
22023
21979
|
};
|
|
22024
21980
|
}
|
|
22025
21981
|
this.optmize(params.optimize);
|
|
@@ -22027,10 +21983,15 @@ class Stage extends Group {
|
|
|
22027
21983
|
this.setAttributes({ background: this._background });
|
|
22028
21984
|
}
|
|
22029
21985
|
this.initAnimate(params);
|
|
21986
|
+
this.rafId = (_b = params.rafId) !== null && _b !== void 0 ? _b : Math.floor(Math.random() * 6);
|
|
22030
21987
|
}
|
|
22031
21988
|
initAnimate(params) {
|
|
21989
|
+
var _a;
|
|
22032
21990
|
if (this.createTicker && this.createTimeline) {
|
|
22033
21991
|
this.ticker = params.ticker || this.createTicker(this);
|
|
21992
|
+
if (((_a = this.params.optimize) === null || _a === void 0 ? void 0 : _a.tickRenderMode) !== 'effect') {
|
|
21993
|
+
this.ticker.setFPS(30);
|
|
21994
|
+
}
|
|
22034
21995
|
this.timeline = this.createTimeline();
|
|
22035
21996
|
this.ticker.addTimeline(this.timeline);
|
|
22036
21997
|
this.ticker.on('tick', this.afterTickCb);
|
|
@@ -22390,7 +22351,7 @@ class Stage extends Group {
|
|
|
22390
22351
|
}
|
|
22391
22352
|
if (!this.willNextFrameRender) {
|
|
22392
22353
|
this.willNextFrameRender = true;
|
|
22393
|
-
this.global.
|
|
22354
|
+
this.global.getSpecifiedRequestAnimationFrame(this.rafId)(() => {
|
|
22394
22355
|
this._doRenderInThisFrame(), (this.willNextFrameRender = false);
|
|
22395
22356
|
});
|
|
22396
22357
|
}
|
|
@@ -22698,6 +22659,11 @@ let EmptyContext2d = class EmptyContext2d {
|
|
|
22698
22659
|
this.resetTransform();
|
|
22699
22660
|
this.restore();
|
|
22700
22661
|
}
|
|
22662
|
+
reset() {
|
|
22663
|
+
this.matrix.setValue(1, 0, 0, 1, 0, 0);
|
|
22664
|
+
this.applyedMatrix = new Matrix(1, 0, 0, 1, 0, 0);
|
|
22665
|
+
this.stack.length = 0;
|
|
22666
|
+
}
|
|
22701
22667
|
restore() {
|
|
22702
22668
|
if (this.stack.length > 0) {
|
|
22703
22669
|
matrixAllocate.free(this.matrix);
|
|
@@ -23616,6 +23582,26 @@ function flatten_simplify(points, tolerance, highestQuality) {
|
|
|
23616
23582
|
return points;
|
|
23617
23583
|
}
|
|
23618
23584
|
|
|
23585
|
+
function diff(oldAttrs, newAttrs, getAttr) {
|
|
23586
|
+
const diffObj = {};
|
|
23587
|
+
for (const key in newAttrs) {
|
|
23588
|
+
if (!(key in oldAttrs) || !isEqual(oldAttrs[key], newAttrs[key])) {
|
|
23589
|
+
diffObj[key] = newAttrs[key];
|
|
23590
|
+
}
|
|
23591
|
+
}
|
|
23592
|
+
if (getAttr) {
|
|
23593
|
+
for (const key in oldAttrs) {
|
|
23594
|
+
if (!(key in newAttrs)) {
|
|
23595
|
+
const value = getAttr(key);
|
|
23596
|
+
if (value !== undefined) {
|
|
23597
|
+
diffObj[key] = value;
|
|
23598
|
+
}
|
|
23599
|
+
}
|
|
23600
|
+
}
|
|
23601
|
+
}
|
|
23602
|
+
return diffObj;
|
|
23603
|
+
}
|
|
23604
|
+
|
|
23619
23605
|
function cubicSubdivide(p0, p1, p2, p3, t, out) {
|
|
23620
23606
|
const p01 = (p1 - p0) * t + p0;
|
|
23621
23607
|
const p12 = (p2 - p1) * t + p1;
|
|
@@ -24383,30 +24369,6 @@ const splitPath = (path, count) => {
|
|
|
24383
24369
|
return res;
|
|
24384
24370
|
};
|
|
24385
24371
|
|
|
24386
|
-
class PerformanceRAF {
|
|
24387
|
-
constructor() {
|
|
24388
|
-
this.nextAnimationFrameCbs = [];
|
|
24389
|
-
this.runAnimationFrame = (time) => {
|
|
24390
|
-
const cbs = this.nextAnimationFrameCbs;
|
|
24391
|
-
this.nextAnimationFrameCbs = [];
|
|
24392
|
-
for (let i = 0; i < cbs.length; i++) {
|
|
24393
|
-
cbs[i](time);
|
|
24394
|
-
}
|
|
24395
|
-
};
|
|
24396
|
-
this.tryRunAnimationFrameNextFrame = () => {
|
|
24397
|
-
if (!(this.nextAnimationFrameCbs && this.nextAnimationFrameCbs.length === 1)) {
|
|
24398
|
-
return;
|
|
24399
|
-
}
|
|
24400
|
-
vglobal.getRequestAnimationFrame()(this.runAnimationFrame);
|
|
24401
|
-
};
|
|
24402
|
-
}
|
|
24403
|
-
addAnimationFrameCb(callback) {
|
|
24404
|
-
this.nextAnimationFrameCbs.push(callback);
|
|
24405
|
-
this.tryRunAnimationFrameNextFrame();
|
|
24406
|
-
return this.nextAnimationFrameCbs.length - 1;
|
|
24407
|
-
}
|
|
24408
|
-
}
|
|
24409
|
-
|
|
24410
24372
|
function getDefaultCharacterConfig(attribute) {
|
|
24411
24373
|
const { fill = 'black', stroke = false, fontWeight = 'normal', lineHeight, fontFamily = 'Arial', textAlign } = attribute;
|
|
24412
24374
|
let { fontSize = 12 } = attribute;
|
|
@@ -24424,12 +24386,13 @@ function getDefaultCharacterConfig(attribute) {
|
|
|
24424
24386
|
};
|
|
24425
24387
|
}
|
|
24426
24388
|
function findConfigIndexByCursorIdx(textConfig, cursorIndex) {
|
|
24389
|
+
var _a;
|
|
24427
24390
|
if (cursorIndex < 0) {
|
|
24428
24391
|
return 0;
|
|
24429
24392
|
}
|
|
24430
24393
|
const intCursorIndex = Math.round(cursorIndex);
|
|
24431
24394
|
let tempCursorIndex = intCursorIndex;
|
|
24432
|
-
let lineBreak =
|
|
24395
|
+
let lineBreak = ((_a = textConfig === null || textConfig === void 0 ? void 0 : textConfig[0]) === null || _a === void 0 ? void 0 : _a.text) === '\n';
|
|
24433
24396
|
let configIdx = 0;
|
|
24434
24397
|
for (configIdx = 0; configIdx < textConfig.length && tempCursorIndex >= 0; configIdx++) {
|
|
24435
24398
|
const c = textConfig[configIdx];
|
|
@@ -24452,12 +24415,12 @@ function findConfigIndexByCursorIdx(textConfig, cursorIndex) {
|
|
|
24452
24415
|
return configIdx;
|
|
24453
24416
|
}
|
|
24454
24417
|
function findCursorIdxByConfigIndex(textConfig, configIndex) {
|
|
24455
|
-
var _a, _b, _c;
|
|
24418
|
+
var _a, _b, _c, _d;
|
|
24456
24419
|
let cursorIndex = 0;
|
|
24457
24420
|
if (configIndex < 0) {
|
|
24458
24421
|
return -0.1;
|
|
24459
24422
|
}
|
|
24460
|
-
let lastLineBreak =
|
|
24423
|
+
let lastLineBreak = ((_a = textConfig === null || textConfig === void 0 ? void 0 : textConfig[0]) === null || _a === void 0 ? void 0 : _a.text) === '\n';
|
|
24461
24424
|
for (let i = 0; i <= configIndex && i < textConfig.length; i++) {
|
|
24462
24425
|
const c = textConfig[i];
|
|
24463
24426
|
if (c.text === '\n') {
|
|
@@ -24471,16 +24434,16 @@ function findCursorIdxByConfigIndex(textConfig, configIndex) {
|
|
|
24471
24434
|
}
|
|
24472
24435
|
cursorIndex = Math.max(cursorIndex - 1, 0);
|
|
24473
24436
|
if (configIndex > textConfig.length - 1) {
|
|
24474
|
-
if (((
|
|
24437
|
+
if (((_b = textConfig[textConfig.length - 1]) === null || _b === void 0 ? void 0 : _b.text) === '\n') {
|
|
24475
24438
|
return cursorIndex + 0.9;
|
|
24476
24439
|
}
|
|
24477
24440
|
return cursorIndex + 0.1;
|
|
24478
24441
|
}
|
|
24479
|
-
const lineBreak = ((
|
|
24442
|
+
const lineBreak = ((_c = textConfig[configIndex]) === null || _c === void 0 ? void 0 : _c.text) === '\n';
|
|
24480
24443
|
if (configIndex >= textConfig.length - 1 && lineBreak) {
|
|
24481
24444
|
return cursorIndex + 1 - 0.1;
|
|
24482
24445
|
}
|
|
24483
|
-
const singleLineBreak = lineBreak && ((
|
|
24446
|
+
const singleLineBreak = lineBreak && ((_d = textConfig[configIndex - 1]) === null || _d === void 0 ? void 0 : _d.text) !== '\n';
|
|
24484
24447
|
cursorIndex -= 0.1;
|
|
24485
24448
|
if (singleLineBreak) {
|
|
24486
24449
|
cursorIndex += 0.2;
|
|
@@ -24494,11 +24457,17 @@ class EditModule {
|
|
|
24494
24457
|
this.handleFocusOut = () => {
|
|
24495
24458
|
};
|
|
24496
24459
|
this.handleKeyDown = (e) => {
|
|
24460
|
+
if (!this.currRt) {
|
|
24461
|
+
return;
|
|
24462
|
+
}
|
|
24497
24463
|
if (e.key === 'Delete' || e.key === 'Backspace') {
|
|
24498
24464
|
this.handleInput({ data: null, type: 'Backspace' });
|
|
24499
24465
|
}
|
|
24500
24466
|
};
|
|
24501
24467
|
this.handleCompositionStart = () => {
|
|
24468
|
+
if (!this.currRt) {
|
|
24469
|
+
return;
|
|
24470
|
+
}
|
|
24502
24471
|
this.isComposing = true;
|
|
24503
24472
|
const { textConfig = [] } = this.currRt.attribute;
|
|
24504
24473
|
this.composingConfigIdx = this.cursorIndex < 0 ? 0 : findConfigIndexByCursorIdx(textConfig, this.cursorIndex);
|
|
@@ -24634,6 +24603,9 @@ class EditModule {
|
|
|
24634
24603
|
}
|
|
24635
24604
|
parseCompositionStr(configIdx) {
|
|
24636
24605
|
var _a;
|
|
24606
|
+
if (!this.currRt) {
|
|
24607
|
+
return '';
|
|
24608
|
+
}
|
|
24637
24609
|
const { textConfig = [] } = this.currRt.attribute;
|
|
24638
24610
|
const lastConfig = (_a = textConfig[configIdx]) !== null && _a !== void 0 ? _a : {};
|
|
24639
24611
|
textConfig.splice(configIdx, 1);
|
|
@@ -25317,6 +25289,7 @@ class RichTextEditPlugin {
|
|
|
25317
25289
|
currRt.detachShadow();
|
|
25318
25290
|
}
|
|
25319
25291
|
this.currRt = null;
|
|
25292
|
+
this.editModule.currRt = null;
|
|
25320
25293
|
const shadowRoot = this.getShadow(currRt);
|
|
25321
25294
|
if (this.editLine) {
|
|
25322
25295
|
this.removeEditLineOrBgOrBounds(this.editLine, shadowRoot);
|
|
@@ -27498,4 +27471,4 @@ const registerFlexLayoutPlugin = () => {
|
|
|
27498
27471
|
Factory.registerPlugin('FlexLayoutPlugin', FlexLayoutPlugin);
|
|
27499
27472
|
};
|
|
27500
27473
|
|
|
27501
|
-
export { ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, AnimateMode, AnimateStatus, AnimateStepType, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeUpdateType, AutoEnablePlugins, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, Circle, CircleRender, CircleRenderContribution, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Container, ContainerModule, Context2dFactory, ContributionProvider, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DEFAULT_TEXT_FONT_FAMILY, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseClipRenderAfterContribution, DefaultBaseClipRenderBeforeContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolClipRangeStrokeRenderContribution, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction, DirectionalLight, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EditModule, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ALL_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, GlobalPickerService, Glyph, GlyphRender, Graphic, GraphicCreator$1 as GraphicCreator, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncrementalDrawContribution, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, Mat4Allocate, MatrixAllocate, MeasureModeEnum, MonotoneX, MonotoneY, NOWORK_ANIMATE_ATTR, Node, OrthoCamera, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PerformanceRAF, PickItemInterceptor, PickServiceInterceptor, PickerService, PluginService, Polygon, PolygonRender, PolygonRenderContribution, Pyramid3d, Pyramid3dRender, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, SegContext, ShadowPickServiceInterceptorContribution, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StaticLayerHandlerContribution, Step, Symbol$1 as Symbol, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, TransformUtil, UpdateTag, VGlobal, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindContributionProvider, bindContributionProviderNoSingletonScope, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleModule, clock, colorEqual, colorStringInterpolationToStr, container, cornerTangents, createArc, createArc3d, createArea, createCircle, createColor, createConicalGradient, createGlyph, createGroup, createImage, createLine, createMat4, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseClipRenderAfterContribution, defaultBaseClipRenderBeforeContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolClipRangeStrokeRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawIncrementalAreaSegments, drawIncrementalSegments, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findConfigIndexByCursorIdx, findCursorIdxByConfigIndex, findNextGraphic, flatten_simplify, foreach, foreachAsync, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepSegments, genStepTypeSegments, getAttributeFromDefaultAttrList, getConicGradientAt, getCurrentEnv, getDefaultCharacterConfig, getExtraModelMatrix, getModelMatrix, getRichTextBounds, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, globalTheme, glyphModule, graphicCreator, graphicService, graphicUtil, identityMat4, imageModule, incrementalAddTo, inject, injectable, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, interpolatePureColorArrayToStr, intersect, isBrowserEnv, isNodeEnv, isSvg, isTransformKey, isXML, layerService, lineModule, lookAt, mat3Tomat4, mat4Allocate, matrixAllocate, multiInject, multiplyMat4Mat3, multiplyMat4Mat4, named, newThemeObj, ortho, parsePadding, parseStroke, parseSvgPath, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonModule, preLoadAllModule, pyramid3dModule, quadCalc, quadLength, quadPointAt, rafBasedSto, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, registerArc3dGraphic, registerArcGraphic, registerAreaGraphic, registerCircleGraphic, registerDirectionalLight, registerFlexLayoutPlugin, registerGlyphGraphic, registerGroupGraphic, registerHtmlAttributePlugin, registerImageGraphic, registerLineGraphic, registerOrthoCamera, registerPathGraphic, registerPolygonGraphic, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect3dGraphic, registerRectGraphic, registerRichtextGraphic, registerShadowRootGraphic, registerSymbolGraphic, registerTextGraphic, registerViewTransform3dPlugin, registerWrapTextGraphic, renderCommandList, rewriteProto, richtextModule, rotateX, rotateY, rotateZ, runFill, runStroke, scaleMat4, segments, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, strCommandMap, strokeVisible, symbolModule, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textModule, transformKeys, transformMat4, transformUtil, translate, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };
|
|
27474
|
+
export { ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, AnimateMode, AnimateStatus, AnimateStepType, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeUpdateType, AutoEnablePlugins, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, Circle, CircleRender, CircleRenderContribution, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Container, ContainerModule, Context2dFactory, ContributionProvider, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DEFAULT_TEXT_FONT_FAMILY, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseClipRenderAfterContribution, DefaultBaseClipRenderBeforeContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolClipRangeStrokeRenderContribution, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction, DirectionalLight, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EditModule, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ALL_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, GlobalPickerService, Glyph, GlyphRender, Graphic, GraphicCreator$1 as GraphicCreator, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncrementalDrawContribution, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, Mat4Allocate, MatrixAllocate, MeasureModeEnum, MonotoneX, MonotoneY, NOWORK_ANIMATE_ATTR, Node, OrthoCamera, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PerformanceRAF, PickItemInterceptor, PickServiceInterceptor, PickerService, PluginService, Polygon, PolygonRender, PolygonRenderContribution, Pyramid3d, Pyramid3dRender, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, STATUS$1 as STATUS, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, SegContext, ShadowPickServiceInterceptorContribution, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StaticLayerHandlerContribution, Step, Symbol$1 as Symbol, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, TransformUtil, UpdateTag, VGlobal, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindContributionProvider, bindContributionProviderNoSingletonScope, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleModule, clock, colorEqual, colorStringInterpolationToStr, container, cornerTangents, createArc, createArc3d, createArea, createCircle, createColor, createConicalGradient, createGlyph, createGroup, createImage, createLine, createMat4, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseClipRenderAfterContribution, defaultBaseClipRenderBeforeContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolClipRangeStrokeRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, diff, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawIncrementalAreaSegments, drawIncrementalSegments, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findConfigIndexByCursorIdx, findCursorIdxByConfigIndex, findNextGraphic, flatten_simplify, foreach, foreachAsync, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepSegments, genStepTypeSegments, getAttributeFromDefaultAttrList, getConicGradientAt, getCurrentEnv, getDefaultCharacterConfig, getExtraModelMatrix, getModelMatrix, getRichTextBounds, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, globalTheme, glyphModule, graphicCreator, graphicService, graphicUtil, identityMat4, imageModule, incrementalAddTo, inject, injectable, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, interpolatePureColorArrayToStr, intersect, isBrowserEnv, isNodeEnv, isSvg, isTransformKey, isXML, layerService, lineModule, lookAt, mat3Tomat4, mat4Allocate, matrixAllocate, multiInject, multiplyMat4Mat3, multiplyMat4Mat4, named, newThemeObj, ortho, parsePadding, parseStroke, parseSvgPath, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonModule, preLoadAllModule, pyramid3dModule, quadCalc, quadLength, quadPointAt, rafBasedSto, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, registerArc3dGraphic, registerArcGraphic, registerAreaGraphic, registerCircleGraphic, registerDirectionalLight, registerFlexLayoutPlugin, registerGlyphGraphic, registerGroupGraphic, registerHtmlAttributePlugin, registerImageGraphic, registerLineGraphic, registerOrthoCamera, registerPathGraphic, registerPolygonGraphic, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect3dGraphic, registerRectGraphic, registerRichtextGraphic, registerShadowRootGraphic, registerSymbolGraphic, registerTextGraphic, registerViewTransform3dPlugin, registerWrapTextGraphic, renderCommandList, rewriteProto, richtextModule, rotateX, rotateY, rotateZ, runFill, runStroke, scaleMat4, segments, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, strCommandMap, strokeVisible, symbolModule, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textModule, transformKeys, transformMat4, transformUtil, translate, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };
|