@visactor/vchart 1.13.22-alpha.4 → 1.13.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/es5/index.js +4 -2
- package/build/index.es.js +570 -1094
- package/build/index.js +570 -1094
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/component/axis/polar/axis.js +4 -2
- package/cjs/component/axis/polar/axis.js.map +1 -1
- package/cjs/component/axis/polar/interface/spec.d.ts +3 -1
- package/cjs/component/axis/polar/interface/spec.js.map +1 -1
- package/cjs/constant/funnel.js +2 -1
- package/cjs/constant/sunburst.js +1 -2
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +3 -2
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/vchart.js +1 -2
- package/cjs/plugin/chart/scroll/scroll.js +10 -11
- package/cjs/plugin/chart/scroll/scroll.js.map +1 -1
- package/esm/component/axis/polar/axis.js +4 -2
- package/esm/component/axis/polar/axis.js.map +1 -1
- package/esm/component/axis/polar/interface/spec.d.ts +3 -1
- package/esm/component/axis/polar/interface/spec.js.map +1 -1
- package/esm/constant/funnel.js +2 -1
- package/esm/constant/sunburst.js +1 -2
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +3 -2
- package/esm/core/index.js.map +1 -1
- package/esm/core/vchart.js +1 -2
- package/esm/plugin/chart/scroll/scroll.js +10 -10
- package/esm/plugin/chart/scroll/scroll.js.map +1 -1
- package/package.json +15 -15
package/build/index.js
CHANGED
|
@@ -436,10 +436,7 @@
|
|
|
436
436
|
const isType = (value, type) => Object.prototype.toString.call(value) === `[object ${type}]`;
|
|
437
437
|
var isType$1 = isType;
|
|
438
438
|
|
|
439
|
-
const isBoolean =
|
|
440
|
-
let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
441
|
-
return fuzzy ? "boolean" == typeof value : !0 === value || !1 === value || isType$1(value, "Boolean");
|
|
442
|
-
};
|
|
439
|
+
const isBoolean = (value, fuzzy = !1) => fuzzy ? "boolean" == typeof value : !0 === value || !1 === value || isType$1(value, "Boolean");
|
|
443
440
|
var isBoolean$1 = isBoolean;
|
|
444
441
|
|
|
445
442
|
const isFunction = value => "function" == typeof value;
|
|
@@ -472,8 +469,7 @@
|
|
|
472
469
|
const isUndefined = value => void 0 === value;
|
|
473
470
|
var isUndefined$1 = isUndefined;
|
|
474
471
|
|
|
475
|
-
const isString =
|
|
476
|
-
let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
472
|
+
const isString = (value, fuzzy = !1) => {
|
|
477
473
|
const type = typeof value;
|
|
478
474
|
return fuzzy ? "string" === type : "string" === type || isType$1(value, "String");
|
|
479
475
|
};
|
|
@@ -490,8 +486,7 @@
|
|
|
490
486
|
const isDate = value => isType$1(value, "Date");
|
|
491
487
|
var isDate$1 = isDate;
|
|
492
488
|
|
|
493
|
-
const isNumber =
|
|
494
|
-
let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
489
|
+
const isNumber = (value, fuzzy = !1) => {
|
|
495
490
|
const type = typeof value;
|
|
496
491
|
return fuzzy ? "number" === type : "number" === type || isType$1(value, "Number");
|
|
497
492
|
};
|
|
@@ -557,9 +552,7 @@
|
|
|
557
552
|
return result;
|
|
558
553
|
}
|
|
559
554
|
|
|
560
|
-
function baseMerge(target, source) {
|
|
561
|
-
let shallowArray = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
562
|
-
let skipTargetArray = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
|
|
555
|
+
function baseMerge(target, source, shallowArray = !1, skipTargetArray = !1) {
|
|
563
556
|
if (source) {
|
|
564
557
|
if (target === source) return;
|
|
565
558
|
if (isValid$1(source) && "object" == typeof source) {
|
|
@@ -577,9 +570,7 @@
|
|
|
577
570
|
}
|
|
578
571
|
}
|
|
579
572
|
}
|
|
580
|
-
function baseMergeDeep(target, source, key) {
|
|
581
|
-
let shallowArray = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
|
|
582
|
-
let skipTargetArray = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
|
|
573
|
+
function baseMergeDeep(target, source, key, shallowArray = !1, skipTargetArray = !1) {
|
|
583
574
|
const objValue = target[key],
|
|
584
575
|
srcValue = source[key];
|
|
585
576
|
let newValue = source[key],
|
|
@@ -600,11 +591,11 @@
|
|
|
600
591
|
function eq(value, other) {
|
|
601
592
|
return value === other || Number.isNaN(value) && Number.isNaN(other);
|
|
602
593
|
}
|
|
603
|
-
function merge$1(target) {
|
|
594
|
+
function merge$1(target, ...sources) {
|
|
604
595
|
let sourceIndex = -1;
|
|
605
|
-
const length =
|
|
596
|
+
const length = sources.length;
|
|
606
597
|
for (; ++sourceIndex < length;) {
|
|
607
|
-
baseMerge(target,
|
|
598
|
+
baseMerge(target, sources[sourceIndex], !0);
|
|
608
599
|
}
|
|
609
600
|
return target;
|
|
610
601
|
}
|
|
@@ -668,8 +659,7 @@
|
|
|
668
659
|
}
|
|
669
660
|
return target;
|
|
670
661
|
}
|
|
671
|
-
function mixin(target, source) {
|
|
672
|
-
let override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
662
|
+
function mixin(target, source, override = !0) {
|
|
673
663
|
if (target = "prototype" in target ? target.prototype : target, source = "prototype" in source ? source.prototype : source, Object.getOwnPropertyNames) {
|
|
674
664
|
const keyList = Object.getOwnPropertyNames(source);
|
|
675
665
|
for (let i = 0; i < keyList.length; i++) {
|
|
@@ -716,8 +706,7 @@
|
|
|
716
706
|
function uniqArray(arr) {
|
|
717
707
|
return arr && isArray$1(arr) ? Array.from(new Set(array(arr))) : arr;
|
|
718
708
|
}
|
|
719
|
-
function shuffleArray(arr) {
|
|
720
|
-
let random = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Math.random;
|
|
709
|
+
function shuffleArray(arr, random = Math.random) {
|
|
721
710
|
let j,
|
|
722
711
|
x,
|
|
723
712
|
i = arr.length;
|
|
@@ -748,8 +737,7 @@
|
|
|
748
737
|
return Number(a);
|
|
749
738
|
}
|
|
750
739
|
|
|
751
|
-
function quantileSorted(values, percent) {
|
|
752
|
-
let valueof = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : toNumber;
|
|
740
|
+
function quantileSorted(values, percent, valueof = toNumber) {
|
|
753
741
|
const n = values.length;
|
|
754
742
|
if (!n) return;
|
|
755
743
|
if (percent <= 0 || n < 2) return valueof(values[0], 0, values);
|
|
@@ -782,9 +770,7 @@
|
|
|
782
770
|
static clearInstance() {
|
|
783
771
|
Logger._instance = null;
|
|
784
772
|
}
|
|
785
|
-
constructor() {
|
|
786
|
-
let level = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : LoggerLevel.None;
|
|
787
|
-
let method = arguments.length > 1 ? arguments[1] : undefined;
|
|
773
|
+
constructor(level = LoggerLevel.None, method) {
|
|
788
774
|
this._onErrorHandler = [], this._level = level, this._method = method;
|
|
789
775
|
}
|
|
790
776
|
addErrorHandler(handler) {
|
|
@@ -794,10 +780,7 @@
|
|
|
794
780
|
const index = this._onErrorHandler.findIndex(h => h === handler);
|
|
795
781
|
index < 0 || this._onErrorHandler.splice(index, 1);
|
|
796
782
|
}
|
|
797
|
-
callErrorHandler() {
|
|
798
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
799
|
-
args[_key] = arguments[_key];
|
|
800
|
-
}
|
|
783
|
+
callErrorHandler(...args) {
|
|
801
784
|
this._onErrorHandler.forEach(h => h(...args));
|
|
802
785
|
}
|
|
803
786
|
canLogInfo() {
|
|
@@ -815,37 +798,23 @@
|
|
|
815
798
|
level(levelValue) {
|
|
816
799
|
return arguments.length ? (this._level = +levelValue, this) : this._level;
|
|
817
800
|
}
|
|
818
|
-
error() {
|
|
801
|
+
error(...args) {
|
|
819
802
|
var _a;
|
|
820
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
821
|
-
args[_key2] = arguments[_key2];
|
|
822
|
-
}
|
|
823
803
|
return this._level >= LoggerLevel.Error && (this._onErrorHandler.length ? this.callErrorHandler(...args) : log$1(null !== (_a = this._method) && void 0 !== _a ? _a : "error", "ERROR", args)), this;
|
|
824
804
|
}
|
|
825
|
-
warn() {
|
|
826
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
827
|
-
args[_key3] = arguments[_key3];
|
|
828
|
-
}
|
|
805
|
+
warn(...args) {
|
|
829
806
|
return this._level >= LoggerLevel.Warn && log$1(this._method || "warn", "WARN", args), this;
|
|
830
807
|
}
|
|
831
|
-
info() {
|
|
832
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
833
|
-
args[_key4] = arguments[_key4];
|
|
834
|
-
}
|
|
808
|
+
info(...args) {
|
|
835
809
|
return this._level >= LoggerLevel.Info && log$1(this._method || "log", "INFO", args), this;
|
|
836
810
|
}
|
|
837
|
-
debug() {
|
|
838
|
-
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
839
|
-
args[_key5] = arguments[_key5];
|
|
840
|
-
}
|
|
811
|
+
debug(...args) {
|
|
841
812
|
return this._level >= LoggerLevel.Debug && log$1(this._method || "log", "DEBUG", args), this;
|
|
842
813
|
}
|
|
843
814
|
}
|
|
844
815
|
Logger._instance = null;
|
|
845
816
|
|
|
846
|
-
function bisect(a, x) {
|
|
847
|
-
let lo = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
848
|
-
let hi = arguments.length > 3 ? arguments[3] : undefined;
|
|
817
|
+
function bisect(a, x, lo = 0, hi) {
|
|
849
818
|
for (isNil$1(hi) && (hi = a.length); lo < hi;) {
|
|
850
819
|
const mid = lo + hi >>> 1;
|
|
851
820
|
ascending$1(a[mid], x) > 0 ? hi = mid : lo = mid + 1;
|
|
@@ -890,9 +859,7 @@
|
|
|
890
859
|
|
|
891
860
|
const DEFAULT_ABSOLUTE_TOLERATE = 1e-10,
|
|
892
861
|
DEFAULT_RELATIVE_TOLERATE = 1e-10;
|
|
893
|
-
function isNumberClose(a, b) {
|
|
894
|
-
let relTol = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_RELATIVE_TOLERATE;
|
|
895
|
-
let absTol = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_ABSOLUTE_TOLERATE;
|
|
862
|
+
function isNumberClose(a, b, relTol = DEFAULT_RELATIVE_TOLERATE, absTol = DEFAULT_ABSOLUTE_TOLERATE) {
|
|
896
863
|
const abs = absTol,
|
|
897
864
|
rel = relTol * Math.max(a, b);
|
|
898
865
|
return Math.abs(a - b) <= Math.max(abs, rel);
|
|
@@ -907,12 +874,7 @@
|
|
|
907
874
|
const memoize = func => {
|
|
908
875
|
let lastArgs = null,
|
|
909
876
|
lastResult = null;
|
|
910
|
-
return
|
|
911
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
912
|
-
args[_key] = arguments[_key];
|
|
913
|
-
}
|
|
914
|
-
return lastArgs && args.every((val, i) => val === lastArgs[i]) || (lastArgs = args, lastResult = func(...args)), lastResult;
|
|
915
|
-
};
|
|
877
|
+
return (...args) => (lastArgs && args.every((val, i) => val === lastArgs[i]) || (lastArgs = args, lastResult = func(...args)), lastResult);
|
|
916
878
|
};
|
|
917
879
|
|
|
918
880
|
const clamp = function (input, min, max) {
|
|
@@ -976,12 +938,9 @@
|
|
|
976
938
|
function trailingEdge(time) {
|
|
977
939
|
return timerId = void 0, trailing && lastArgs ? invokeFunc(time) : (lastArgs = lastThis = void 0, result);
|
|
978
940
|
}
|
|
979
|
-
function debounced() {
|
|
941
|
+
function debounced(...args) {
|
|
980
942
|
const time = Date.now(),
|
|
981
943
|
isInvoking = shouldInvoke(time);
|
|
982
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
983
|
-
args[_key] = arguments[_key];
|
|
984
|
-
}
|
|
985
944
|
if (lastArgs = args, lastThis = this, lastCallTime = time, isInvoking) {
|
|
986
945
|
if (void 0 === timerId) return function (time) {
|
|
987
946
|
return lastInvokeTime = time, timerId = startTimer(timerExpired, wait), leading ? invokeFunc(time) : result;
|
|
@@ -1106,8 +1065,7 @@
|
|
|
1106
1065
|
function fuzzyEqualVec(a, b) {
|
|
1107
1066
|
return abs$1(a[0] - b[0]) + abs$1(a[1] - b[1]) < 1e-12;
|
|
1108
1067
|
}
|
|
1109
|
-
function fixPrecision$1(num) {
|
|
1110
|
-
let precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
|
|
1068
|
+
function fixPrecision$1(num, precision = 10) {
|
|
1111
1069
|
return Math.round(num * precision) / precision;
|
|
1112
1070
|
}
|
|
1113
1071
|
function getDecimalPlaces(n) {
|
|
@@ -1123,11 +1081,7 @@
|
|
|
1123
1081
|
}
|
|
1124
1082
|
|
|
1125
1083
|
class Point {
|
|
1126
|
-
constructor() {
|
|
1127
|
-
let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
1128
|
-
let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
1129
|
-
let x1 = arguments.length > 2 ? arguments[2] : undefined;
|
|
1130
|
-
let y1 = arguments.length > 3 ? arguments[3] : undefined;
|
|
1084
|
+
constructor(x = 0, y = 0, x1, y1) {
|
|
1131
1085
|
this.x = 0, this.y = 0, this.x = x, this.y = y, this.x1 = x1, this.y1 = y1;
|
|
1132
1086
|
}
|
|
1133
1087
|
clone() {
|
|
@@ -1173,8 +1127,7 @@
|
|
|
1173
1127
|
function radianToDegree(radian) {
|
|
1174
1128
|
return 180 * radian / Math.PI;
|
|
1175
1129
|
}
|
|
1176
|
-
const clampRadian =
|
|
1177
|
-
let angle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
1130
|
+
const clampRadian = (angle = 0) => {
|
|
1178
1131
|
if (angle < 0) for (; angle < -tau$1;) angle += tau$1;else if (angle > 0) for (; angle > tau$1;) angle -= tau$1;
|
|
1179
1132
|
return angle;
|
|
1180
1133
|
};
|
|
@@ -1188,13 +1141,10 @@
|
|
|
1188
1141
|
y: center.y
|
|
1189
1142
|
};
|
|
1190
1143
|
}
|
|
1191
|
-
function cartesianToPolar(point
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
};
|
|
1196
|
-
let startAngle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
1197
|
-
let endAngle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 2 * Math.PI;
|
|
1144
|
+
function cartesianToPolar(point, center = {
|
|
1145
|
+
x: 0,
|
|
1146
|
+
y: 0
|
|
1147
|
+
}, startAngle = 0, endAngle = 2 * Math.PI) {
|
|
1198
1148
|
const {
|
|
1199
1149
|
x: x,
|
|
1200
1150
|
y: y
|
|
@@ -1370,15 +1320,13 @@
|
|
|
1370
1320
|
function getProjectionRadius(checkAxis, axis) {
|
|
1371
1321
|
return Math.abs(axis[0] * checkAxis[0] + axis[1] * checkAxis[1]);
|
|
1372
1322
|
}
|
|
1373
|
-
function rotatePoint(
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
y: 0
|
|
1381
|
-
};
|
|
1323
|
+
function rotatePoint({
|
|
1324
|
+
x: x,
|
|
1325
|
+
y: y
|
|
1326
|
+
}, rad, origin = {
|
|
1327
|
+
x: 0,
|
|
1328
|
+
y: 0
|
|
1329
|
+
}) {
|
|
1382
1330
|
return {
|
|
1383
1331
|
x: (x - origin.x) * Math.cos(rad) - (y - origin.y) * Math.sin(rad) + origin.x,
|
|
1384
1332
|
y: (x - origin.x) * Math.sin(rad) + (y - origin.y) * Math.cos(rad) + origin.y
|
|
@@ -1407,8 +1355,7 @@
|
|
|
1407
1355
|
y: box.y2
|
|
1408
1356
|
}, deg, cp)];
|
|
1409
1357
|
}
|
|
1410
|
-
function isRotateAABBIntersect(box1, box2) {
|
|
1411
|
-
let isDeg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
1358
|
+
function isRotateAABBIntersect(box1, box2, isDeg = !1) {
|
|
1412
1359
|
const rect1 = toRect$1(box1, isDeg),
|
|
1413
1360
|
rect2 = toRect$1(box2, isDeg),
|
|
1414
1361
|
vector = (start, end) => [end.x - start.x, end.y - start.y],
|
|
@@ -1488,9 +1435,7 @@
|
|
|
1488
1435
|
return 55296 <= x && x <= 56319 && 56320 <= y && y <= 57343 && (x &= 1023, y &= 1023, codePoint = x << 10 | y, codePoint += 65536), 12288 === codePoint || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 ? "F" : 8361 === codePoint || 65377 <= codePoint && codePoint <= 65470 || 65474 <= codePoint && codePoint <= 65479 || 65482 <= codePoint && codePoint <= 65487 || 65490 <= codePoint && codePoint <= 65495 || 65498 <= codePoint && codePoint <= 65500 || 65512 <= codePoint && codePoint <= 65518 ? "H" : 4352 <= codePoint && codePoint <= 4447 || 4515 <= codePoint && codePoint <= 4519 || 4602 <= codePoint && codePoint <= 4607 || 9001 <= codePoint && codePoint <= 9002 || 11904 <= codePoint && codePoint <= 11929 || 11931 <= codePoint && codePoint <= 12019 || 12032 <= codePoint && codePoint <= 12245 || 12272 <= codePoint && codePoint <= 12283 || 12289 <= codePoint && codePoint <= 12350 || 12353 <= codePoint && codePoint <= 12438 || 12441 <= codePoint && codePoint <= 12543 || 12549 <= codePoint && codePoint <= 12589 || 12593 <= codePoint && codePoint <= 12686 || 12688 <= codePoint && codePoint <= 12730 || 12736 <= codePoint && codePoint <= 12771 || 12784 <= codePoint && codePoint <= 12830 || 12832 <= codePoint && codePoint <= 12871 || 12880 <= codePoint && codePoint <= 13054 || 13056 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42124 || 42128 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 55216 <= codePoint && codePoint <= 55238 || 55243 <= codePoint && codePoint <= 55291 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65106 || 65108 <= codePoint && codePoint <= 65126 || 65128 <= codePoint && codePoint <= 65131 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127490 || 127504 <= codePoint && codePoint <= 127546 || 127552 <= codePoint && codePoint <= 127560 || 127568 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 194367 || 177984 <= codePoint && codePoint <= 196605 || 196608 <= codePoint && codePoint <= 262141 ? "W" : 32 <= codePoint && codePoint <= 126 || 162 <= codePoint && codePoint <= 163 || 165 <= codePoint && codePoint <= 166 || 172 === codePoint || 175 === codePoint || 10214 <= codePoint && codePoint <= 10221 || 10629 <= codePoint && codePoint <= 10630 ? "Na" : 161 === codePoint || 164 === codePoint || 167 <= codePoint && codePoint <= 168 || 170 === codePoint || 173 <= codePoint && codePoint <= 174 || 176 <= codePoint && codePoint <= 180 || 182 <= codePoint && codePoint <= 186 || 188 <= codePoint && codePoint <= 191 || 198 === codePoint || 208 === codePoint || 215 <= codePoint && codePoint <= 216 || 222 <= codePoint && codePoint <= 225 || 230 === codePoint || 232 <= codePoint && codePoint <= 234 || 236 <= codePoint && codePoint <= 237 || 240 === codePoint || 242 <= codePoint && codePoint <= 243 || 247 <= codePoint && codePoint <= 250 || 252 === codePoint || 254 === codePoint || 257 === codePoint || 273 === codePoint || 275 === codePoint || 283 === codePoint || 294 <= codePoint && codePoint <= 295 || 299 === codePoint || 305 <= codePoint && codePoint <= 307 || 312 === codePoint || 319 <= codePoint && codePoint <= 322 || 324 === codePoint || 328 <= codePoint && codePoint <= 331 || 333 === codePoint || 338 <= codePoint && codePoint <= 339 || 358 <= codePoint && codePoint <= 359 || 363 === codePoint || 462 === codePoint || 464 === codePoint || 466 === codePoint || 468 === codePoint || 470 === codePoint || 472 === codePoint || 474 === codePoint || 476 === codePoint || 593 === codePoint || 609 === codePoint || 708 === codePoint || 711 === codePoint || 713 <= codePoint && codePoint <= 715 || 717 === codePoint || 720 === codePoint || 728 <= codePoint && codePoint <= 731 || 733 === codePoint || 735 === codePoint || 768 <= codePoint && codePoint <= 879 || 913 <= codePoint && codePoint <= 929 || 931 <= codePoint && codePoint <= 937 || 945 <= codePoint && codePoint <= 961 || 963 <= codePoint && codePoint <= 969 || 1025 === codePoint || 1040 <= codePoint && codePoint <= 1103 || 1105 === codePoint || 8208 === codePoint || 8211 <= codePoint && codePoint <= 8214 || 8216 <= codePoint && codePoint <= 8217 || 8220 <= codePoint && codePoint <= 8221 || 8224 <= codePoint && codePoint <= 8226 || 8228 <= codePoint && codePoint <= 8231 || 8240 === codePoint || 8242 <= codePoint && codePoint <= 8243 || 8245 === codePoint || 8251 === codePoint || 8254 === codePoint || 8308 === codePoint || 8319 === codePoint || 8321 <= codePoint && codePoint <= 8324 || 8364 === codePoint || 8451 === codePoint || 8453 === codePoint || 8457 === codePoint || 8467 === codePoint || 8470 === codePoint || 8481 <= codePoint && codePoint <= 8482 || 8486 === codePoint || 8491 === codePoint || 8531 <= codePoint && codePoint <= 8532 || 8539 <= codePoint && codePoint <= 8542 || 8544 <= codePoint && codePoint <= 8555 || 8560 <= codePoint && codePoint <= 8569 || 8585 === codePoint || 8592 <= codePoint && codePoint <= 8601 || 8632 <= codePoint && codePoint <= 8633 || 8658 === codePoint || 8660 === codePoint || 8679 === codePoint || 8704 === codePoint || 8706 <= codePoint && codePoint <= 8707 || 8711 <= codePoint && codePoint <= 8712 || 8715 === codePoint || 8719 === codePoint || 8721 === codePoint || 8725 === codePoint || 8730 === codePoint || 8733 <= codePoint && codePoint <= 8736 || 8739 === codePoint || 8741 === codePoint || 8743 <= codePoint && codePoint <= 8748 || 8750 === codePoint || 8756 <= codePoint && codePoint <= 8759 || 8764 <= codePoint && codePoint <= 8765 || 8776 === codePoint || 8780 === codePoint || 8786 === codePoint || 8800 <= codePoint && codePoint <= 8801 || 8804 <= codePoint && codePoint <= 8807 || 8810 <= codePoint && codePoint <= 8811 || 8814 <= codePoint && codePoint <= 8815 || 8834 <= codePoint && codePoint <= 8835 || 8838 <= codePoint && codePoint <= 8839 || 8853 === codePoint || 8857 === codePoint || 8869 === codePoint || 8895 === codePoint || 8978 === codePoint || 9312 <= codePoint && codePoint <= 9449 || 9451 <= codePoint && codePoint <= 9547 || 9552 <= codePoint && codePoint <= 9587 || 9600 <= codePoint && codePoint <= 9615 || 9618 <= codePoint && codePoint <= 9621 || 9632 <= codePoint && codePoint <= 9633 || 9635 <= codePoint && codePoint <= 9641 || 9650 <= codePoint && codePoint <= 9651 || 9654 <= codePoint && codePoint <= 9655 || 9660 <= codePoint && codePoint <= 9661 || 9664 <= codePoint && codePoint <= 9665 || 9670 <= codePoint && codePoint <= 9672 || 9675 === codePoint || 9678 <= codePoint && codePoint <= 9681 || 9698 <= codePoint && codePoint <= 9701 || 9711 === codePoint || 9733 <= codePoint && codePoint <= 9734 || 9737 === codePoint || 9742 <= codePoint && codePoint <= 9743 || 9748 <= codePoint && codePoint <= 9749 || 9756 === codePoint || 9758 === codePoint || 9792 === codePoint || 9794 === codePoint || 9824 <= codePoint && codePoint <= 9825 || 9827 <= codePoint && codePoint <= 9829 || 9831 <= codePoint && codePoint <= 9834 || 9836 <= codePoint && codePoint <= 9837 || 9839 === codePoint || 9886 <= codePoint && codePoint <= 9887 || 9918 <= codePoint && codePoint <= 9919 || 9924 <= codePoint && codePoint <= 9933 || 9935 <= codePoint && codePoint <= 9953 || 9955 === codePoint || 9960 <= codePoint && codePoint <= 9983 || 10045 === codePoint || 10071 === codePoint || 10102 <= codePoint && codePoint <= 10111 || 11093 <= codePoint && codePoint <= 11097 || 12872 <= codePoint && codePoint <= 12879 || 57344 <= codePoint && codePoint <= 63743 || 65024 <= codePoint && codePoint <= 65039 || 65533 === codePoint || 127232 <= codePoint && codePoint <= 127242 || 127248 <= codePoint && codePoint <= 127277 || 127280 <= codePoint && codePoint <= 127337 || 127344 <= codePoint && codePoint <= 127386 || 917760 <= codePoint && codePoint <= 917999 || 983040 <= codePoint && codePoint <= 1048573 || 1048576 <= codePoint && codePoint <= 1114109 ? "A" : "N";
|
|
1489
1436
|
};
|
|
1490
1437
|
|
|
1491
|
-
function getContextFont(text) {
|
|
1492
|
-
let defaultAttr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1493
|
-
let fontSizeScale = arguments.length > 2 ? arguments[2] : undefined;
|
|
1438
|
+
function getContextFont(text, defaultAttr = {}, fontSizeScale) {
|
|
1494
1439
|
fontSizeScale || (fontSizeScale = 1);
|
|
1495
1440
|
const {
|
|
1496
1441
|
fontStyle = defaultAttr.fontStyle,
|
|
@@ -1816,49 +1761,29 @@
|
|
|
1816
1761
|
equals(b) {
|
|
1817
1762
|
return this.x1 === b.x1 && this.y1 === b.y1 && this.x2 === b.x2 && this.y2 === b.y2;
|
|
1818
1763
|
}
|
|
1819
|
-
setValue() {
|
|
1820
|
-
let x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
1821
|
-
let y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
1822
|
-
let x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
1823
|
-
let y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
1764
|
+
setValue(x1 = 0, y1 = 0, x2 = 0, y2 = 0) {
|
|
1824
1765
|
return this.x1 = x1, this.y1 = y1, this.x2 = x2, this.y2 = y2, this;
|
|
1825
1766
|
}
|
|
1826
|
-
set() {
|
|
1827
|
-
let x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
1828
|
-
let y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
1829
|
-
let x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
1830
|
-
let y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
1767
|
+
set(x1 = 0, y1 = 0, x2 = 0, y2 = 0) {
|
|
1831
1768
|
return x2 < x1 ? (this.x2 = x1, this.x1 = x2) : (this.x1 = x1, this.x2 = x2), y2 < y1 ? (this.y2 = y1, this.y1 = y2) : (this.y1 = y1, this.y2 = y2), this;
|
|
1832
1769
|
}
|
|
1833
|
-
add() {
|
|
1834
|
-
let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
1835
|
-
let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
1770
|
+
add(x = 0, y = 0) {
|
|
1836
1771
|
return x < this.x1 && (this.x1 = x), y < this.y1 && (this.y1 = y), x > this.x2 && (this.x2 = x), y > this.y2 && (this.y2 = y), this;
|
|
1837
1772
|
}
|
|
1838
|
-
expand() {
|
|
1839
|
-
let d = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
1773
|
+
expand(d = 0) {
|
|
1840
1774
|
return isArray$1(d) ? (this.y1 -= d[0], this.x2 += d[1], this.y2 += d[2], this.x1 -= d[3]) : (this.x1 -= d, this.y1 -= d, this.x2 += d, this.y2 += d), this;
|
|
1841
1775
|
}
|
|
1842
1776
|
round() {
|
|
1843
1777
|
return this.x1 = Math.floor(this.x1), this.y1 = Math.floor(this.y1), this.x2 = Math.ceil(this.x2), this.y2 = Math.ceil(this.y2), this;
|
|
1844
1778
|
}
|
|
1845
|
-
translate() {
|
|
1846
|
-
let dx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
1847
|
-
let dy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
1779
|
+
translate(dx = 0, dy = 0) {
|
|
1848
1780
|
return this.x1 += dx, this.x2 += dx, this.y1 += dy, this.y2 += dy, this;
|
|
1849
1781
|
}
|
|
1850
|
-
rotate() {
|
|
1851
|
-
let angle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
1852
|
-
let x = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
1853
|
-
let y = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
1782
|
+
rotate(angle = 0, x = 0, y = 0) {
|
|
1854
1783
|
const p = this.rotatedPoints(angle, x, y);
|
|
1855
1784
|
return this.clear().add(p[0], p[1]).add(p[2], p[3]).add(p[4], p[5]).add(p[6], p[7]);
|
|
1856
1785
|
}
|
|
1857
|
-
scale() {
|
|
1858
|
-
let sx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
1859
|
-
let sy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
1860
|
-
let x = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
1861
|
-
let y = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
1786
|
+
scale(sx = 0, sy = 0, x = 0, y = 0) {
|
|
1862
1787
|
const p = this.scalePoints(sx, sy, x, y);
|
|
1863
1788
|
return this.clear().add(p[0], p[1]).add(p[2], p[3]);
|
|
1864
1789
|
}
|
|
@@ -1877,9 +1802,7 @@
|
|
|
1877
1802
|
intersects(b) {
|
|
1878
1803
|
return b && !(this.x2 < b.x1 || this.x1 > b.x2 || this.y2 < b.y1 || this.y1 > b.y2);
|
|
1879
1804
|
}
|
|
1880
|
-
contains() {
|
|
1881
|
-
let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
1882
|
-
let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
1805
|
+
contains(x = 0, y = 0) {
|
|
1883
1806
|
return !(x < this.x1 || x > this.x2 || y < this.y1 || y > this.y2);
|
|
1884
1807
|
}
|
|
1885
1808
|
containsPoint(p) {
|
|
@@ -1891,12 +1814,10 @@
|
|
|
1891
1814
|
height() {
|
|
1892
1815
|
return this.empty() ? 0 : this.y2 - this.y1;
|
|
1893
1816
|
}
|
|
1894
|
-
scaleX() {
|
|
1895
|
-
let s = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
1817
|
+
scaleX(s = 0) {
|
|
1896
1818
|
return this.x1 *= s, this.x2 *= s, this;
|
|
1897
1819
|
}
|
|
1898
|
-
scaleY() {
|
|
1899
|
-
let s = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
1820
|
+
scaleY(s = 0) {
|
|
1900
1821
|
return this.y1 *= s, this.y2 *= s, this;
|
|
1901
1822
|
}
|
|
1902
1823
|
transformWithMatrix(matrix) {
|
|
@@ -1930,20 +1851,14 @@
|
|
|
1930
1851
|
}
|
|
1931
1852
|
class AABBBounds extends Bounds {}
|
|
1932
1853
|
class OBBBounds extends Bounds {
|
|
1933
|
-
constructor(bounds) {
|
|
1934
|
-
let angle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
1854
|
+
constructor(bounds, angle = 0) {
|
|
1935
1855
|
var _a;
|
|
1936
1856
|
super(bounds), bounds && (this.angle = null !== (_a = bounds.angle) && void 0 !== _a ? _a : angle);
|
|
1937
1857
|
}
|
|
1938
1858
|
intersects(b) {
|
|
1939
1859
|
return isRotateAABBIntersect(this, b);
|
|
1940
1860
|
}
|
|
1941
|
-
setValue() {
|
|
1942
|
-
let x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
1943
|
-
let y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
1944
|
-
let x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
1945
|
-
let y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
1946
|
-
let angle = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
1861
|
+
setValue(x1 = 0, y1 = 0, x2 = 0, y2 = 0, angle = 0) {
|
|
1947
1862
|
return super.setValue(x1, y1, x2, y2), this.angle = angle, this;
|
|
1948
1863
|
}
|
|
1949
1864
|
clone() {
|
|
@@ -1971,13 +1886,7 @@
|
|
|
1971
1886
|
}
|
|
1972
1887
|
|
|
1973
1888
|
class Matrix {
|
|
1974
|
-
constructor() {
|
|
1975
|
-
let a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
1976
|
-
let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
1977
|
-
let c = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
1978
|
-
let d = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
1979
|
-
let e = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
1980
|
-
let f = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
|
|
1889
|
+
constructor(a = 1, b = 0, c = 0, d = 1, e = 0, f = 0) {
|
|
1981
1890
|
this.a = a, this.b = b, this.c = c, this.d = d, this.e = e, this.f = f;
|
|
1982
1891
|
}
|
|
1983
1892
|
equalToMatrix(m2) {
|
|
@@ -2087,8 +1996,7 @@
|
|
|
2087
1996
|
} = source;
|
|
2088
1997
|
target.x = x * nextA + y * nextC + nextE, target.y = x * nextB + y * nextD + nextF;
|
|
2089
1998
|
}
|
|
2090
|
-
onlyTranslate() {
|
|
2091
|
-
let scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
1999
|
+
onlyTranslate(scale = 1) {
|
|
2092
2000
|
return this.a === scale && 0 === this.b && 0 === this.c && this.d === scale;
|
|
2093
2001
|
}
|
|
2094
2002
|
clone() {
|
|
@@ -2395,16 +2303,13 @@
|
|
|
2395
2303
|
}
|
|
2396
2304
|
};
|
|
2397
2305
|
class Color {
|
|
2398
|
-
static Brighter(source) {
|
|
2399
|
-
let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
2306
|
+
static Brighter(source, b = 1) {
|
|
2400
2307
|
return 1 === b ? source : new Color(source).brighter(b).toRGBA();
|
|
2401
2308
|
}
|
|
2402
|
-
static SetOpacity(source) {
|
|
2403
|
-
let o = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
2309
|
+
static SetOpacity(source, o = 1) {
|
|
2404
2310
|
return 1 === o ? source : new Color(source).setOpacity(o).toRGBA();
|
|
2405
2311
|
}
|
|
2406
|
-
static getColorBrightness(source) {
|
|
2407
|
-
let model = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "hsl";
|
|
2312
|
+
static getColorBrightness(source, model = "hsl") {
|
|
2408
2313
|
const color = source instanceof Color ? source : new Color(source);
|
|
2409
2314
|
switch (model) {
|
|
2410
2315
|
case "hsv":
|
|
@@ -2508,8 +2413,7 @@
|
|
|
2508
2413
|
setScalar(scalar) {
|
|
2509
2414
|
return this.color.r = scalar, this.color.g = scalar, this.color.b = scalar, this;
|
|
2510
2415
|
}
|
|
2511
|
-
setOpacity() {
|
|
2512
|
-
let o = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
2416
|
+
setOpacity(o = 1) {
|
|
2513
2417
|
return this.color.opacity = o, this;
|
|
2514
2418
|
}
|
|
2515
2419
|
getLuminance() {
|
|
@@ -2532,12 +2436,10 @@
|
|
|
2532
2436
|
clone() {
|
|
2533
2437
|
return new Color(this.color.toString());
|
|
2534
2438
|
}
|
|
2535
|
-
copyGammaToLinear(color) {
|
|
2536
|
-
let gammaFactor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
2439
|
+
copyGammaToLinear(color, gammaFactor = 2) {
|
|
2537
2440
|
return this.color.r = Math.pow(color.color.r, gammaFactor), this.color.g = Math.pow(color.color.g, gammaFactor), this.color.b = Math.pow(color.color.b, gammaFactor), this;
|
|
2538
2441
|
}
|
|
2539
|
-
copyLinearToGamma(color) {
|
|
2540
|
-
let gammaFactor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
2442
|
+
copyLinearToGamma(color, gammaFactor = 2) {
|
|
2541
2443
|
const safeInverse = gammaFactor > 0 ? 1 / gammaFactor : 1;
|
|
2542
2444
|
return this.color.r = Math.pow(color.color.r, safeInverse), this.color.g = Math.pow(color.color.g, safeInverse), this.color.b = Math.pow(color.color.b, safeInverse), this;
|
|
2543
2445
|
}
|
|
@@ -2657,9 +2559,7 @@
|
|
|
2657
2559
|
return [0, 0, 0, 0];
|
|
2658
2560
|
}
|
|
2659
2561
|
|
|
2660
|
-
function getContainerSize(el) {
|
|
2661
|
-
let defaultWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
2662
|
-
let defaultHeight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
2562
|
+
function getContainerSize(el, defaultWidth = 0, defaultHeight = 0) {
|
|
2663
2563
|
if (!el) return {
|
|
2664
2564
|
width: defaultWidth,
|
|
2665
2565
|
height: defaultHeight
|
|
@@ -2694,8 +2594,7 @@
|
|
|
2694
2594
|
y: y
|
|
2695
2595
|
};
|
|
2696
2596
|
}
|
|
2697
|
-
const styleStringToObject =
|
|
2698
|
-
let styleStr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
2597
|
+
const styleStringToObject = (styleStr = "") => {
|
|
2699
2598
|
const res = {};
|
|
2700
2599
|
return styleStr.split(";").forEach(item => {
|
|
2701
2600
|
if (item) {
|
|
@@ -2891,8 +2790,7 @@
|
|
|
2891
2790
|
}
|
|
2892
2791
|
return result;
|
|
2893
2792
|
}
|
|
2894
|
-
function destination(point, distance, bearing) {
|
|
2895
|
-
let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
2793
|
+
function destination(point, distance, bearing, options = {}) {
|
|
2896
2794
|
const longitude1 = degreeToRadian(point[0]),
|
|
2897
2795
|
latitude1 = degreeToRadian(point[1]),
|
|
2898
2796
|
bearingRad = degreeToRadian(bearing),
|
|
@@ -3259,8 +3157,7 @@
|
|
|
3259
3157
|
}
|
|
3260
3158
|
|
|
3261
3159
|
class FormatSpecifier {
|
|
3262
|
-
constructor() {
|
|
3263
|
-
let specifier = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3160
|
+
constructor(specifier = {}) {
|
|
3264
3161
|
this.fill = void 0 === specifier.fill ? " " : specifier.fill + "", this.align = void 0 === specifier.align ? ">" : specifier.align + "", this.sign = void 0 === specifier.sign ? "-" : specifier.sign + "", this.symbol = void 0 === specifier.symbol ? "" : specifier.symbol + "", this.zero = !!specifier.zero, this.width = void 0 === specifier.width ? void 0 : +specifier.width, this.comma = !!specifier.comma, this.precision = void 0 === specifier.precision ? void 0 : +specifier.precision, this.trim = !!specifier.trim, this.type = void 0 === specifier.type ? "" : specifier.type + "";
|
|
3265
3162
|
}
|
|
3266
3163
|
toString() {
|
|
@@ -6020,10 +5917,7 @@
|
|
|
6020
5917
|
var simplifyGeojsonExports = simplifyGeojson.exports;
|
|
6021
5918
|
var geoSimplify = /*@__PURE__*/getDefaultExportFromCjs(simplifyGeojsonExports);
|
|
6022
5919
|
|
|
6023
|
-
const mergeDeepImmer = function (target) {
|
|
6024
|
-
for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key2 = 1; _key2 < _len; _key2++) {
|
|
6025
|
-
sources[_key2 - 1] = arguments[_key2];
|
|
6026
|
-
}
|
|
5920
|
+
const mergeDeepImmer = function (target, ...sources) {
|
|
6027
5921
|
return mergeOption(cloneDeep(target), ...sources);
|
|
6028
5922
|
};
|
|
6029
5923
|
function _mergeOptionDeep(target, source, key) {
|
|
@@ -6036,12 +5930,12 @@
|
|
|
6036
5930
|
function _mergeOptionBase(target, source) {
|
|
6037
5931
|
if (isObject$2(source) && target !== source) for (const key in source) _mergeOptionDeep(target, source, key);
|
|
6038
5932
|
}
|
|
6039
|
-
function mergeOption(target) {
|
|
5933
|
+
function mergeOption(target, ...sources) {
|
|
6040
5934
|
target || (target = {});
|
|
6041
5935
|
let sourceIndex = -1;
|
|
6042
|
-
const length =
|
|
5936
|
+
const length = sources.length;
|
|
6043
5937
|
for (; ++sourceIndex < length;) {
|
|
6044
|
-
_mergeOptionBase(target,
|
|
5938
|
+
_mergeOptionBase(target, sources[sourceIndex]);
|
|
6045
5939
|
}
|
|
6046
5940
|
return target;
|
|
6047
5941
|
}
|
|
@@ -6285,9 +6179,7 @@
|
|
|
6285
6179
|
const DEFAULT_DSV_PARSER_OPTIONS = {
|
|
6286
6180
|
delimiter: ","
|
|
6287
6181
|
};
|
|
6288
|
-
const dsvParser =
|
|
6289
|
-
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6290
|
-
let dataView = arguments.length > 2 ? arguments[2] : undefined;
|
|
6182
|
+
const dsvParser = (data, options = {}, dataView) => {
|
|
6291
6183
|
dataView.type = DATAVIEW_TYPE.DSV;
|
|
6292
6184
|
const mergeOptions = mergeDeepImmer(DEFAULT_DSV_PARSER_OPTIONS, options),
|
|
6293
6185
|
{
|
|
@@ -6296,14 +6188,8 @@
|
|
|
6296
6188
|
if (!isString$1(delimiter)) throw new TypeError("Invalid delimiter: must be a string!");
|
|
6297
6189
|
return dsvFormat(delimiter).parse(data);
|
|
6298
6190
|
};
|
|
6299
|
-
const csvParser =
|
|
6300
|
-
|
|
6301
|
-
return dataView.type = DATAVIEW_TYPE.DSV, csvParse(data);
|
|
6302
|
-
};
|
|
6303
|
-
const tsvParser = function (data) {
|
|
6304
|
-
let dataView = arguments.length > 2 ? arguments[2] : undefined;
|
|
6305
|
-
return dataView.type = DATAVIEW_TYPE.DSV, tsvParse(data);
|
|
6306
|
-
};
|
|
6191
|
+
const csvParser = (data, options = {}, dataView) => (dataView.type = DATAVIEW_TYPE.DSV, csvParse(data));
|
|
6192
|
+
const tsvParser = (data, options = {}, dataView) => (dataView.type = DATAVIEW_TYPE.DSV, tsvParse(data));
|
|
6307
6193
|
|
|
6308
6194
|
/**
|
|
6309
6195
|
* Returns a cloned copy of the passed GeoJSON Object, including possible 'Foreign Members'.
|
|
@@ -6906,9 +6792,7 @@
|
|
|
6906
6792
|
}) : featuresArr.push(MultiToSingle(item));
|
|
6907
6793
|
}), featuresArr;
|
|
6908
6794
|
};
|
|
6909
|
-
const geoJSONParser =
|
|
6910
|
-
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6911
|
-
let dataView = arguments.length > 2 ? arguments[2] : undefined;
|
|
6795
|
+
const geoJSONParser = (data, options = {}, dataView) => {
|
|
6912
6796
|
dataView.type = DATAVIEW_TYPE.GEO;
|
|
6913
6797
|
const mergeOptions = mergeDeepImmer(DEFAULT_GEOJSON_OPTIONS, options),
|
|
6914
6798
|
{
|
|
@@ -6978,8 +6862,7 @@
|
|
|
6978
6862
|
function splitNumberSequence(rawStr) {
|
|
6979
6863
|
return rawStr.match(numberReg) || [];
|
|
6980
6864
|
}
|
|
6981
|
-
const svgParser =
|
|
6982
|
-
let option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6865
|
+
const svgParser = (data, option = {}, dataView) => {
|
|
6983
6866
|
let parser = option.customDOMParser;
|
|
6984
6867
|
if (parser || (null === window || void 0 === window ? void 0 : window.DOMParser) && (parser = svg => new DOMParser().parseFromString(svg, "text/xml")), !parser) throw new Error("No Available DOMParser!");
|
|
6985
6868
|
const svg = parser(data);
|
|
@@ -6991,8 +6874,7 @@
|
|
|
6991
6874
|
return null;
|
|
6992
6875
|
};
|
|
6993
6876
|
let idx = 0;
|
|
6994
|
-
function parseSvgNode(svg) {
|
|
6995
|
-
let opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6877
|
+
function parseSvgNode(svg, opt = {}) {
|
|
6996
6878
|
const elements = [],
|
|
6997
6879
|
root = parseNode(svg, null);
|
|
6998
6880
|
let width = parseFloat(svg.getAttribute("width") || opt.width),
|
|
@@ -7119,8 +7001,7 @@
|
|
|
7119
7001
|
} = matrix;
|
|
7120
7002
|
return new Matrix(a, b, c, d, e, f);
|
|
7121
7003
|
}
|
|
7122
|
-
function traverse(node, parsedParent) {
|
|
7123
|
-
let result = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
7004
|
+
function traverse(node, parsedParent, result = []) {
|
|
7124
7005
|
var _a;
|
|
7125
7006
|
if (!node) return;
|
|
7126
7007
|
let parseResult;
|
|
@@ -7131,8 +7012,7 @@
|
|
|
7131
7012
|
|
|
7132
7013
|
let idIndex = 0;
|
|
7133
7014
|
const maxId = 1e8;
|
|
7134
|
-
function getUUID() {
|
|
7135
|
-
let prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "dataset";
|
|
7015
|
+
function getUUID(prefix = "dataset") {
|
|
7136
7016
|
return idIndex > maxId && (idIndex = 0), prefix + "_" + idIndex++;
|
|
7137
7017
|
}
|
|
7138
7018
|
|
|
@@ -7221,25 +7101,20 @@
|
|
|
7221
7101
|
const DataViewDiffRank = "_data-view-diff-rank";
|
|
7222
7102
|
class DataView {
|
|
7223
7103
|
constructor(dataSet, options) {
|
|
7224
|
-
var _this = this;
|
|
7225
7104
|
let name;
|
|
7226
|
-
this.dataSet = dataSet, this.options = options, this.isDataView = !0, this.target = new EventEmitter(), this.parseOption = null, this.transformsArr = [], this.isRunning = !1, this.rawData = {}, this.history = !1, this.parserData = {}, this.latestData = {}, this._fields = null, this.reRunAllTransform =
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
|
|
7230
|
-
|
|
7231
|
-
|
|
7232
|
-
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
}), _this.isLastTransform(t) && _this.diffLastData();
|
|
7236
|
-
}), _this.isRunning = !1, !1 !== opt.emitMessage && _this.target.emit("change", []), _this;
|
|
7237
|
-
}, this.markRunning = () => {
|
|
7105
|
+
this.dataSet = dataSet, this.options = options, this.isDataView = !0, this.target = new EventEmitter(), this.parseOption = null, this.transformsArr = [], this.isRunning = !1, this.rawData = {}, this.history = !1, this.parserData = {}, this.latestData = {}, this._fields = null, this.reRunAllTransform = (opt = {
|
|
7106
|
+
pushHistory: !0,
|
|
7107
|
+
emitMessage: !0
|
|
7108
|
+
}) => (this.isRunning = !0, this.resetTransformData(), this.transformsArr.forEach(t => {
|
|
7109
|
+
this.executeTransform(t, {
|
|
7110
|
+
pushHistory: opt.pushHistory,
|
|
7111
|
+
emitMessage: !1
|
|
7112
|
+
}), this.isLastTransform(t) && this.diffLastData();
|
|
7113
|
+
}), this.isRunning = !1, !1 !== opt.emitMessage && this.target.emit("change", []), this), this.markRunning = () => {
|
|
7238
7114
|
this.isRunning = !0, this.target.emit("markRunning", []);
|
|
7239
7115
|
}, name = (null == options ? void 0 : options.name) ? options.name : getUUID("dataview"), this.name = name, (null == options ? void 0 : options.history) && (this.history = options.history, this.historyData = []), this.dataSet.setDataView(name, this), this.setFields(null == options ? void 0 : options.fields);
|
|
7240
7116
|
}
|
|
7241
|
-
parse(data, options) {
|
|
7242
|
-
let emit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
7117
|
+
parse(data, options, emit = !1) {
|
|
7243
7118
|
var _a;
|
|
7244
7119
|
this.isRunning = !0, emit && this.target.emit("beforeParse", []), options && (this.parseOption = options);
|
|
7245
7120
|
const cloneData = this.cloneParseData(data, options);
|
|
@@ -7249,8 +7124,7 @@
|
|
|
7249
7124
|
} else this.parserData = cloneData, this.rawData = cloneData, this.history && this.historyData.push(cloneData), this.latestData = cloneData;
|
|
7250
7125
|
return this.isRunning = !1, emit && this.target.emit("afterParse", []), this;
|
|
7251
7126
|
}
|
|
7252
|
-
transform(options) {
|
|
7253
|
-
let execute = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
7127
|
+
transform(options, execute = !0) {
|
|
7254
7128
|
if (this.isRunning = !0, options && options.type) {
|
|
7255
7129
|
let pushOption = !0;
|
|
7256
7130
|
if ("fields" === options.type) {
|
|
@@ -7274,11 +7148,10 @@
|
|
|
7274
7148
|
return (null !== (_a = a.level) && void 0 !== _a ? _a : 0) - (null !== (_b = b.level) && void 0 !== _b ? _b : 0);
|
|
7275
7149
|
});
|
|
7276
7150
|
}
|
|
7277
|
-
executeTransform(options
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
};
|
|
7151
|
+
executeTransform(options, opt = {
|
|
7152
|
+
pushHistory: !0,
|
|
7153
|
+
emitMessage: !0
|
|
7154
|
+
}) {
|
|
7282
7155
|
const {
|
|
7283
7156
|
pushHistory: pushHistory,
|
|
7284
7157
|
emitMessage: emitMessage
|
|
@@ -7339,8 +7212,7 @@
|
|
|
7339
7212
|
var _a;
|
|
7340
7213
|
return this._fields ? this._fields : "dataview" === (null === (_a = this.parseOption) || void 0 === _a ? void 0 : _a.type) && 1 === this.rawData.length && this.rawData[0].getFields ? this.rawData[0].getFields() : null;
|
|
7341
7214
|
}
|
|
7342
|
-
setFields(f) {
|
|
7343
|
-
let foreMerge = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
7215
|
+
setFields(f, foreMerge = !1) {
|
|
7344
7216
|
this._fields = f && foreMerge ? merge$1({}, this._fields, f) : f;
|
|
7345
7217
|
const fieldsOption = this.transformsArr.find(_op => "fields" === _op.type);
|
|
7346
7218
|
!isNil$1(this._fields) && isNil$1(fieldsOption) ? (this.dataSet.registerTransform("fields", fields), this.transform({
|
|
@@ -7856,20 +7728,14 @@
|
|
|
7856
7728
|
}
|
|
7857
7729
|
}
|
|
7858
7730
|
function bindContributionProvider(bind, id) {
|
|
7859
|
-
bind(ContributionProvider).toDynamicValue(
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
} = _ref;
|
|
7863
|
-
return new ContributionProviderCache(id, container);
|
|
7864
|
-
}).inSingletonScope().whenTargetNamed(id);
|
|
7731
|
+
bind(ContributionProvider).toDynamicValue(({
|
|
7732
|
+
container: container
|
|
7733
|
+
}) => new ContributionProviderCache(id, container)).inSingletonScope().whenTargetNamed(id);
|
|
7865
7734
|
}
|
|
7866
7735
|
function bindContributionProviderNoSingletonScope(bind, id) {
|
|
7867
|
-
bind(ContributionProvider).toDynamicValue(
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
} = _ref2;
|
|
7871
|
-
return new ContributionProviderCache(id, container);
|
|
7872
|
-
}).whenTargetNamed(id);
|
|
7736
|
+
bind(ContributionProvider).toDynamicValue(({
|
|
7737
|
+
container: container
|
|
7738
|
+
}) => new ContributionProviderCache(id, container)).whenTargetNamed(id);
|
|
7873
7739
|
}
|
|
7874
7740
|
class ContributionStore {
|
|
7875
7741
|
static getStore(id) {
|
|
@@ -7939,10 +7805,7 @@
|
|
|
7939
7805
|
}
|
|
7940
7806
|
|
|
7941
7807
|
class SyncHook extends Hook {
|
|
7942
|
-
call() {
|
|
7943
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
7944
|
-
args[_key] = arguments[_key];
|
|
7945
|
-
}
|
|
7808
|
+
call(...args) {
|
|
7946
7809
|
this.taps.map(t => t.fn).forEach(cb => cb(...args));
|
|
7947
7810
|
}
|
|
7948
7811
|
}
|
|
@@ -8186,16 +8049,13 @@
|
|
|
8186
8049
|
updateDom(dom, params) {
|
|
8187
8050
|
return this._env || this.setEnv("browser"), this.envContribution.updateDom(dom, params);
|
|
8188
8051
|
}
|
|
8189
|
-
getElementTop(dom) {
|
|
8190
|
-
let baseWindow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
8052
|
+
getElementTop(dom, baseWindow = !1) {
|
|
8191
8053
|
return this._env || this.setEnv("browser"), this.envContribution.getElementTop(dom, baseWindow);
|
|
8192
8054
|
}
|
|
8193
|
-
getElementLeft(dom) {
|
|
8194
|
-
let baseWindow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
8055
|
+
getElementLeft(dom, baseWindow = !1) {
|
|
8195
8056
|
return this._env || this.setEnv("browser"), this.envContribution.getElementLeft(dom, baseWindow);
|
|
8196
8057
|
}
|
|
8197
|
-
getElementTopLeft(dom) {
|
|
8198
|
-
let baseWindow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
8058
|
+
getElementTopLeft(dom, baseWindow = !1) {
|
|
8199
8059
|
return this._env || this.setEnv("browser"), this.envContribution.getElementTopLeft(dom, baseWindow);
|
|
8200
8060
|
}
|
|
8201
8061
|
isMacOS() {
|
|
@@ -8261,7 +8121,7 @@
|
|
|
8261
8121
|
clear() {
|
|
8262
8122
|
this.bounds.clear();
|
|
8263
8123
|
}
|
|
8264
|
-
release() {}
|
|
8124
|
+
release(...params) {}
|
|
8265
8125
|
}
|
|
8266
8126
|
|
|
8267
8127
|
class CurvePath {
|
|
@@ -8472,12 +8332,7 @@
|
|
|
8472
8332
|
};
|
|
8473
8333
|
|
|
8474
8334
|
const commandFuncs = [(command, context, x, y, sx, sy, z) => context.arc(command[1] * sx + x, command[2] * sy + y, command[3] * (sx + sy) / 2, command[4], command[5], command[6], z), (command, context, x, y, sx, sy, z) => context.arcTo(command[1] * sx + x, command[2] * sy + y, command[3] * sx + x, command[4] * sy + y, command[5] * (sx + sy) / 2, z), (command, context, x, y, sx, sy, z) => context.bezierCurveTo(command[1] * sx + x, command[2] * sy + y, command[3] * sx + x, command[4] * sy + y, command[5] * sx + x, command[6] * sy + y, z), (command, context, x, y) => context.closePath(), (command, context, x, y, sx, sy) => context.ellipse(command[1] * sx + x, command[2] * sy + y, command[3] * sx, command[4] * sy, command[5], command[6], command[7], command[8]), (command, context, x, y, sx, sy, z) => context.lineTo(command[1] * sx + x, command[2] * sy + y, z), (command, context, x, y, sx, sy, z) => context.moveTo(command[1] * sx + x, command[2] * sy + y, z), (command, context, x, y, sx, sy, z) => context.quadraticCurveTo(command[1] * sx + x, command[2] * sy + y, command[3] * sx + x, command[4] * sy + y, z), (command, context, x, y, sx, sy, z) => context.rect(command[1] * sx + x, command[2] * sy + y, command[3] * sx, command[4] * sy, z)];
|
|
8475
|
-
function renderCommandList(commandList, context) {
|
|
8476
|
-
let x = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
8477
|
-
let y = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
8478
|
-
let sx = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
|
|
8479
|
-
let sy = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
|
|
8480
|
-
let z = arguments.length > 6 ? arguments[6] : undefined;
|
|
8335
|
+
function renderCommandList(commandList, context, x = 0, y = 0, sx = 1, sy = 1, z) {
|
|
8481
8336
|
for (let i = 0; i < commandList.length; i++) {
|
|
8482
8337
|
const command = commandList[i];
|
|
8483
8338
|
commandFuncs[command[0]](command, context, x, y, sx, sy, z);
|
|
@@ -8767,7 +8622,7 @@
|
|
|
8767
8622
|
}
|
|
8768
8623
|
}
|
|
8769
8624
|
|
|
8770
|
-
function genCurveSegments(path, points) {
|
|
8625
|
+
function genCurveSegments(path, points, step = 1) {
|
|
8771
8626
|
let defined0 = !1;
|
|
8772
8627
|
for (let i = 0, n = points.length; i <= n; i++) i >= n === defined0 && ((defined0 = !defined0) ? path.lineStart() : path.lineEnd()), defined0 && path.point(points[i]);
|
|
8773
8628
|
}
|
|
@@ -8810,8 +8665,7 @@
|
|
|
8810
8665
|
return this.context.tryUpdateLength();
|
|
8811
8666
|
}
|
|
8812
8667
|
}
|
|
8813
|
-
function genLinearSegments(points) {
|
|
8814
|
-
let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
8668
|
+
function genLinearSegments(points, params = {}) {
|
|
8815
8669
|
const {
|
|
8816
8670
|
direction: direction,
|
|
8817
8671
|
startPoint: startPoint
|
|
@@ -8821,7 +8675,7 @@
|
|
|
8821
8675
|
return genLinearTypeSegments(new Linear(segContext, startPoint), points), segContext;
|
|
8822
8676
|
}
|
|
8823
8677
|
function genLinearTypeSegments(path, points) {
|
|
8824
|
-
return genCurveSegments(path, points);
|
|
8678
|
+
return genCurveSegments(path, points, 1);
|
|
8825
8679
|
}
|
|
8826
8680
|
|
|
8827
8681
|
function point$4(curveClass, x, y, defined, p) {
|
|
@@ -8864,10 +8718,9 @@
|
|
|
8864
8718
|
}
|
|
8865
8719
|
}
|
|
8866
8720
|
function genBasisTypeSegments(path, points) {
|
|
8867
|
-
return genCurveSegments(path, points);
|
|
8721
|
+
return genCurveSegments(path, points, 2);
|
|
8868
8722
|
}
|
|
8869
|
-
function genBasisSegments(points) {
|
|
8870
|
-
let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
8723
|
+
function genBasisSegments(points, params = {}) {
|
|
8871
8724
|
const {
|
|
8872
8725
|
direction: direction,
|
|
8873
8726
|
startPoint: startPoint
|
|
@@ -8960,10 +8813,9 @@
|
|
|
8960
8813
|
}
|
|
8961
8814
|
}
|
|
8962
8815
|
function genMonotoneXTypeSegments(path, points) {
|
|
8963
|
-
return genCurveSegments(path, points);
|
|
8816
|
+
return genCurveSegments(path, points, 2);
|
|
8964
8817
|
}
|
|
8965
|
-
function genMonotoneXSegments(points) {
|
|
8966
|
-
let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
8818
|
+
function genMonotoneXSegments(points, params = {}) {
|
|
8967
8819
|
const {
|
|
8968
8820
|
direction: direction,
|
|
8969
8821
|
startPoint: startPoint
|
|
@@ -8974,10 +8826,9 @@
|
|
|
8974
8826
|
return genMonotoneXTypeSegments(new MonotoneX(segContext, startPoint), points), segContext;
|
|
8975
8827
|
}
|
|
8976
8828
|
function genMonotoneYTypeSegments(path, points) {
|
|
8977
|
-
return genCurveSegments(path, points);
|
|
8829
|
+
return genCurveSegments(path, points, 2);
|
|
8978
8830
|
}
|
|
8979
|
-
function genMonotoneYSegments(points) {
|
|
8980
|
-
let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
8831
|
+
function genMonotoneYSegments(points, params = {}) {
|
|
8981
8832
|
const {
|
|
8982
8833
|
direction: direction,
|
|
8983
8834
|
startPoint: startPoint
|
|
@@ -8989,9 +8840,7 @@
|
|
|
8989
8840
|
}
|
|
8990
8841
|
|
|
8991
8842
|
let Step$1 = class Step {
|
|
8992
|
-
constructor(context) {
|
|
8993
|
-
let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
|
|
8994
|
-
let startPoint = arguments.length > 2 ? arguments[2] : undefined;
|
|
8843
|
+
constructor(context, t = .5, startPoint) {
|
|
8995
8844
|
this.context = context, this._t = t, this.startPoint = startPoint;
|
|
8996
8845
|
}
|
|
8997
8846
|
areaStart() {
|
|
@@ -9032,8 +8881,7 @@
|
|
|
9032
8881
|
this.context.closePath();
|
|
9033
8882
|
}
|
|
9034
8883
|
}
|
|
9035
|
-
function genStepSegments(points, t) {
|
|
9036
|
-
let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
8884
|
+
function genStepSegments(points, t, params = {}) {
|
|
9037
8885
|
const {
|
|
9038
8886
|
direction: direction,
|
|
9039
8887
|
startPoint: startPoint
|
|
@@ -9043,10 +8891,9 @@
|
|
|
9043
8891
|
return genStepTypeSegments(new Step$1(segContext, t, startPoint), points), segContext;
|
|
9044
8892
|
}
|
|
9045
8893
|
function genStepTypeSegments(path, points) {
|
|
9046
|
-
return genCurveSegments(path, points);
|
|
8894
|
+
return genCurveSegments(path, points, 1);
|
|
9047
8895
|
}
|
|
9048
|
-
function genStepClosedSegments(points, t) {
|
|
9049
|
-
let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
8896
|
+
function genStepClosedSegments(points, t, params = {}) {
|
|
9050
8897
|
const {
|
|
9051
8898
|
direction: direction,
|
|
9052
8899
|
startPoint: startPoint
|
|
@@ -9061,8 +8908,7 @@
|
|
|
9061
8908
|
this.context.closePath();
|
|
9062
8909
|
}
|
|
9063
8910
|
}
|
|
9064
|
-
function genLinearClosedSegments(points) {
|
|
9065
|
-
let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
8911
|
+
function genLinearClosedSegments(points, params = {}) {
|
|
9066
8912
|
const {
|
|
9067
8913
|
direction: direction,
|
|
9068
8914
|
startPoint: startPoint
|
|
@@ -9072,7 +8918,7 @@
|
|
|
9072
8918
|
return genLinearClosedTypeSegments(new LinearClosed(segContext, startPoint), points), segContext;
|
|
9073
8919
|
}
|
|
9074
8920
|
function genLinearClosedTypeSegments(path, points) {
|
|
9075
|
-
return genCurveSegments(path, points);
|
|
8921
|
+
return genCurveSegments(path, points, 1);
|
|
9076
8922
|
}
|
|
9077
8923
|
|
|
9078
8924
|
function point$2(curveClass, x, y, defined, p) {
|
|
@@ -9093,9 +8939,7 @@
|
|
|
9093
8939
|
curveClass.context.bezierCurveTo(x1, y1, x2, y2, curveClass._x2, curveClass._y2, defined, curveClass.lastPoint1);
|
|
9094
8940
|
}
|
|
9095
8941
|
class CatmullRom {
|
|
9096
|
-
constructor(context) {
|
|
9097
|
-
let alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
|
|
9098
|
-
let startPoint = arguments.length > 2 ? arguments[2] : undefined;
|
|
8942
|
+
constructor(context, alpha = .5, startPoint) {
|
|
9099
8943
|
this.context = context, this.startPoint = startPoint, this._alpha = alpha;
|
|
9100
8944
|
}
|
|
9101
8945
|
areaStart() {
|
|
@@ -9149,8 +8993,7 @@
|
|
|
9149
8993
|
}
|
|
9150
8994
|
}
|
|
9151
8995
|
function commonGenCatmullRomSegments(type, cons) {
|
|
9152
|
-
return function (points, alpha) {
|
|
9153
|
-
let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
8996
|
+
return function (points, alpha, params = {}) {
|
|
9154
8997
|
const {
|
|
9155
8998
|
direction: direction,
|
|
9156
8999
|
startPoint: startPoint
|
|
@@ -9159,15 +9002,13 @@
|
|
|
9159
9002
|
if (points.length < 3 - Number(!!startPoint)) return genLinearSegments(points, params);
|
|
9160
9003
|
const segContext = genSegContext(type, direction, points),
|
|
9161
9004
|
gatmullRom = new cons(segContext, alpha, startPoint);
|
|
9162
|
-
return genCurveSegments(gatmullRom, points), segContext;
|
|
9005
|
+
return genCurveSegments(gatmullRom, points, 2), segContext;
|
|
9163
9006
|
};
|
|
9164
9007
|
}
|
|
9165
9008
|
const genCatmullRomSegments = commonGenCatmullRomSegments("catmullRom", CatmullRom);
|
|
9166
9009
|
|
|
9167
9010
|
class CatmullRomClosed {
|
|
9168
|
-
constructor(context) {
|
|
9169
|
-
let alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
|
|
9170
|
-
let startPoint = arguments.length > 2 ? arguments[2] : undefined;
|
|
9011
|
+
constructor(context, alpha = .5, startPoint) {
|
|
9171
9012
|
this.context = context, this.startPoint = startPoint, this._alpha = alpha;
|
|
9172
9013
|
}
|
|
9173
9014
|
areaStart() {
|
|
@@ -9422,11 +9263,7 @@
|
|
|
9422
9263
|
cmd[1] = cmd[1] * sx + x, cmd[2] = cmd[2] * sy + y, cmd[3] = cmd[3] * (sx + sy) / 2;
|
|
9423
9264
|
}
|
|
9424
9265
|
closePathTransform() {}
|
|
9425
|
-
_runCommandStrList(commandStrList) {
|
|
9426
|
-
let l = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
9427
|
-
let t = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
9428
|
-
let sX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
9429
|
-
let sY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
|
|
9266
|
+
_runCommandStrList(commandStrList, l = 0, t = 0, sX = 1, sY = 1) {
|
|
9430
9267
|
let current,
|
|
9431
9268
|
tempX,
|
|
9432
9269
|
tempY,
|
|
@@ -9500,11 +9337,7 @@
|
|
|
9500
9337
|
previous = current;
|
|
9501
9338
|
}
|
|
9502
9339
|
}
|
|
9503
|
-
_runCommandList(commandList) {
|
|
9504
|
-
let l = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
9505
|
-
let t = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
9506
|
-
let sX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
9507
|
-
let sY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
|
|
9340
|
+
_runCommandList(commandList, l = 0, t = 0, sX = 1, sY = 1) {
|
|
9508
9341
|
if (0 !== l || 0 !== t || 1 !== sX || 1 !== sY) for (let i = 0, len = commandList.length; i < len; ++i) {
|
|
9509
9342
|
const current = commandList[i].slice();
|
|
9510
9343
|
switch (current[0]) {
|
|
@@ -10157,9 +9990,7 @@
|
|
|
10157
9990
|
scaleY = Math.sign(d) * Math.sqrt(c * c + d * d);
|
|
10158
9991
|
return scaleX + scaleY === 0 ? 0 : (strokeWidth = strokeWidth / Math.abs(scaleX + scaleY) * 2 * dpr, strokeWidth);
|
|
10159
9992
|
}
|
|
10160
|
-
function createColor(context, c, params) {
|
|
10161
|
-
let offsetX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
10162
|
-
let offsetY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
9993
|
+
function createColor(context, c, params, offsetX = 0, offsetY = 0) {
|
|
10163
9994
|
var _a, _b, _c, _d;
|
|
10164
9995
|
if (!c || !0 === c) return "black";
|
|
10165
9996
|
let result, color;
|
|
@@ -10298,8 +10129,7 @@
|
|
|
10298
10129
|
}
|
|
10299
10130
|
return needTestLetter && (index = testLetter(desc, index)), index;
|
|
10300
10131
|
}
|
|
10301
|
-
function testLetter(string, index) {
|
|
10302
|
-
let negativeWrongMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
10132
|
+
function testLetter(string, index, negativeWrongMatch = !1) {
|
|
10303
10133
|
let i = index;
|
|
10304
10134
|
for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i--, i <= 0) return negativeWrongMatch ? testLetter2(string, index) : index;
|
|
10305
10135
|
return i;
|
|
@@ -10309,8 +10139,7 @@
|
|
|
10309
10139
|
for (; regLetter.test(string[i + 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i++, i >= string.length) return i;
|
|
10310
10140
|
return i + 1;
|
|
10311
10141
|
}
|
|
10312
|
-
function measureTextCanvas(text, character) {
|
|
10313
|
-
let mode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "actual";
|
|
10142
|
+
function measureTextCanvas(text, character, mode = "actual") {
|
|
10314
10143
|
var _a;
|
|
10315
10144
|
if ("" === text) return {
|
|
10316
10145
|
ascent: 0,
|
|
@@ -10380,10 +10209,9 @@
|
|
|
10380
10209
|
}
|
|
10381
10210
|
return metrics;
|
|
10382
10211
|
}
|
|
10383
|
-
estimate(text,
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
} = _ref;
|
|
10212
|
+
estimate(text, {
|
|
10213
|
+
fontSize = DefaultTextAttribute.fontSize
|
|
10214
|
+
}) {
|
|
10387
10215
|
let eCharLen = 0,
|
|
10388
10216
|
cCharLen = 0;
|
|
10389
10217
|
for (let i = 0; i < text.length; i++) text.charCodeAt(i) < 128 ? eCharLen++ : cCharLen++;
|
|
@@ -10694,8 +10522,7 @@
|
|
|
10694
10522
|
});
|
|
10695
10523
|
});
|
|
10696
10524
|
}
|
|
10697
|
-
clipTextWithSuffix(text, options, width, suffix, wordBreak, position) {
|
|
10698
|
-
let forceSuffix = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !1;
|
|
10525
|
+
clipTextWithSuffix(text, options, width, suffix, wordBreak, position, forceSuffix = !1) {
|
|
10699
10526
|
if ("" === suffix) return this.clipText(text, options, width, wordBreak);
|
|
10700
10527
|
if (0 === text.length) return {
|
|
10701
10528
|
str: "",
|
|
@@ -11140,7 +10967,7 @@
|
|
|
11140
10967
|
get length() {
|
|
11141
10968
|
return this.pools.length;
|
|
11142
10969
|
}
|
|
11143
|
-
release() {
|
|
10970
|
+
release(...params) {
|
|
11144
10971
|
this.pools = [];
|
|
11145
10972
|
}
|
|
11146
10973
|
}
|
|
@@ -11336,8 +11163,7 @@
|
|
|
11336
11163
|
bindTextMeasure(tm) {
|
|
11337
11164
|
this._textMeasure = tm;
|
|
11338
11165
|
}
|
|
11339
|
-
measureText(text, tc) {
|
|
11340
|
-
let method = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "native";
|
|
11166
|
+
measureText(text, tc, method = "native") {
|
|
11341
11167
|
var _a;
|
|
11342
11168
|
this.configure(this.global, this.global.env);
|
|
11343
11169
|
const m = this.global.measureTextMethod;
|
|
@@ -11520,8 +11346,7 @@
|
|
|
11520
11346
|
for (; group.parent;) if ((group = group.parent).theme) return group;
|
|
11521
11347
|
return null;
|
|
11522
11348
|
}
|
|
11523
|
-
applyTheme(group, pt) {
|
|
11524
|
-
let force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
11349
|
+
applyTheme(group, pt, force = !1) {
|
|
11525
11350
|
if (this.dirty) {
|
|
11526
11351
|
const parentGroup = this.getParentWithTheme(group);
|
|
11527
11352
|
if (parentGroup) {
|
|
@@ -11620,8 +11445,7 @@
|
|
|
11620
11445
|
constructor() {
|
|
11621
11446
|
super(), this._uid = Generator.GenAutoIncrementId(), this._firstChild = null, this._lastChild = null, this.parent = null, this._count = 1;
|
|
11622
11447
|
}
|
|
11623
|
-
forEachChildren(cb) {
|
|
11624
|
-
let reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
11448
|
+
forEachChildren(cb, reverse = !1) {
|
|
11625
11449
|
if (reverse) {
|
|
11626
11450
|
let child = this._lastChild,
|
|
11627
11451
|
i = 0;
|
|
@@ -11638,8 +11462,7 @@
|
|
|
11638
11462
|
}
|
|
11639
11463
|
}
|
|
11640
11464
|
}
|
|
11641
|
-
forEachChildrenAsync(cb) {
|
|
11642
|
-
let reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
11465
|
+
forEachChildrenAsync(cb, reverse = !1) {
|
|
11643
11466
|
return __awaiter$8(this, void 0, void 0, function* () {
|
|
11644
11467
|
if (reverse) {
|
|
11645
11468
|
let child = this._lastChild,
|
|
@@ -11663,13 +11486,12 @@
|
|
|
11663
11486
|
forEach(cb) {
|
|
11664
11487
|
return this.forEachChildren(cb);
|
|
11665
11488
|
}
|
|
11666
|
-
appendChild(node) {
|
|
11667
|
-
let highPerformance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
11489
|
+
appendChild(node, highPerformance = !0) {
|
|
11668
11490
|
if (this._uid === node._uid) return null;
|
|
11669
11491
|
if (!highPerformance && node.isAncestorsOf(this)) throw new Error("【Node::appendChild】不能将父辈元素append为子元素");
|
|
11670
11492
|
return node.parent && node.parent.removeChild(node), node.parent = this, this._lastChild ? (this._lastChild._next = node, node._prev = this._lastChild, this._lastChild = node) : (this._firstChild = this._lastChild = node, node._prev = node._next = null), this._idMap || (this._idMap = new Map()), this._idMap.set(node._uid, node), this.setCount(node.count), this._structEdit = !0, node;
|
|
11671
11493
|
}
|
|
11672
|
-
appendChildArrHighPerformance(nodes) {
|
|
11494
|
+
appendChildArrHighPerformance(nodes, replace = !1) {
|
|
11673
11495
|
return console.error("暂不支持该函数"), nodes;
|
|
11674
11496
|
}
|
|
11675
11497
|
insertBefore(newNode, referenceNode) {
|
|
@@ -11737,8 +11559,7 @@
|
|
|
11737
11559
|
replaceChild(newChild, oldChild) {
|
|
11738
11560
|
throw new Error("暂不支持");
|
|
11739
11561
|
}
|
|
11740
|
-
find(callback) {
|
|
11741
|
-
let deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
11562
|
+
find(callback, deep = !1) {
|
|
11742
11563
|
let target = null;
|
|
11743
11564
|
return this.forEachChildren((node, index) => !(node === this || !callback(node, index)) && (target = node, !0)), deep && this.forEachChildren(child => {
|
|
11744
11565
|
if (child.isContainer) {
|
|
@@ -11748,8 +11569,7 @@
|
|
|
11748
11569
|
return !1;
|
|
11749
11570
|
}), target;
|
|
11750
11571
|
}
|
|
11751
|
-
findAll(callback) {
|
|
11752
|
-
let deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
11572
|
+
findAll(callback, deep = !1) {
|
|
11753
11573
|
let nodes = [];
|
|
11754
11574
|
return this.forEachChildren((node, index) => {
|
|
11755
11575
|
node !== this && callback(node, index) && nodes.push(node);
|
|
@@ -11778,8 +11598,7 @@
|
|
|
11778
11598
|
getElementsByType(type) {
|
|
11779
11599
|
return this.findAll(node => node.type === type, !0);
|
|
11780
11600
|
}
|
|
11781
|
-
getChildByName(name) {
|
|
11782
|
-
let deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
11601
|
+
getChildByName(name, deep = !1) {
|
|
11783
11602
|
return this.find(node => node.name === name, deep);
|
|
11784
11603
|
}
|
|
11785
11604
|
getChildAt(idx) {
|
|
@@ -11898,10 +11717,7 @@
|
|
|
11898
11717
|
removeAllListeners() {
|
|
11899
11718
|
return this.removeAllEventListeners();
|
|
11900
11719
|
}
|
|
11901
|
-
dispatchEvent(event) {
|
|
11902
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
11903
|
-
args[_key - 1] = arguments[_key];
|
|
11904
|
-
}
|
|
11720
|
+
dispatchEvent(event, ...args) {
|
|
11905
11721
|
return super.emit(event.type, event, ...args), !event.defaultPrevented;
|
|
11906
11722
|
}
|
|
11907
11723
|
emit(event, data) {
|
|
@@ -12600,8 +12416,7 @@
|
|
|
12600
12416
|
get mode() {
|
|
12601
12417
|
return this._mode;
|
|
12602
12418
|
}
|
|
12603
|
-
constructor() {
|
|
12604
|
-
let timelines = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
12419
|
+
constructor(timelines = []) {
|
|
12605
12420
|
super(), this.handleTick = (handler, params) => {
|
|
12606
12421
|
const {
|
|
12607
12422
|
once = !1
|
|
@@ -12697,8 +12512,7 @@
|
|
|
12697
12512
|
}
|
|
12698
12513
|
return !1;
|
|
12699
12514
|
}
|
|
12700
|
-
start() {
|
|
12701
|
-
let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
12515
|
+
start(force = !1) {
|
|
12702
12516
|
if (this.status === STATUS$1.RUNNING) return !1;
|
|
12703
12517
|
if (!this.tickerHandler) return !1;
|
|
12704
12518
|
if (!force) {
|
|
@@ -12916,8 +12730,7 @@
|
|
|
12916
12730
|
for (; animate;) animate.release(), animate = animate.nextAnimate;
|
|
12917
12731
|
this.animateHead = null, this.animateTail = null, this.animateCount = 0;
|
|
12918
12732
|
}
|
|
12919
|
-
removeAnimate(animate) {
|
|
12920
|
-
let release = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
12733
|
+
removeAnimate(animate, release = !0) {
|
|
12921
12734
|
animate._onRemove && animate._onRemove.forEach(cb => cb()), animate === this.animateHead ? (this.animateHead = animate.nextAnimate, animate === this.animateTail ? this.animateTail = null : this.animateHead.prevAnimate = null) : animate === this.animateTail ? (this.animateTail = animate.prevAnimate, this.animateTail.nextAnimate = null) : (animate.prevAnimate.nextAnimate = animate.nextAnimate, animate.nextAnimate.prevAnimate = animate.prevAnimate), release && animate.release();
|
|
12922
12735
|
}
|
|
12923
12736
|
}
|
|
@@ -12966,10 +12779,7 @@
|
|
|
12966
12779
|
}
|
|
12967
12780
|
}
|
|
12968
12781
|
let Animate$1 = class Animate {
|
|
12969
|
-
constructor() {
|
|
12970
|
-
let id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Generator.GenAutoIncrementId();
|
|
12971
|
-
let timeline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultTimeline;
|
|
12972
|
-
let slience = arguments.length > 2 ? arguments[2] : undefined;
|
|
12782
|
+
constructor(id = Generator.GenAutoIncrementId(), timeline = defaultTimeline, slience) {
|
|
12973
12783
|
this.id = id, this.timeline = timeline || defaultTimeline, this.status = AnimateStatus.INITIAL, this.tailAnimate = new SubAnimate(this), this.subAnimates = [this.tailAnimate], this.timeScale = 1, this.rawPosition = -1, this._startTime = 0, this._duringTime = 0, this.timeline.addAnimate(this), this.slience = slience;
|
|
12974
12784
|
}
|
|
12975
12785
|
setTimeline(timeline) {
|
|
@@ -13004,8 +12814,7 @@
|
|
|
13004
12814
|
}
|
|
13005
12815
|
return 1 === this.subAnimates.length && this.tailAnimate.totalDuration === customAnimate.duration && this.trySetAttribute(customAnimate.getFromProps(), customAnimate.mode), this;
|
|
13006
12816
|
}
|
|
13007
|
-
trySetAttribute(attr) {
|
|
13008
|
-
let mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Animate.mode;
|
|
12817
|
+
trySetAttribute(attr, mode = Animate.mode) {
|
|
13009
12818
|
attr && mode & AnimateMode.SET_ATTR_IMMEDIATELY && this.target.setAttributes && this.target.setAttributes(attr, !1, {
|
|
13010
12819
|
type: AttributeUpdateType.ANIMATE_PLAY
|
|
13011
12820
|
});
|
|
@@ -13399,8 +13208,7 @@
|
|
|
13399
13208
|
return attr[key];
|
|
13400
13209
|
}
|
|
13401
13210
|
class RafBasedSTO {
|
|
13402
|
-
constructor() {
|
|
13403
|
-
let timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : RafBasedSTO.TimeOut;
|
|
13211
|
+
constructor(timeout = RafBasedSTO.TimeOut) {
|
|
13404
13212
|
this.durations = [], this.timeout = timeout, this.lastDate = 0, this.durationsListThreshold = 30;
|
|
13405
13213
|
}
|
|
13406
13214
|
call(cb) {
|
|
@@ -13667,8 +13475,7 @@
|
|
|
13667
13475
|
var _a, _b;
|
|
13668
13476
|
super(from, to, duration, easing, params), this.newPointAnimateType = null !== (_a = null == params ? void 0 : params.newPointAnimateType) && void 0 !== _a ? _a : "grow", this.clipRangeByDimension = null !== (_b = null == params ? void 0 : params.clipRangeByDimension) && void 0 !== _b ? _b : "x";
|
|
13669
13477
|
}
|
|
13670
|
-
getPoints(attribute) {
|
|
13671
|
-
let cache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
13478
|
+
getPoints(attribute, cache = !1) {
|
|
13672
13479
|
if (attribute.points) return attribute.points;
|
|
13673
13480
|
if (attribute.segments) {
|
|
13674
13481
|
const points = [];
|
|
@@ -14550,9 +14357,7 @@
|
|
|
14550
14357
|
ColorType[ColorType.Color255 = 0] = "Color255", ColorType[ColorType.Color1 = 1] = "Color1";
|
|
14551
14358
|
}(ColorType || (ColorType = {}));
|
|
14552
14359
|
class ColorStore {
|
|
14553
|
-
static Get(str) {
|
|
14554
|
-
let size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ColorType.Color1;
|
|
14555
|
-
let arr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [0, 0, 0, 1];
|
|
14360
|
+
static Get(str, size = ColorType.Color1, arr = [0, 0, 0, 1]) {
|
|
14556
14361
|
if (size === ColorType.Color1) {
|
|
14557
14362
|
const color = ColorStore.store1[str];
|
|
14558
14363
|
if (color) return arr[0] = color[0], arr[1] = color[1], arr[2] = color[2], arr[3] = color[3], arr;
|
|
@@ -14580,8 +14385,7 @@
|
|
|
14580
14385
|
}
|
|
14581
14386
|
ColorStore.store255 = {}, ColorStore.store1 = {};
|
|
14582
14387
|
|
|
14583
|
-
function colorArrayToString(color) {
|
|
14584
|
-
let alphaChannel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
14388
|
+
function colorArrayToString(color, alphaChannel = !1) {
|
|
14585
14389
|
return Array.isArray(color) && isNumber$1(color[0]) ? alphaChannel ? `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])},${color[3].toFixed(2)})` : `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])})` : color;
|
|
14586
14390
|
}
|
|
14587
14391
|
function interpolateColor(from, to, ratio, alphaChannel, cb) {
|
|
@@ -15198,8 +15002,7 @@
|
|
|
15198
15002
|
}
|
|
15199
15003
|
var square$3 = new SquareSymbol();
|
|
15200
15004
|
|
|
15201
|
-
function trianglUpOffset(ctx, r, x, y) {
|
|
15202
|
-
let offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
15005
|
+
function trianglUpOffset(ctx, r, x, y, offset = 0) {
|
|
15203
15006
|
return ctx.moveTo(x + r + 2 * offset, r + y + offset), ctx.lineTo(x - r - 2 * offset, r + y + offset), ctx.lineTo(x, y - r - 2 * offset), ctx.closePath(), !0;
|
|
15204
15007
|
}
|
|
15205
15008
|
class TriangleUpSymbol extends BaseSymbol {
|
|
@@ -15345,8 +15148,7 @@
|
|
|
15345
15148
|
}
|
|
15346
15149
|
var triangleLeft = new TriangleLeftSymbol();
|
|
15347
15150
|
|
|
15348
|
-
function trianglRightOffset(ctx, r, x, y) {
|
|
15349
|
-
let offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
15151
|
+
function trianglRightOffset(ctx, r, x, y, offset = 0) {
|
|
15350
15152
|
return ctx.moveTo(x - r - offset, r + y + 2 * offset), ctx.lineTo(r + x + 2 * offset, y), ctx.lineTo(x - r - offset, y - r - 2 * offset), ctx.closePath(), !0;
|
|
15351
15153
|
}
|
|
15352
15154
|
class TriangleRightSymbol extends BaseSymbol {
|
|
@@ -15362,8 +15164,7 @@
|
|
|
15362
15164
|
}
|
|
15363
15165
|
var triangleRight = new TriangleRightSymbol();
|
|
15364
15166
|
|
|
15365
|
-
function trianglDownOffset(ctx, r, x, y) {
|
|
15366
|
-
let offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
15167
|
+
function trianglDownOffset(ctx, r, x, y, offset = 0) {
|
|
15367
15168
|
return ctx.moveTo(x - r - 2 * offset, y - r - offset), ctx.lineTo(x + r + 2 * offset, y - r - offset), ctx.lineTo(x, y + r + 2 * offset), ctx.closePath(), !0;
|
|
15368
15169
|
}
|
|
15369
15170
|
class TriangleDownSymbol extends BaseSymbol {
|
|
@@ -15580,8 +15381,7 @@
|
|
|
15580
15381
|
|
|
15581
15382
|
const tempBounds = new AABBBounds();
|
|
15582
15383
|
class CustomSymbolClass {
|
|
15583
|
-
constructor(type, path) {
|
|
15584
|
-
let isSvg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
15384
|
+
constructor(type, path, isSvg = !1) {
|
|
15585
15385
|
this.pathStr = "", this.type = type, isArray$1(path) ? this.svgCache = path : this.path = path, this.isSvg = isSvg;
|
|
15586
15386
|
}
|
|
15587
15387
|
drawOffset(ctx, size, x, y, offset, z, cb) {
|
|
@@ -15603,10 +15403,9 @@
|
|
|
15603
15403
|
bounds(size, bounds) {
|
|
15604
15404
|
if (size = this.parseSize(size), this.isSvg) {
|
|
15605
15405
|
if (!this.svgCache) return;
|
|
15606
|
-
return bounds.clear(), void this.svgCache.forEach(
|
|
15607
|
-
|
|
15608
|
-
|
|
15609
|
-
} = _ref;
|
|
15406
|
+
return bounds.clear(), void this.svgCache.forEach(({
|
|
15407
|
+
path: path
|
|
15408
|
+
}) => {
|
|
15610
15409
|
tempBounds.x1 = path.bounds.x1 * size, tempBounds.y1 = path.bounds.y1 * size, tempBounds.x2 = path.bounds.x2 * size, tempBounds.y2 = path.bounds.y2 * size, bounds.union(tempBounds);
|
|
15611
15410
|
});
|
|
15612
15411
|
}
|
|
@@ -15662,8 +15461,7 @@
|
|
|
15662
15461
|
if (-1 === closingIndex) throw new Error(errMsg);
|
|
15663
15462
|
return closingIndex + str.length - 1;
|
|
15664
15463
|
}
|
|
15665
|
-
function tagExpWithClosingIndex(xmlData, i) {
|
|
15666
|
-
let closingChar = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ">";
|
|
15464
|
+
function tagExpWithClosingIndex(xmlData, i, closingChar = ">") {
|
|
15667
15465
|
let attrBoundary,
|
|
15668
15466
|
tagExp = "";
|
|
15669
15467
|
for (let index = i; index < xmlData.length; index++) {
|
|
@@ -15681,8 +15479,7 @@
|
|
|
15681
15479
|
tagExp += ch;
|
|
15682
15480
|
}
|
|
15683
15481
|
}
|
|
15684
|
-
function readTagExp(xmlData, i, removeNSPrefix) {
|
|
15685
|
-
let closingChar = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ">";
|
|
15482
|
+
function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") {
|
|
15686
15483
|
const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar);
|
|
15687
15484
|
if (!result) return;
|
|
15688
15485
|
let tagExp = result.data;
|
|
@@ -15863,8 +15660,7 @@
|
|
|
15863
15660
|
}), yield Promise.all(promiseList);
|
|
15864
15661
|
});
|
|
15865
15662
|
}
|
|
15866
|
-
function boundStroke(bounds, halfW, miter) {
|
|
15867
|
-
let pad = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
15663
|
+
function boundStroke(bounds, halfW, miter, pad = 0) {
|
|
15868
15664
|
return bounds.expand(halfW + (pad / 2 + (miter ? miterAdjustment(miter, halfW) : 0))), bounds;
|
|
15869
15665
|
}
|
|
15870
15666
|
function miterAdjustment(miter, strokeWidth) {
|
|
@@ -16000,8 +15796,7 @@
|
|
|
16000
15796
|
get globalTransMatrix() {
|
|
16001
15797
|
return this.tryUpdateGlobalTransMatrix(!0);
|
|
16002
15798
|
}
|
|
16003
|
-
constructor() {
|
|
16004
|
-
let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
15799
|
+
constructor(params = {}) {
|
|
16005
15800
|
var _a;
|
|
16006
15801
|
super(), this._AABBBounds = new AABBBounds(), this._updateTag = UpdateTag.INIT, this.attribute = params, this.valid = this.isValid(), this.updateAABBBoundsStamp = 0, params.background ? this.loadImage(null !== (_a = params.background.background) && void 0 !== _a ? _a : params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic);
|
|
16007
15802
|
}
|
|
@@ -16014,8 +15809,7 @@
|
|
|
16014
15809
|
set2dMode() {
|
|
16015
15810
|
this.in3dMode = !1;
|
|
16016
15811
|
}
|
|
16017
|
-
getOffsetXY(attr) {
|
|
16018
|
-
let includeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
15812
|
+
getOffsetXY(attr, includeScroll = !1) {
|
|
16019
15813
|
var _a, _b;
|
|
16020
15814
|
const {
|
|
16021
15815
|
dx = attr.dx,
|
|
@@ -16044,10 +15838,9 @@
|
|
|
16044
15838
|
return this.doUpdateOBBBounds();
|
|
16045
15839
|
}
|
|
16046
15840
|
combindShadowAABBBounds(bounds) {
|
|
16047
|
-
if (this.shadowRoot)
|
|
16048
|
-
|
|
16049
|
-
|
|
16050
|
-
}
|
|
15841
|
+
if (!this.shadowRoot) return;
|
|
15842
|
+
const b = this.shadowRoot.AABBBounds.clone();
|
|
15843
|
+
bounds.union(b);
|
|
16051
15844
|
}
|
|
16052
15845
|
doUpdateOBBBounds() {
|
|
16053
15846
|
return this._OBBBounds;
|
|
@@ -16126,7 +15919,7 @@
|
|
|
16126
15919
|
const b = this.AABBBounds;
|
|
16127
15920
|
return this._globalAABBBounds ? this._globalAABBBounds.setValue(b.x1, b.y1, b.x2, b.y2) : this._globalAABBBounds = b.clone(), this._globalAABBBounds.empty() || this.parent && this._globalAABBBounds.transformWithMatrix(this.parent.globalTransMatrix), this._globalAABBBounds;
|
|
16128
15921
|
}
|
|
16129
|
-
tryUpdateGlobalTransMatrix() {
|
|
15922
|
+
tryUpdateGlobalTransMatrix(clearTag = !0) {
|
|
16130
15923
|
if (this._globalTransMatrix) {
|
|
16131
15924
|
if (this.parent) {
|
|
16132
15925
|
const m = this.parent.globalTransMatrix;
|
|
@@ -16138,8 +15931,7 @@
|
|
|
16138
15931
|
shouldUpdateGlobalMatrix() {
|
|
16139
15932
|
return !0;
|
|
16140
15933
|
}
|
|
16141
|
-
tryUpdateLocalTransMatrix() {
|
|
16142
|
-
let clearTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
15934
|
+
tryUpdateLocalTransMatrix(clearTag = !0) {
|
|
16143
15935
|
return this._transMatrix || (this._transMatrix = new Matrix()), this.shouldUpdateLocalMatrix() && (this.doUpdateLocalMatrix(), clearTag && this.clearUpdateLocalPositionTag()), this._transMatrix;
|
|
16144
15936
|
}
|
|
16145
15937
|
shouldUpdateAABBBounds() {
|
|
@@ -16179,14 +15971,10 @@
|
|
|
16179
15971
|
setWidthHeightWithoutTransform(aabbBounds) {
|
|
16180
15972
|
this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1, this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1;
|
|
16181
15973
|
}
|
|
16182
|
-
setAttributes(params) {
|
|
16183
|
-
let forceUpdateTag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
16184
|
-
let context = arguments.length > 2 ? arguments[2] : undefined;
|
|
15974
|
+
setAttributes(params, forceUpdateTag = !1, context) {
|
|
16185
15975
|
(params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background ? this.loadImage(params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic), this._setAttributes(params, forceUpdateTag, context);
|
|
16186
15976
|
}
|
|
16187
|
-
_setAttributes(params) {
|
|
16188
|
-
let forceUpdateTag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
16189
|
-
let context = arguments.length > 2 ? arguments[2] : undefined;
|
|
15977
|
+
_setAttributes(params, forceUpdateTag = !1, context) {
|
|
16190
15978
|
const keys = Object.keys(params);
|
|
16191
15979
|
for (let i = 0; i < keys.length; i++) {
|
|
16192
15980
|
const key = keys[i];
|
|
@@ -16201,16 +15989,14 @@
|
|
|
16201
15989
|
}, this.attribute, key, context);
|
|
16202
15990
|
params ? this._setAttributes(params, forceUpdateTag, context) : isNil$1(null === (_a = this.normalAttrs) || void 0 === _a ? void 0 : _a[key]) ? (this.attribute[key] = value, this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTag(key) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.addUpdateLayoutTag(), this.onAttributeUpdate(context)) : this.normalAttrs[key] = value, "background" === key ? this.loadImage(value, !0) : "shadowGraphic" === key && this.setShadowGraphic(value);
|
|
16203
15991
|
}
|
|
16204
|
-
needUpdateTags(keys) {
|
|
16205
|
-
let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : GRAPHIC_UPDATE_TAG_KEY;
|
|
15992
|
+
needUpdateTags(keys, k = GRAPHIC_UPDATE_TAG_KEY) {
|
|
16206
15993
|
for (let i = 0; i < k.length; i++) {
|
|
16207
15994
|
const attrKey = k[i];
|
|
16208
15995
|
if (-1 !== keys.indexOf(attrKey)) return !0;
|
|
16209
15996
|
}
|
|
16210
15997
|
return !1;
|
|
16211
15998
|
}
|
|
16212
|
-
needUpdateTag(key) {
|
|
16213
|
-
let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : GRAPHIC_UPDATE_TAG_KEY;
|
|
15999
|
+
needUpdateTag(key, k = GRAPHIC_UPDATE_TAG_KEY) {
|
|
16214
16000
|
for (let i = 0; i < k.length; i++) {
|
|
16215
16001
|
if (key === k[i]) return !0;
|
|
16216
16002
|
}
|
|
@@ -16374,8 +16160,7 @@
|
|
|
16374
16160
|
newNormalAttrs[key] = this.getNormalAttribute(key);
|
|
16375
16161
|
}), this.normalAttrs = newNormalAttrs;
|
|
16376
16162
|
}
|
|
16377
|
-
stopStateAnimates() {
|
|
16378
|
-
let type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "end";
|
|
16163
|
+
stopStateAnimates(type = "end") {
|
|
16379
16164
|
this.animates && this.animates.forEach(animate => {
|
|
16380
16165
|
animate.stateNames && (animate.stop(type), this.animates.delete(animate.id));
|
|
16381
16166
|
});
|
|
@@ -16617,8 +16402,7 @@
|
|
|
16617
16402
|
var _a;
|
|
16618
16403
|
return null !== (_a = this.attribute[name]) && void 0 !== _a ? _a : this.getDefaultAttribute(name);
|
|
16619
16404
|
}
|
|
16620
|
-
onSetStage(cb) {
|
|
16621
|
-
let immediate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
16405
|
+
onSetStage(cb, immediate = !1) {
|
|
16622
16406
|
this._onSetStage = cb, immediate && this.stage && cb(this, this.stage);
|
|
16623
16407
|
}
|
|
16624
16408
|
attachShadow(shadowRoot) {
|
|
@@ -16639,8 +16423,7 @@
|
|
|
16639
16423
|
createPathProxy(path) {
|
|
16640
16424
|
return isString$1(path, !0) ? this.pathProxy = new CustomPath2D().fromString(path) : this.pathProxy = new CustomPath2D(), this.pathProxy;
|
|
16641
16425
|
}
|
|
16642
|
-
loadImage(image) {
|
|
16643
|
-
let background = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
16426
|
+
loadImage(image, background = !1) {
|
|
16644
16427
|
if (!image || background && backgroundNotImage(image)) return;
|
|
16645
16428
|
const url = image;
|
|
16646
16429
|
this.resources || (this.resources = new Map());
|
|
@@ -16670,8 +16453,7 @@
|
|
|
16670
16453
|
animate.stop();
|
|
16671
16454
|
});
|
|
16672
16455
|
}
|
|
16673
|
-
stopAnimates() {
|
|
16674
|
-
let stopChildren = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
16456
|
+
stopAnimates(stopChildren = !1) {
|
|
16675
16457
|
this._stopAnimates(this.animates), this.shadowRoot && this.shadowRoot.stopAnimates(!0), this.isContainer && stopChildren && this.forEachChildren(c => {
|
|
16676
16458
|
c.stopAnimates(stopChildren);
|
|
16677
16459
|
});
|
|
@@ -16810,8 +16592,7 @@
|
|
|
16810
16592
|
_updateChildToStage(child) {
|
|
16811
16593
|
return this.stage && child && child.setStage(this.stage, this.layer), this.addUpdateBoundTag(), child;
|
|
16812
16594
|
}
|
|
16813
|
-
appendChild(node) {
|
|
16814
|
-
let addStage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
16595
|
+
appendChild(node, addStage = !0) {
|
|
16815
16596
|
const data = super.appendChild(node);
|
|
16816
16597
|
return addStage && this.stage && data && data.setStage(this.stage, this.layer), this.addUpdateBoundTag(), data;
|
|
16817
16598
|
}
|
|
@@ -16828,8 +16609,7 @@
|
|
|
16828
16609
|
const data = super.removeChild(child);
|
|
16829
16610
|
return child.stage = null, application.graphicService.onRemove(child), this.addUpdateBoundTag(), data;
|
|
16830
16611
|
}
|
|
16831
|
-
removeAllChild() {
|
|
16832
|
-
let deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
16612
|
+
removeAllChild(deep = !1) {
|
|
16833
16613
|
this.forEachChildren(child => {
|
|
16834
16614
|
application.graphicService.onRemove(child), deep && child.isContainer && child.removeAllChild(deep);
|
|
16835
16615
|
}), super.removeAllChild(), this.addUpdateBoundTag();
|
|
@@ -16849,8 +16629,7 @@
|
|
|
16849
16629
|
g.isContainer && g.addUpdateGlobalPositionTag();
|
|
16850
16630
|
});
|
|
16851
16631
|
}
|
|
16852
|
-
tryUpdateGlobalTransMatrix() {
|
|
16853
|
-
let clearTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
16632
|
+
tryUpdateGlobalTransMatrix(clearTag = !0) {
|
|
16854
16633
|
if (this.shouldUpdateGlobalMatrix()) {
|
|
16855
16634
|
if (this._globalTransMatrix) {
|
|
16856
16635
|
if (this.parent) {
|
|
@@ -16924,8 +16703,7 @@
|
|
|
16924
16703
|
zIndex: null !== (_a = params.zIndex) && void 0 !== _a ? _a : 0
|
|
16925
16704
|
}), this.layer = this, this.subLayers = new Map(), this.theme = new Theme(), this.background = "rgba(0, 0, 0, 0)", this.afterDrawCbs = [];
|
|
16926
16705
|
}
|
|
16927
|
-
combineSubLayer() {
|
|
16928
|
-
let removeIncrementalKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
16706
|
+
combineSubLayer(removeIncrementalKey = !0) {
|
|
16929
16707
|
const subLayers = Array.from(this.subLayers.values()).sort((a, b) => a.zIndex - b.zIndex);
|
|
16930
16708
|
this.layerHandler.merge(subLayers.map(l => (l.layer.subLayers.size && l.layer.combineSubLayer(removeIncrementalKey), l.layer.getNativeHandler()))), removeIncrementalKey && subLayers.forEach(l => {
|
|
16931
16709
|
l.group && (l.group.incremental = 0);
|
|
@@ -17034,10 +16812,9 @@
|
|
|
17034
16812
|
let layerHandler;
|
|
17035
16813
|
return layerHandler = "static" === layerMode ? container.get(StaticLayerHandlerContribution) : "dynamic" === layerMode ? container.get(DynamicLayerHandlerContribution) : container.get(VirtualLayerHandlerContribution), layerHandler;
|
|
17036
16814
|
}
|
|
17037
|
-
createLayer(stage
|
|
17038
|
-
|
|
17039
|
-
|
|
17040
|
-
};
|
|
16815
|
+
createLayer(stage, options = {
|
|
16816
|
+
main: !1
|
|
16817
|
+
}) {
|
|
17041
16818
|
var _a;
|
|
17042
16819
|
this.tryInit();
|
|
17043
16820
|
let layerMode = this.getRecommendedLayerType(options.layerMode);
|
|
@@ -17283,9 +17060,7 @@
|
|
|
17283
17060
|
static getInstance() {
|
|
17284
17061
|
return ColorInterpolate._instance || (ColorInterpolate._instance = new ColorInterpolate()), ColorInterpolate._instance;
|
|
17285
17062
|
}
|
|
17286
|
-
constructor() {
|
|
17287
|
-
let stops = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
17288
|
-
let precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
|
|
17063
|
+
constructor(stops = [], precision = 100) {
|
|
17289
17064
|
super(), this.cacheParams = {
|
|
17290
17065
|
CLEAN_THRESHOLD: 100,
|
|
17291
17066
|
L_TIME: 1e3
|
|
@@ -17303,9 +17078,7 @@
|
|
|
17303
17078
|
const rgba = this.rgbaSet.slice(4 * offset, 4 * offset + 4);
|
|
17304
17079
|
return `rgba(${rgba[0]}, ${rgba[1]}, ${rgba[2]}, ${rgba[3] / 255})`;
|
|
17305
17080
|
}
|
|
17306
|
-
GetOrCreate(x, y, w, h) {
|
|
17307
|
-
let stops = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
|
|
17308
|
-
let precision = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 100;
|
|
17081
|
+
GetOrCreate(x, y, w, h, stops = [], precision = 100) {
|
|
17309
17082
|
let str = `${x}${y}${w}${h}`;
|
|
17310
17083
|
stops.forEach(item => str += item.join()), str += precision;
|
|
17311
17084
|
let colorInter = this.dataMap.get(str);
|
|
@@ -17404,8 +17177,7 @@
|
|
|
17404
17177
|
function textDrawOffsetX(textAlign, width) {
|
|
17405
17178
|
return "end" === textAlign || "right" === textAlign ? -width : "center" === textAlign ? -width / 2 : 0;
|
|
17406
17179
|
}
|
|
17407
|
-
function textLayoutOffsetY(baseline, lineHeight, fontSize) {
|
|
17408
|
-
let buf = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
17180
|
+
function textLayoutOffsetY(baseline, lineHeight, fontSize, buf = 0) {
|
|
17409
17181
|
return "middle" === baseline ? -lineHeight / 2 : "top" === baseline ? 0 : "bottom" === baseline ? buf - lineHeight : baseline && "alphabetic" !== baseline ? 0 : (fontSize || (fontSize = lineHeight), -(lineHeight - fontSize) / 2 - .79 * fontSize);
|
|
17410
17182
|
}
|
|
17411
17183
|
function textAttributesToStyle(attrs) {
|
|
@@ -17550,7 +17322,7 @@
|
|
|
17550
17322
|
get length() {
|
|
17551
17323
|
return this.pools.length;
|
|
17552
17324
|
}
|
|
17553
|
-
release() {
|
|
17325
|
+
release(...params) {
|
|
17554
17326
|
this.pools = [];
|
|
17555
17327
|
}
|
|
17556
17328
|
}
|
|
@@ -17578,7 +17350,7 @@
|
|
|
17578
17350
|
get length() {
|
|
17579
17351
|
return this.pools.length;
|
|
17580
17352
|
}
|
|
17581
|
-
release() {
|
|
17353
|
+
release(...params) {
|
|
17582
17354
|
this.pools = [];
|
|
17583
17355
|
}
|
|
17584
17356
|
}
|
|
@@ -17795,10 +17567,9 @@
|
|
|
17795
17567
|
|
|
17796
17568
|
const CIRCLE_UPDATE_TAG_KEY = ["radius", "startAngle", "endAngle", ...GRAPHIC_UPDATE_TAG_KEY];
|
|
17797
17569
|
class Circle extends Graphic {
|
|
17798
|
-
constructor(
|
|
17799
|
-
|
|
17800
|
-
|
|
17801
|
-
};
|
|
17570
|
+
constructor(params = {
|
|
17571
|
+
radius: 1
|
|
17572
|
+
}) {
|
|
17802
17573
|
super(params), this.type = "circle", this.numberType = CIRCLE_NUMBER_TYPE;
|
|
17803
17574
|
}
|
|
17804
17575
|
isValid() {
|
|
@@ -17879,10 +17650,7 @@
|
|
|
17879
17650
|
} else bbox.yOffset = -bbox.height;
|
|
17880
17651
|
return bbox;
|
|
17881
17652
|
}
|
|
17882
|
-
GetLayoutByLines(lines, textAlign, textBaseline, lineHeight) {
|
|
17883
|
-
let suffix = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "";
|
|
17884
|
-
let wordBreak = arguments.length > 5 ? arguments[5] : undefined;
|
|
17885
|
-
let params = arguments.length > 6 ? arguments[6] : undefined;
|
|
17653
|
+
GetLayoutByLines(lines, textAlign, textBaseline, lineHeight, suffix = "", wordBreak, params) {
|
|
17886
17654
|
const {
|
|
17887
17655
|
lineWidth: lineWidth,
|
|
17888
17656
|
suffixPosition = "end",
|
|
@@ -18005,11 +17773,10 @@
|
|
|
18005
17773
|
get isMultiLine() {
|
|
18006
17774
|
return Array.isArray(this.attribute.text) || "normal" === this.attribute.whiteSpace;
|
|
18007
17775
|
}
|
|
18008
|
-
constructor(
|
|
18009
|
-
|
|
18010
|
-
|
|
18011
|
-
|
|
18012
|
-
};
|
|
17776
|
+
constructor(params = {
|
|
17777
|
+
text: "",
|
|
17778
|
+
fontSize: 16
|
|
17779
|
+
}) {
|
|
18013
17780
|
super(params), this.type = "text", this.numberType = TEXT_NUMBER_TYPE, this.cache = {};
|
|
18014
17781
|
}
|
|
18015
17782
|
isValid() {
|
|
@@ -18341,12 +18108,10 @@
|
|
|
18341
18108
|
var _a;
|
|
18342
18109
|
return null !== (_a = calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf;
|
|
18343
18110
|
}
|
|
18344
|
-
needUpdateTags(keys) {
|
|
18345
|
-
let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : TEXT_UPDATE_TAG_KEY;
|
|
18111
|
+
needUpdateTags(keys, k = TEXT_UPDATE_TAG_KEY) {
|
|
18346
18112
|
return super.needUpdateTags(keys, k);
|
|
18347
18113
|
}
|
|
18348
|
-
needUpdateTag(key) {
|
|
18349
|
-
let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : TEXT_UPDATE_TAG_KEY;
|
|
18114
|
+
needUpdateTag(key, k = TEXT_UPDATE_TAG_KEY) {
|
|
18350
18115
|
return super.needUpdateTag(key, k);
|
|
18351
18116
|
}
|
|
18352
18117
|
_interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes) {
|
|
@@ -18405,19 +18170,15 @@
|
|
|
18405
18170
|
|
|
18406
18171
|
const SYMBOL_UPDATE_TAG_KEY = ["symbolType", "size", ...GRAPHIC_UPDATE_TAG_KEY];
|
|
18407
18172
|
let Symbol$1 = class Symbol extends Graphic {
|
|
18408
|
-
constructor(
|
|
18409
|
-
|
|
18410
|
-
|
|
18411
|
-
};
|
|
18173
|
+
constructor(params = {
|
|
18174
|
+
symbolType: "circle"
|
|
18175
|
+
}) {
|
|
18412
18176
|
super(params), this.type = "symbol", this.numberType = SYMBOL_NUMBER_TYPE;
|
|
18413
18177
|
}
|
|
18414
18178
|
getParsedPath() {
|
|
18415
18179
|
return this.shouldUpdateShape() && (this._parsedPath = this.doUpdateParsedPath(), this.clearUpdateShapeTag()), this._parsedPath;
|
|
18416
18180
|
}
|
|
18417
|
-
getParsedPath2D() {
|
|
18418
|
-
let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
18419
|
-
let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
18420
|
-
let size = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
18181
|
+
getParsedPath2D(x = 0, y = 0, size = 1) {
|
|
18421
18182
|
let path = null;
|
|
18422
18183
|
try {
|
|
18423
18184
|
path = new Path2D();
|
|
@@ -18502,8 +18263,7 @@
|
|
|
18502
18263
|
|
|
18503
18264
|
const LINE_UPDATE_TAG_KEY = ["segments", "points", "curveType", "curveTension", ...GRAPHIC_UPDATE_TAG_KEY];
|
|
18504
18265
|
let Line$1 = class Line extends Graphic {
|
|
18505
|
-
constructor() {
|
|
18506
|
-
let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
18266
|
+
constructor(params = {}) {
|
|
18507
18267
|
super(params), this.type = "line", this.numberType = LINE_NUMBER_TYPE;
|
|
18508
18268
|
}
|
|
18509
18269
|
isValid() {
|
|
@@ -18740,9 +18500,7 @@
|
|
|
18740
18500
|
g.addUpdateShapeAndBoundsTag(), g.addUpdatePositionTag();
|
|
18741
18501
|
});
|
|
18742
18502
|
}
|
|
18743
|
-
setAttributes(params) {
|
|
18744
|
-
let forceUpdateTag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
18745
|
-
let context = arguments.length > 2 ? arguments[2] : undefined;
|
|
18503
|
+
setAttributes(params, forceUpdateTag = !1, context) {
|
|
18746
18504
|
super.setAttributes(params, forceUpdateTag, context), this.subGraphic.forEach(g => {
|
|
18747
18505
|
g.addUpdateShapeAndBoundsTag(), g.addUpdatePositionTag();
|
|
18748
18506
|
});
|
|
@@ -19398,8 +19156,7 @@
|
|
|
19398
19156
|
line = new Line(this.frame.left, this[this.directionKey.width], this.y + maxAscent, maxAscent, maxDescent, this.lineBuffer, this.direction, "horizontal" === this.direction ? this.frame.isWidthMax : this.frame.isHeightMax);
|
|
19399
19157
|
this.frame.lines.push(line), this.frame.actualHeight += line.height, this.y += line.height, this.lineBuffer.length = 0, this.lineWidth = this.maxAscent = this.maxDescent = this.maxAscentForBlank = this.maxDescentForBlank = 0;
|
|
19400
19158
|
}
|
|
19401
|
-
deal(paragraph) {
|
|
19402
|
-
let singleLine = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
19159
|
+
deal(paragraph, singleLine = !1) {
|
|
19403
19160
|
paragraph instanceof RichTextIcon ? "horizontal" === this.direction && 0 === this.width || "vertical" === this.direction && 0 === this.height || this.lineWidth + paragraph[this.directionKey.width] <= this[this.directionKey.width] ? this.store(paragraph) : 0 === this.lineBuffer.length ? (this.store(paragraph), this.send()) : (this.send(), this.deal(paragraph)) : "number" != typeof this.width || this.width < 0 || (paragraph.newLine && this.send(), (0 !== paragraph.text.length || this.newLine) && ("horizontal" === this.direction && 0 === this.width || "vertical" === this.direction && 0 === this.height || this.lineWidth + paragraph[this.directionKey.width] <= this[this.directionKey.width] ? this.store(paragraph) : this.lineWidth === this[this.directionKey.width] ? (this.send(), this.deal(paragraph)) : this.cut(paragraph, singleLine)));
|
|
19404
19161
|
}
|
|
19405
19162
|
cut(paragraph, singleLine) {
|
|
@@ -20333,8 +20090,7 @@
|
|
|
20333
20090
|
addUpdateShapeAndBoundsTag() {
|
|
20334
20091
|
super.addUpdateShapeAndBoundsTag(), this.shadowHost && this.shadowHost.addUpdateBoundTag();
|
|
20335
20092
|
}
|
|
20336
|
-
tryUpdateGlobalTransMatrix() {
|
|
20337
|
-
let clearTag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
20093
|
+
tryUpdateGlobalTransMatrix(clearTag = !0) {
|
|
20338
20094
|
if (this.shouldUpdateGlobalMatrix()) {
|
|
20339
20095
|
const m = this.transMatrix;
|
|
20340
20096
|
this._globalTransMatrix ? this._globalTransMatrix.setValue(m.a, m.b, m.c, m.d, m.e, m.f) : this._globalTransMatrix = m.clone(), this.doUpdateGlobalMatrix(), clearTag && this.clearUpdateGlobalPositionTag();
|
|
@@ -20864,9 +20620,7 @@
|
|
|
20864
20620
|
const defaultGroupBackgroundRenderContribution = new DefaultGroupBackgroundRenderContribution();
|
|
20865
20621
|
|
|
20866
20622
|
const halfPi = pi$1 / 2;
|
|
20867
|
-
function createRectPath(path, x, y, width, height, rectCornerRadius) {
|
|
20868
|
-
let roundCorner = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !0;
|
|
20869
|
-
let edgeCb = arguments.length > 7 ? arguments[7] : undefined;
|
|
20623
|
+
function createRectPath(path, x, y, width, height, rectCornerRadius, roundCorner = !0, edgeCb) {
|
|
20870
20624
|
let cornerRadius;
|
|
20871
20625
|
if (Array.isArray(roundCorner) && (edgeCb = roundCorner, roundCorner = !0), width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$1(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs$1(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
|
|
20872
20626
|
const cornerRadiusArr = rectCornerRadius;
|
|
@@ -21207,8 +20961,7 @@
|
|
|
21207
20961
|
doStroke: doStroke
|
|
21208
20962
|
};
|
|
21209
20963
|
}
|
|
21210
|
-
transform(graphic, graphicAttribute, context) {
|
|
21211
|
-
let use3dMatrixIn3dMode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
|
|
20964
|
+
transform(graphic, graphicAttribute, context, use3dMatrixIn3dMode = !1) {
|
|
21212
20965
|
const {
|
|
21213
20966
|
x = graphicAttribute.x,
|
|
21214
20967
|
y = graphicAttribute.y,
|
|
@@ -22336,7 +22089,7 @@
|
|
|
22336
22089
|
get length() {
|
|
22337
22090
|
return this.pools.length;
|
|
22338
22091
|
}
|
|
22339
|
-
release() {
|
|
22092
|
+
release(...params) {
|
|
22340
22093
|
this.pools = [];
|
|
22341
22094
|
}
|
|
22342
22095
|
}
|
|
@@ -22559,8 +22312,7 @@
|
|
|
22559
22312
|
path.moveTo(points[0].x + x, points[0].y + y);
|
|
22560
22313
|
for (let i = 1; i < points.length; i++) path.lineTo(points[i].x + x, points[i].y + y);
|
|
22561
22314
|
}
|
|
22562
|
-
function drawRoundedPolygon(path, points, x, y, cornerRadius) {
|
|
22563
|
-
let closePath = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : !0;
|
|
22315
|
+
function drawRoundedPolygon(path, points, x, y, cornerRadius, closePath = !0) {
|
|
22564
22316
|
var _a;
|
|
22565
22317
|
if (points.length < 3) return void drawPolygon(path, points, x, y);
|
|
22566
22318
|
let startI = 0,
|
|
@@ -23309,7 +23061,7 @@
|
|
|
23309
23061
|
unRegister(plugin) {
|
|
23310
23062
|
"onStartupFinished" === plugin.activeEvent ? this.onStartupFinishedPlugin.splice(this.onStartupFinishedPlugin.indexOf(plugin), 1) : "onRegister" === plugin.activeEvent && this.onRegisterPlugin.splice(this.onStartupFinishedPlugin.indexOf(plugin), 1), plugin.deactivate(this);
|
|
23311
23063
|
}
|
|
23312
|
-
release() {
|
|
23064
|
+
release(...params) {
|
|
23313
23065
|
this.onStartupFinishedPlugin.forEach(plugin => {
|
|
23314
23066
|
plugin.deactivate(this);
|
|
23315
23067
|
}), this.onStartupFinishedPlugin = [], this.onRegisterPlugin.forEach(plugin => {
|
|
@@ -23456,9 +23208,7 @@
|
|
|
23456
23208
|
zIdxArray: zIdxArray
|
|
23457
23209
|
};
|
|
23458
23210
|
}
|
|
23459
|
-
function foreach(graphic, defaultZIndex, cb) {
|
|
23460
|
-
let reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
|
|
23461
|
-
let sort3d = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
|
|
23211
|
+
function foreach(graphic, defaultZIndex, cb, reverse = !1, sort3d = !1) {
|
|
23462
23212
|
let needSort = !1;
|
|
23463
23213
|
if (sort3d) needSort = !0;else {
|
|
23464
23214
|
let lastZIndex;
|
|
@@ -23489,14 +23239,12 @@
|
|
|
23489
23239
|
}
|
|
23490
23240
|
} else graphic.forEachChildren(cb, reverse);
|
|
23491
23241
|
}
|
|
23492
|
-
function foreachAsync(graphic, defaultZIndex, cb) {
|
|
23493
|
-
let reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
|
|
23242
|
+
function foreachAsync(graphic, defaultZIndex, cb, reverse = !1) {
|
|
23494
23243
|
return __awaiter$6(this, void 0, void 0, function* () {
|
|
23495
23244
|
yield graphic.forEachChildrenAsync(cb, reverse);
|
|
23496
23245
|
});
|
|
23497
23246
|
}
|
|
23498
|
-
function findNextGraphic(graphic, id, defaultZIndex) {
|
|
23499
|
-
let reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
|
|
23247
|
+
function findNextGraphic(graphic, id, defaultZIndex, reverse = !1) {
|
|
23500
23248
|
let needSort = !1;
|
|
23501
23249
|
graphic.forEachChildren((item, i) => {
|
|
23502
23250
|
const {
|
|
@@ -24229,8 +23977,7 @@
|
|
|
24229
23977
|
get eventSystem() {
|
|
24230
23978
|
return this._eventSystem;
|
|
24231
23979
|
}
|
|
24232
|
-
constructor() {
|
|
24233
|
-
let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
23980
|
+
constructor(params = {}) {
|
|
24234
23981
|
var _a;
|
|
24235
23982
|
super({}), this.tickedBeforeRender = !0, this._onVisibleChange = visible => {
|
|
24236
23983
|
if (!(this._skipRender < 0)) if (visible) {
|
|
@@ -24265,8 +24012,7 @@
|
|
|
24265
24012
|
background: this._background
|
|
24266
24013
|
}), this.ticker.on("afterTick", this.afterTickCb);
|
|
24267
24014
|
}
|
|
24268
|
-
pauseRender() {
|
|
24269
|
-
let sr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
|
|
24015
|
+
pauseRender(sr = -1) {
|
|
24270
24016
|
this._skipRender = sr;
|
|
24271
24017
|
}
|
|
24272
24018
|
resumeRender() {
|
|
@@ -24288,8 +24034,7 @@
|
|
|
24288
24034
|
optmize(params) {
|
|
24289
24035
|
this.optmizeRender(params.skipRenderWithOutRange), this.params.optimize = params;
|
|
24290
24036
|
}
|
|
24291
|
-
optmizeRender() {
|
|
24292
|
-
let skipRenderWithOutRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
24037
|
+
optmizeRender(skipRenderWithOutRange = !1) {
|
|
24293
24038
|
skipRenderWithOutRange && (this._skipRender = this._skipRender < 0 ? this._skipRender : this.window.isVisible() ? 0 : 1, this.window.onVisibleChange(this._onVisibleChange));
|
|
24294
24039
|
}
|
|
24295
24040
|
getTimeline() {
|
|
@@ -24543,18 +24288,15 @@
|
|
|
24543
24288
|
renderStyle: this.renderStyle
|
|
24544
24289
|
}, params)));
|
|
24545
24290
|
}
|
|
24546
|
-
resizeWindow(w, h) {
|
|
24547
|
-
let rerender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
24291
|
+
resizeWindow(w, h, rerender = !0) {
|
|
24548
24292
|
this.window.resize(w, h), rerender && this.render();
|
|
24549
24293
|
}
|
|
24550
|
-
resize(w, h) {
|
|
24551
|
-
let rerender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
24294
|
+
resize(w, h, rerender = !0) {
|
|
24552
24295
|
"released" !== this.releaseStatus && (this.window.hasSubView() || this.viewBox.setValue(this.viewBox.x1, this.viewBox.y1, this.viewBox.x1 + w, this.viewBox.y1 + h), this.window.resize(w, h), this.forEachChildren(c => {
|
|
24553
24296
|
c.resize(w, h);
|
|
24554
24297
|
}), this.camera && this.option3d && this.set3dOptions(this.option3d), rerender && this.render());
|
|
24555
24298
|
}
|
|
24556
|
-
resizeView(w, h) {
|
|
24557
|
-
let rerender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
24299
|
+
resizeView(w, h, rerender = !0) {
|
|
24558
24300
|
"released" !== this.releaseStatus && (this.viewBox.setValue(this.viewBox.x1, this.viewBox.y1, this.viewBox.x1 + w, this.viewBox.y1 + h), this.forEachChildren(c => {
|
|
24559
24301
|
c.resizeView(w, h);
|
|
24560
24302
|
}), this.camera && (this.camera.params = Object.assign(Object.assign({}, this.camera.params), {
|
|
@@ -24568,8 +24310,7 @@
|
|
|
24568
24310
|
c.resizeView(this.viewBox.width(), this.viewBox.height());
|
|
24569
24311
|
}), isRerender && this.render();
|
|
24570
24312
|
}
|
|
24571
|
-
setDpr(dpr) {
|
|
24572
|
-
let rerender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
24313
|
+
setDpr(dpr, rerender = !0) {
|
|
24573
24314
|
this.forEachChildren(c => {
|
|
24574
24315
|
c.setDpr(dpr);
|
|
24575
24316
|
}), rerender && this.render();
|
|
@@ -24619,8 +24360,7 @@
|
|
|
24619
24360
|
});
|
|
24620
24361
|
});
|
|
24621
24362
|
}
|
|
24622
|
-
renderToNewWindow() {
|
|
24623
|
-
let viewBox = arguments.length > 1 ? arguments[1] : undefined;
|
|
24363
|
+
renderToNewWindow(fullImage = !0, viewBox) {
|
|
24624
24364
|
if ("released" === this.releaseStatus) return;
|
|
24625
24365
|
const window = container.get(VWindow),
|
|
24626
24366
|
x1 = viewBox ? -viewBox.x1 : 0,
|
|
@@ -24644,9 +24384,7 @@
|
|
|
24644
24384
|
title: ""
|
|
24645
24385
|
}), this.renderTo(window), window;
|
|
24646
24386
|
}
|
|
24647
|
-
toCanvas() {
|
|
24648
|
-
let fullImage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
24649
|
-
let viewBox = arguments.length > 1 ? arguments[1] : undefined;
|
|
24387
|
+
toCanvas(fullImage = !0, viewBox) {
|
|
24650
24388
|
if ("released" === this.releaseStatus) return;
|
|
24651
24389
|
const c = this.renderToNewWindow(fullImage, viewBox).getNativeHandler();
|
|
24652
24390
|
return c.nativeCanvas ? c.nativeCanvas : null;
|
|
@@ -24707,8 +24445,7 @@
|
|
|
24707
24445
|
getContext() {
|
|
24708
24446
|
throw new Error("不支持getContext");
|
|
24709
24447
|
}
|
|
24710
|
-
setTransformForCurrent() {
|
|
24711
|
-
let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
24448
|
+
setTransformForCurrent(force = !1) {
|
|
24712
24449
|
!force && this.applyedMatrix.equalToMatrix(this.matrix) || (this.applyedMatrix = this.cloneMatrix(this.matrix));
|
|
24713
24450
|
}
|
|
24714
24451
|
get currentMatrix() {
|
|
@@ -24726,8 +24463,7 @@
|
|
|
24726
24463
|
highPerformanceRestore() {
|
|
24727
24464
|
this.stack.length > 0 && (matrixAllocate.free(this.matrix), this.matrix = this.stack.pop());
|
|
24728
24465
|
}
|
|
24729
|
-
rotate(rad) {
|
|
24730
|
-
let setTransform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
24466
|
+
rotate(rad, setTransform = !0) {
|
|
24731
24467
|
this.matrix.rotate(rad), setTransform && this.setTransformForCurrent();
|
|
24732
24468
|
}
|
|
24733
24469
|
save() {
|
|
@@ -24738,55 +24474,41 @@
|
|
|
24738
24474
|
const matrix = this.cloneMatrix(this.matrix);
|
|
24739
24475
|
this.stack.push(matrix);
|
|
24740
24476
|
}
|
|
24741
|
-
scale(sx, sy) {
|
|
24742
|
-
let setTransform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
24477
|
+
scale(sx, sy, setTransform = !0) {
|
|
24743
24478
|
this.matrix.scale(sx, sy), setTransform && this.setTransformForCurrent();
|
|
24744
24479
|
}
|
|
24745
|
-
setScale(sx, sy) {
|
|
24746
|
-
let setTransform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
24480
|
+
setScale(sx, sy, setTransform = !0) {
|
|
24747
24481
|
this.matrix.setScale(sx, sy), setTransform && this.setTransformForCurrent();
|
|
24748
24482
|
}
|
|
24749
|
-
scalePoint(sx, sy, px, py) {
|
|
24750
|
-
let setTransform = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !0;
|
|
24483
|
+
scalePoint(sx, sy, px, py, setTransform = !0) {
|
|
24751
24484
|
this.translate(px, py, !1), this.scale(sx, sy, !1), this.translate(-px, -py, !1), setTransform && this.setTransformForCurrent();
|
|
24752
24485
|
}
|
|
24753
|
-
setTransform(a, b, c, d, e, f) {
|
|
24754
|
-
let setTransform = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !0;
|
|
24755
|
-
let dpr = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : this.dpr;
|
|
24486
|
+
setTransform(a, b, c, d, e, f, setTransform = !0, dpr = this.dpr) {
|
|
24756
24487
|
this.matrix.setValue(dpr * a, dpr * b, dpr * c, dpr * d, dpr * e, dpr * f), setTransform && this.setTransformForCurrent();
|
|
24757
24488
|
}
|
|
24758
|
-
setTransformFromMatrix(matrix) {
|
|
24759
|
-
let setTransform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
24760
|
-
let dpr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.dpr;
|
|
24489
|
+
setTransformFromMatrix(matrix, setTransform = !0, dpr = this.dpr) {
|
|
24761
24490
|
this.matrix.setValue(matrix.a * dpr, matrix.b * dpr, matrix.c * dpr, matrix.d * dpr, matrix.e * dpr, matrix.f * dpr), setTransform && this.setTransformForCurrent();
|
|
24762
24491
|
}
|
|
24763
|
-
resetTransform() {
|
|
24764
|
-
let setTransform = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
24765
|
-
let dpr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.dpr;
|
|
24492
|
+
resetTransform(setTransform = !0, dpr = this.dpr) {
|
|
24766
24493
|
this.setTransform(dpr, 0, 0, dpr, 0, 0), setTransform && this.setTransformForCurrent();
|
|
24767
24494
|
}
|
|
24768
|
-
transform(a, b, c, d, e, f) {
|
|
24769
|
-
let setTransform = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !0;
|
|
24495
|
+
transform(a, b, c, d, e, f, setTransform = !0) {
|
|
24770
24496
|
this.matrix.multiply(a, b, c, d, e, f), setTransform && this.setTransformForCurrent();
|
|
24771
24497
|
}
|
|
24772
24498
|
transformFromMatrix(matrix, setTransform) {
|
|
24773
24499
|
this.matrix.multiply(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f), setTransform && this.setTransformForCurrent();
|
|
24774
24500
|
}
|
|
24775
|
-
translate(x, y) {
|
|
24776
|
-
let setTransform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
24501
|
+
translate(x, y, setTransform = !0) {
|
|
24777
24502
|
this.matrix.translate(x, y), setTransform && this.setTransformForCurrent();
|
|
24778
24503
|
}
|
|
24779
|
-
rotateDegrees(deg) {
|
|
24780
|
-
let setTransform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
24504
|
+
rotateDegrees(deg, setTransform = !0) {
|
|
24781
24505
|
const rad = deg * Math.PI / 180;
|
|
24782
24506
|
this.rotate(rad, setTransform);
|
|
24783
24507
|
}
|
|
24784
|
-
rotateAbout(rad, x, y) {
|
|
24785
|
-
let setTransform = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !0;
|
|
24508
|
+
rotateAbout(rad, x, y, setTransform = !0) {
|
|
24786
24509
|
this.translate(x, y, !1), this.rotate(rad, !1), this.translate(-x, -y, !1), setTransform && this.setTransformForCurrent();
|
|
24787
24510
|
}
|
|
24788
|
-
rotateDegreesAbout(deg, x, y) {
|
|
24789
|
-
let setTransform = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !0;
|
|
24511
|
+
rotateDegreesAbout(deg, x, y, setTransform = !0) {
|
|
24790
24512
|
this.translate(x, y, !1), this.rotateDegrees(deg, !1), this.translate(-x, -y, !1), setTransform && this.setTransformForCurrent();
|
|
24791
24513
|
}
|
|
24792
24514
|
beginPath() {
|
|
@@ -24880,19 +24602,16 @@
|
|
|
24880
24602
|
setTextStyleWithoutAlignBaseline(params, defaultParams) {}
|
|
24881
24603
|
setTextStyle(params, defaultParams) {}
|
|
24882
24604
|
draw() {}
|
|
24883
|
-
clearMatrix() {
|
|
24884
|
-
let setTransform = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
24885
|
-
let dpr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.dpr;
|
|
24605
|
+
clearMatrix(setTransform = !0, dpr = this.dpr) {
|
|
24886
24606
|
this.setTransformFromMatrix(initMatrix, setTransform, dpr);
|
|
24887
24607
|
}
|
|
24888
24608
|
setClearMatrix(a, b, c, d, e, f) {
|
|
24889
24609
|
this._clearMatrix.setValue(a, b, c, d, e, f);
|
|
24890
24610
|
}
|
|
24891
|
-
onlyTranslate() {
|
|
24892
|
-
let dpr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dpr;
|
|
24611
|
+
onlyTranslate(dpr = this.dpr) {
|
|
24893
24612
|
return this.matrix.a === dpr && 0 === this.matrix.b && 0 === this.matrix.c && this.matrix.d === dpr;
|
|
24894
24613
|
}
|
|
24895
|
-
release() {
|
|
24614
|
+
release(...params) {
|
|
24896
24615
|
this.stack.forEach(m => matrixAllocate.free(m)), this.stack.length = 0;
|
|
24897
24616
|
}
|
|
24898
24617
|
};
|
|
@@ -24992,7 +24711,7 @@
|
|
|
24992
24711
|
transferToImageBitmap() {
|
|
24993
24712
|
throw new Error("暂未实现");
|
|
24994
24713
|
}
|
|
24995
|
-
release() {
|
|
24714
|
+
release(...params) {
|
|
24996
24715
|
this.controled && this._nativeCanvas.parentElement && this._nativeCanvas.parentElement.removeChild(this._nativeCanvas);
|
|
24997
24716
|
}
|
|
24998
24717
|
}
|
|
@@ -25031,7 +24750,7 @@
|
|
|
25031
24750
|
});
|
|
25032
24751
|
};
|
|
25033
24752
|
let BaseEnvContribution = class {
|
|
25034
|
-
configure(service) {
|
|
24753
|
+
configure(service, ...p) {
|
|
25035
24754
|
service.env === this.type && service.setActiveEnvContribution(this);
|
|
25036
24755
|
}
|
|
25037
24756
|
getNativeAABBBounds(dom) {
|
|
@@ -25134,7 +24853,7 @@
|
|
|
25134
24853
|
configure(window, global) {
|
|
25135
24854
|
global.env === this.type && window.setWindowHandler(this);
|
|
25136
24855
|
}
|
|
25137
|
-
release() {
|
|
24856
|
+
release(...params) {
|
|
25138
24857
|
this.releaseWindow();
|
|
25139
24858
|
}
|
|
25140
24859
|
isVisible(bbox) {
|
|
@@ -25163,8 +24882,7 @@
|
|
|
25163
24882
|
BaseWindowHandlerContribution = __decorate$16([injectable(), __metadata$R("design:paramtypes", [])], BaseWindowHandlerContribution);
|
|
25164
24883
|
|
|
25165
24884
|
class DirectionalLight {
|
|
25166
|
-
constructor(dir, color) {
|
|
25167
|
-
let ambient = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : .8;
|
|
24885
|
+
constructor(dir, color, ambient = .8) {
|
|
25168
24886
|
this.dir = dir, this.color = color, this.colorRgb = ColorStore.Get(color, ColorType.Color1), this.ambient = ambient;
|
|
25169
24887
|
const length = sqrt$3(dir[0] * dir[0] + dir[1] * dir[1] + dir[2] * dir[2]);
|
|
25170
24888
|
this.formatedDir = [dir[0] / length, dir[1] / length, dir[2] / length];
|
|
@@ -26323,15 +26041,13 @@
|
|
|
26323
26041
|
return b && error("Access path missing closing bracket: " + p), q && error("Access path missing closing quote: " + p), j > i && (j += 1, push()), path;
|
|
26324
26042
|
};
|
|
26325
26043
|
|
|
26326
|
-
const fieldSingle =
|
|
26327
|
-
let opt = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
26044
|
+
const fieldSingle = (fieldStr, name, opt = {}) => {
|
|
26328
26045
|
if (isFunction$1(fieldStr)) return fieldStr;
|
|
26329
26046
|
const path = splitAccessPath(fieldStr),
|
|
26330
26047
|
parsedField = 1 === path.length ? path[0] : fieldStr;
|
|
26331
26048
|
return accessor((opt && opt.get || getter)(path), [parsedField], name || parsedField);
|
|
26332
26049
|
};
|
|
26333
|
-
const field$3 =
|
|
26334
|
-
let opt = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
26050
|
+
const field$3 = (fieldStr, name, opt = {}) => {
|
|
26335
26051
|
if (isArray$1(fieldStr)) {
|
|
26336
26052
|
const funcs = fieldStr.map(entry => fieldSingle(entry, name, opt));
|
|
26337
26053
|
return datum => funcs.map(func => func(datum));
|
|
@@ -26377,9 +26093,7 @@
|
|
|
26377
26093
|
SSE += sse * sse, SST += sst * sst;
|
|
26378
26094
|
}), 1 - SSE / SST;
|
|
26379
26095
|
}
|
|
26380
|
-
function regressionLinear(data) {
|
|
26381
|
-
let x = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : datum => datum.x;
|
|
26382
|
-
let y = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : datum => datum.y;
|
|
26096
|
+
function regressionLinear(data, x = datum => datum.x, y = datum => datum.y) {
|
|
26383
26097
|
let X = 0,
|
|
26384
26098
|
Y = 0,
|
|
26385
26099
|
XY = 0,
|
|
@@ -26551,15 +26265,11 @@
|
|
|
26551
26265
|
ctx.fillText(text, width / 2, height / 2), ctx.scale(scale, scale);
|
|
26552
26266
|
} else baseFontSize = Math.floor(baseFontSize * width / textWidth), baseFontSize = Math.min(baseFontSize, height), ctx.font = `${fontStyle} ${fontVariant} ${fontWeight} ${baseFontSize}px ${fontFamily}`, ctx.fillText(text, Math.floor(width / 2), Math.floor(height / 2));
|
|
26553
26267
|
};
|
|
26554
|
-
const generatePoints =
|
|
26555
|
-
let startAngle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
26556
|
-
let count = arguments.length > 3 ? arguments[3] : undefined;
|
|
26268
|
+
const generatePoints = (center, radius, startAngle = 0, count) => {
|
|
26557
26269
|
const angle = 2 * Math.PI / count;
|
|
26558
26270
|
return new Array(count).fill(0).map((entry, index) => polarToCartesian(center, radius, startAngle + index * angle));
|
|
26559
26271
|
};
|
|
26560
|
-
const generateCardioidPoints =
|
|
26561
|
-
let startAngle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
26562
|
-
let count = arguments.length > 3 ? arguments[3] : undefined;
|
|
26272
|
+
const generateCardioidPoints = (center, radius, startAngle = 0, count) => {
|
|
26563
26273
|
const angle = 2 * Math.PI / count,
|
|
26564
26274
|
func = getShapeFunction("cardioid");
|
|
26565
26275
|
return new Array(count).fill(0).map((entry, index) => {
|
|
@@ -26777,8 +26487,7 @@
|
|
|
26777
26487
|
};
|
|
26778
26488
|
};
|
|
26779
26489
|
class Gesture extends EventEmitter {
|
|
26780
|
-
constructor(element) {
|
|
26781
|
-
let config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
26490
|
+
constructor(element, config = {}) {
|
|
26782
26491
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
26783
26492
|
super(), this.cachedEvents = [], this.startPoints = [], this.processEvent = {}, this.throttleTimer = 0, this.emitThrottles = [], this.lastTapTarget = null, this.onStart = ev => {
|
|
26784
26493
|
this.startTime = clock.now();
|
|
@@ -27123,8 +26832,7 @@
|
|
|
27123
26832
|
getContext() {
|
|
27124
26833
|
return this.nativeContext;
|
|
27125
26834
|
}
|
|
27126
|
-
setTransformForCurrent() {
|
|
27127
|
-
let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
26835
|
+
setTransformForCurrent(force = !1) {
|
|
27128
26836
|
!force && this.applyedMatrix.equalToMatrix(this.matrix) || (this.applyedMatrix.setValue(this.matrix.a, this.matrix.b, this.matrix.c, this.matrix.d, this.matrix.e, this.matrix.f), this.nativeContext.setTransform(this.matrix.a, this.matrix.b, this.matrix.c, this.matrix.d, this.matrix.e, this.matrix.f));
|
|
27129
26837
|
}
|
|
27130
26838
|
get currentMatrix() {
|
|
@@ -27142,8 +26850,7 @@
|
|
|
27142
26850
|
highPerformanceRestore() {
|
|
27143
26851
|
this.stack.length > 0 && (matrixAllocate.free(this.matrix), this.matrix = this.stack.pop());
|
|
27144
26852
|
}
|
|
27145
|
-
rotate(rad) {
|
|
27146
|
-
let setTransform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
26853
|
+
rotate(rad, setTransform = !0) {
|
|
27147
26854
|
this.matrix.rotate(rad), setTransform && this.setTransformForCurrent();
|
|
27148
26855
|
}
|
|
27149
26856
|
save() {
|
|
@@ -27154,55 +26861,41 @@
|
|
|
27154
26861
|
const matrix = this.cloneMatrix(this.matrix);
|
|
27155
26862
|
this.stack.push(matrix);
|
|
27156
26863
|
}
|
|
27157
|
-
scale(sx, sy) {
|
|
27158
|
-
let setTransform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
26864
|
+
scale(sx, sy, setTransform = !0) {
|
|
27159
26865
|
this.matrix.scale(sx, sy), setTransform && this.setTransformForCurrent();
|
|
27160
26866
|
}
|
|
27161
|
-
setScale(sx, sy) {
|
|
27162
|
-
let setTransform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
26867
|
+
setScale(sx, sy, setTransform = !0) {
|
|
27163
26868
|
this.matrix.setScale(sx, sy), setTransform && this.setTransformForCurrent();
|
|
27164
26869
|
}
|
|
27165
|
-
scalePoint(sx, sy, px, py) {
|
|
27166
|
-
let setTransform = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !0;
|
|
26870
|
+
scalePoint(sx, sy, px, py, setTransform = !0) {
|
|
27167
26871
|
this.translate(px, py, !1), this.scale(sx, sy, !1), this.translate(-px, -py, !1), setTransform && this.setTransformForCurrent();
|
|
27168
26872
|
}
|
|
27169
|
-
setTransform(a, b, c, d, e, f) {
|
|
27170
|
-
let setTransform = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !0;
|
|
27171
|
-
let dpr = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : this.dpr;
|
|
26873
|
+
setTransform(a, b, c, d, e, f, setTransform = !0, dpr = this.dpr) {
|
|
27172
26874
|
this.matrix.setValue(dpr * a, dpr * b, dpr * c, dpr * d, dpr * e, dpr * f), setTransform && this.setTransformForCurrent();
|
|
27173
26875
|
}
|
|
27174
|
-
setTransformFromMatrix(matrix) {
|
|
27175
|
-
let setTransform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
27176
|
-
let dpr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.dpr;
|
|
26876
|
+
setTransformFromMatrix(matrix, setTransform = !0, dpr = this.dpr) {
|
|
27177
26877
|
this.matrix.setValue(matrix.a * dpr, matrix.b * dpr, matrix.c * dpr, matrix.d * dpr, matrix.e * dpr, matrix.f * dpr), setTransform && this.setTransformForCurrent();
|
|
27178
26878
|
}
|
|
27179
|
-
resetTransform() {
|
|
27180
|
-
let setTransform = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
27181
|
-
let dpr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.dpr;
|
|
26879
|
+
resetTransform(setTransform = !0, dpr = this.dpr) {
|
|
27182
26880
|
this.setTransform(dpr, 0, 0, dpr, 0, 0), setTransform && this.setTransformForCurrent();
|
|
27183
26881
|
}
|
|
27184
|
-
transform(a, b, c, d, e, f) {
|
|
27185
|
-
let setTransform = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !0;
|
|
26882
|
+
transform(a, b, c, d, e, f, setTransform = !0) {
|
|
27186
26883
|
this.matrix.multiply(a, b, c, d, e, f), setTransform && this.setTransformForCurrent();
|
|
27187
26884
|
}
|
|
27188
26885
|
transformFromMatrix(matrix, setTransform) {
|
|
27189
26886
|
this.matrix.multiply(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f), setTransform && this.setTransformForCurrent();
|
|
27190
26887
|
}
|
|
27191
|
-
translate(x, y) {
|
|
27192
|
-
let setTransform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
26888
|
+
translate(x, y, setTransform = !0) {
|
|
27193
26889
|
this.matrix.translate(x, y), setTransform && this.setTransformForCurrent();
|
|
27194
26890
|
}
|
|
27195
|
-
rotateDegrees(deg) {
|
|
27196
|
-
let setTransform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
26891
|
+
rotateDegrees(deg, setTransform = !0) {
|
|
27197
26892
|
const rad = deg * Math.PI / 180;
|
|
27198
26893
|
this.rotate(rad, setTransform);
|
|
27199
26894
|
}
|
|
27200
|
-
rotateAbout(rad, x, y) {
|
|
27201
|
-
let setTransform = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !0;
|
|
26895
|
+
rotateAbout(rad, x, y, setTransform = !0) {
|
|
27202
26896
|
this.translate(x, y, !1), this.rotate(rad, !1), this.translate(-x, -y, !1), setTransform && this.setTransformForCurrent();
|
|
27203
26897
|
}
|
|
27204
|
-
rotateDegreesAbout(deg, x, y) {
|
|
27205
|
-
let setTransform = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !0;
|
|
26898
|
+
rotateDegreesAbout(deg, x, y, setTransform = !0) {
|
|
27206
26899
|
this.translate(x, y, !1), this.rotateDegrees(deg, !1), this.translate(-x, -y, !1), setTransform && this.setTransformForCurrent();
|
|
27207
26900
|
}
|
|
27208
26901
|
beginPath() {
|
|
@@ -27339,8 +27032,7 @@
|
|
|
27339
27032
|
isPointInStroke(x, y) {
|
|
27340
27033
|
return this.nativeContext.isPointInStroke(x, y);
|
|
27341
27034
|
}
|
|
27342
|
-
measureText(text) {
|
|
27343
|
-
let method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : application.global.measureTextMethod;
|
|
27035
|
+
measureText(text, method = application.global.measureTextMethod) {
|
|
27344
27036
|
var _a, _b;
|
|
27345
27037
|
if (!method || "native" === method) return this.nativeContext.measureText(text);
|
|
27346
27038
|
this.mathTextMeasure || (this.mathTextMeasure = application.graphicUtil.createTextMeasureInstance({}, {}, () => this.canvas.nativeCanvas));
|
|
@@ -27475,19 +27167,16 @@
|
|
|
27475
27167
|
this.fontFamily = fontFamily, this.fontSize = fontSize, _context.textAlign = null !== (_a = params.textAlign) && void 0 !== _a ? _a : defaultParams.textAlign, _context.textBaseline = null !== (_b = params.textBaseline) && void 0 !== _b ? _b : defaultParams.textBaseline;
|
|
27476
27168
|
}
|
|
27477
27169
|
draw() {}
|
|
27478
|
-
clearMatrix() {
|
|
27479
|
-
let setTransform = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
27480
|
-
let dpr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.dpr;
|
|
27170
|
+
clearMatrix(setTransform = !0, dpr = this.dpr) {
|
|
27481
27171
|
this.setTransformFromMatrix(this._clearMatrix, setTransform, dpr);
|
|
27482
27172
|
}
|
|
27483
27173
|
setClearMatrix(a, b, c, d, e, f) {
|
|
27484
27174
|
this._clearMatrix.setValue(a, b, c, d, e, f);
|
|
27485
27175
|
}
|
|
27486
|
-
onlyTranslate() {
|
|
27487
|
-
let dpr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dpr;
|
|
27176
|
+
onlyTranslate(dpr = this.dpr) {
|
|
27488
27177
|
return this.matrix.a === dpr && 0 === this.matrix.b && 0 === this.matrix.c && this.matrix.d === dpr;
|
|
27489
27178
|
}
|
|
27490
|
-
release() {
|
|
27179
|
+
release(...params) {
|
|
27491
27180
|
this.stack.forEach(m => matrixAllocate.free(m)), this.stack.length = 0;
|
|
27492
27181
|
}
|
|
27493
27182
|
};
|
|
@@ -27894,8 +27583,7 @@
|
|
|
27894
27583
|
this.dom = dom;
|
|
27895
27584
|
}
|
|
27896
27585
|
}
|
|
27897
|
-
function createImageElement$1(src) {
|
|
27898
|
-
let isSvg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
27586
|
+
function createImageElement$1(src, isSvg = !1) {
|
|
27899
27587
|
const img = document.createElement("img");
|
|
27900
27588
|
if (application.global.isImageAnonymous && (img.crossOrigin = "anonymous"), isSvg) {
|
|
27901
27589
|
const data = new Blob([src], {
|
|
@@ -28042,7 +27730,7 @@
|
|
|
28042
27730
|
getDocument() {
|
|
28043
27731
|
return document;
|
|
28044
27732
|
}
|
|
28045
|
-
release() {}
|
|
27733
|
+
release(...params) {}
|
|
28046
27734
|
getElementTop(element, baseWindow) {
|
|
28047
27735
|
let actualTop = element.offsetTop,
|
|
28048
27736
|
current = element.offsetParent;
|
|
@@ -28096,8 +27784,7 @@
|
|
|
28096
27784
|
browserEnvModule.isBrowserBound || (browserEnvModule.isBrowserBound = !0, bind(BrowserEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(BrowserEnvContribution));
|
|
28097
27785
|
});
|
|
28098
27786
|
browserEnvModule.isBrowserBound = !1;
|
|
28099
|
-
function loadBrowserEnv(container) {
|
|
28100
|
-
let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
27787
|
+
function loadBrowserEnv(container, loadPicker = !0) {
|
|
28101
27788
|
loadBrowserEnv.__loaded || (loadBrowserEnv.__loaded = !0, container.load(browserEnvModule), container.load(browserCanvasModule), container.load(browserWindowModule), loadPicker && loadCanvasPicker(container));
|
|
28102
27789
|
}
|
|
28103
27790
|
loadBrowserEnv.__loaded = !1;
|
|
@@ -28166,7 +27853,7 @@
|
|
|
28166
27853
|
init() {
|
|
28167
27854
|
this._context = new FeishuContext2d(this, this._dpr);
|
|
28168
27855
|
}
|
|
28169
|
-
release() {}
|
|
27856
|
+
release(...params) {}
|
|
28170
27857
|
};
|
|
28171
27858
|
FeishuCanvas.env = "feishu", FeishuCanvas = __decorate$U([injectable(), __metadata$J("design:paramtypes", [Object])], FeishuCanvas);
|
|
28172
27859
|
|
|
@@ -28929,7 +28616,7 @@
|
|
|
28929
28616
|
getDocument() {
|
|
28930
28617
|
return null;
|
|
28931
28618
|
}
|
|
28932
|
-
release() {}
|
|
28619
|
+
release(...params) {}
|
|
28933
28620
|
mapToCanvasPoint(event) {
|
|
28934
28621
|
var _a;
|
|
28935
28622
|
return null === (_a = null == event ? void 0 : event.type) || void 0 === _a || _a.startsWith("mouse"), event;
|
|
@@ -28941,8 +28628,7 @@
|
|
|
28941
28628
|
feishuEnvModule.isFeishuBound || (feishuEnvModule.isFeishuBound = !0, bind(FeishuEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(FeishuEnvContribution));
|
|
28942
28629
|
});
|
|
28943
28630
|
feishuEnvModule.isFeishuBound = !1;
|
|
28944
|
-
function loadFeishuEnv(container) {
|
|
28945
|
-
let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
28631
|
+
function loadFeishuEnv(container, loadPicker = !0) {
|
|
28946
28632
|
loadFeishuEnv.__loaded || (loadFeishuEnv.__loaded = !0, container.load(feishuEnvModule), container.load(feishuCanvasModule), container.load(feishuWindowModule), loadPicker && loadMathPicker(container));
|
|
28947
28633
|
}
|
|
28948
28634
|
loadFeishuEnv.__loaded = !1;
|
|
@@ -28991,8 +28677,7 @@
|
|
|
28991
28677
|
_context.globalAlpha = strokeOpacity * opacity * this.baseGlobalAlpha, _context.lineWidth = keepStrokeScale ? lineWidth : getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, 0 === lineDash[0] && 0 === lineDash[1] || !lineDash || (_context.setLineDash(lineDash), _context.lineDashOffset = lineDashOffset), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
|
|
28992
28678
|
}
|
|
28993
28679
|
}
|
|
28994
|
-
measureText(text) {
|
|
28995
|
-
let method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : application.global.measureTextMethod;
|
|
28680
|
+
measureText(text, method = application.global.measureTextMethod) {
|
|
28996
28681
|
this.setTransform(1, 0, 0, 1, 0, 0, !0, application.global.devicePixelRatio);
|
|
28997
28682
|
return {
|
|
28998
28683
|
width: super.measureText(text, method).width,
|
|
@@ -29037,7 +28722,7 @@
|
|
|
29037
28722
|
this._pixelWidth = width * this._dpr, this._pixelHeight = height * this._dpr, this._displayWidth = width, this._displayHeight = height, this._nativeCanvas.width = this._pixelWidth, this._nativeCanvas.height = this._pixelHeight, this._nativeCanvas.nativeCanvas && (this._nativeCanvas.nativeCanvas.width = this._pixelWidth, this._nativeCanvas.nativeCanvas.height = this._pixelHeight);
|
|
29038
28723
|
this._context.dpr = this._dpr;
|
|
29039
28724
|
}
|
|
29040
|
-
release() {}
|
|
28725
|
+
release(...params) {}
|
|
29041
28726
|
};
|
|
29042
28727
|
LynxCanvas.env = "lynx", LynxCanvas = __decorate$E([injectable(), __metadata$w("design:paramtypes", [Object])], LynxCanvas);
|
|
29043
28728
|
|
|
@@ -29227,8 +28912,7 @@
|
|
|
29227
28912
|
canvasMap.set(id, canvas), freeCanvasList.push(canvas);
|
|
29228
28913
|
}
|
|
29229
28914
|
}
|
|
29230
|
-
function createImageElement(src) {
|
|
29231
|
-
let isSvg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
28915
|
+
function createImageElement(src, isSvg = !1) {
|
|
29232
28916
|
if (isSvg) return Promise.reject();
|
|
29233
28917
|
const img = lynx.createImage(src);
|
|
29234
28918
|
return new Promise((resolve, reject) => {
|
|
@@ -29311,7 +28995,7 @@
|
|
|
29311
28995
|
getDocument() {
|
|
29312
28996
|
return null;
|
|
29313
28997
|
}
|
|
29314
|
-
release() {}
|
|
28998
|
+
release(...params) {}
|
|
29315
28999
|
};
|
|
29316
29000
|
LynxEnvContribution = __decorate$C([injectable(), __metadata$u("design:paramtypes", [])], LynxEnvContribution);
|
|
29317
29001
|
|
|
@@ -29319,8 +29003,7 @@
|
|
|
29319
29003
|
lynxEnvModule.isLynxBound || (lynxEnvModule.isLynxBound = !0, bind(LynxEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(LynxEnvContribution));
|
|
29320
29004
|
});
|
|
29321
29005
|
lynxEnvModule.isLynxBound = !1;
|
|
29322
|
-
function loadLynxEnv(container) {
|
|
29323
|
-
let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
29006
|
+
function loadLynxEnv(container, loadPicker = !0) {
|
|
29324
29007
|
loadLynxEnv.__loaded || (loadLynxEnv.__loaded = !0, container.load(lynxEnvModule), container.load(lynxCanvasModule), container.load(lynxWindowModule), loadPicker && loadMathPicker(container));
|
|
29325
29008
|
}
|
|
29326
29009
|
loadLynxEnv.__loaded = !1;
|
|
@@ -29342,7 +29025,7 @@
|
|
|
29342
29025
|
if (!context) throw new Error("发生错误,获取2d上下文失败");
|
|
29343
29026
|
this.nativeContext = context, this.canvas = canvas, this.matrix = new Matrix(1, 0, 0, 1, 0, 0), this.stack = [], this.dpr = null != dpr ? dpr : 1;
|
|
29344
29027
|
}
|
|
29345
|
-
release() {}
|
|
29028
|
+
release(...params) {}
|
|
29346
29029
|
};
|
|
29347
29030
|
NodeContext2d.env = "node", NodeContext2d = __decorate$B([injectable(), __metadata$t("design:paramtypes", [Object, Number])], NodeContext2d);
|
|
29348
29031
|
|
|
@@ -29363,7 +29046,7 @@
|
|
|
29363
29046
|
init() {
|
|
29364
29047
|
this._context = new NodeContext2d(this, this._dpr), this.nativeCanvas.width = this._pixelWidth, this.nativeCanvas.height = this._pixelHeight;
|
|
29365
29048
|
}
|
|
29366
|
-
release() {
|
|
29049
|
+
release(...params) {
|
|
29367
29050
|
this._nativeCanvas.release && isFunction$1(this._nativeCanvas.release) && this._nativeCanvas.release();
|
|
29368
29051
|
}
|
|
29369
29052
|
};
|
|
@@ -29458,8 +29141,7 @@
|
|
|
29458
29141
|
getDpr() {
|
|
29459
29142
|
return this.canvas.dpr;
|
|
29460
29143
|
}
|
|
29461
|
-
getImageBuffer() {
|
|
29462
|
-
let type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "image/png";
|
|
29144
|
+
getImageBuffer(type = "image/png") {
|
|
29463
29145
|
return this.canvas.nativeCanvas.toBuffer(type);
|
|
29464
29146
|
}
|
|
29465
29147
|
addEventListener(type, listener, options) {}
|
|
@@ -29562,7 +29244,7 @@
|
|
|
29562
29244
|
return null;
|
|
29563
29245
|
}
|
|
29564
29246
|
dispatchEvent(event) {}
|
|
29565
|
-
release() {}
|
|
29247
|
+
release(...params) {}
|
|
29566
29248
|
createOffscreenCanvas(params) {}
|
|
29567
29249
|
};
|
|
29568
29250
|
NodeEnvContribution = __decorate$y([injectable()], NodeEnvContribution);
|
|
@@ -29571,7 +29253,7 @@
|
|
|
29571
29253
|
nodeEnvModule.isNodeBound || (nodeEnvModule.isNodeBound = !0, bind(NodeEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(NodeEnvContribution));
|
|
29572
29254
|
});
|
|
29573
29255
|
nodeEnvModule.isNodeBound = !1;
|
|
29574
|
-
function loadNodeEnv(container) {
|
|
29256
|
+
function loadNodeEnv(container, loadPicker = !0) {
|
|
29575
29257
|
loadNodeEnv.__loaded || (loadNodeEnv.__loaded = !0, container.load(nodeEnvModule), container.load(nodeCanvasModule), container.load(nodeWindowModule));
|
|
29576
29258
|
}
|
|
29577
29259
|
loadNodeEnv.__loaded = !1;
|
|
@@ -29684,7 +29366,7 @@
|
|
|
29684
29366
|
init() {
|
|
29685
29367
|
this._context = new TaroContext2d(this, this._dpr);
|
|
29686
29368
|
}
|
|
29687
|
-
release() {}
|
|
29369
|
+
release(...params) {}
|
|
29688
29370
|
};
|
|
29689
29371
|
TaroCanvas.env = "taro", TaroCanvas = __decorate$w([injectable(), __metadata$q("design:paramtypes", [Object])], TaroCanvas);
|
|
29690
29372
|
|
|
@@ -29953,7 +29635,7 @@
|
|
|
29953
29635
|
getDocument() {
|
|
29954
29636
|
return null;
|
|
29955
29637
|
}
|
|
29956
|
-
release() {}
|
|
29638
|
+
release(...params) {}
|
|
29957
29639
|
};
|
|
29958
29640
|
TaroEnvContribution = __decorate$u([injectable(), __metadata$o("design:paramtypes", [])], TaroEnvContribution);
|
|
29959
29641
|
|
|
@@ -29961,8 +29643,7 @@
|
|
|
29961
29643
|
taroEnvModule.isTaroBound || (taroEnvModule.isTaroBound = !0, bind(TaroEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(TaroEnvContribution));
|
|
29962
29644
|
});
|
|
29963
29645
|
taroEnvModule.isTaroBound = !1;
|
|
29964
|
-
function loadTaroEnv(container) {
|
|
29965
|
-
let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
29646
|
+
function loadTaroEnv(container, loadPicker = !0) {
|
|
29966
29647
|
loadTaroEnv.__loaded || (loadTaroEnv.__loaded = !0, container.load(taroEnvModule), container.load(taroCanvasModule), container.load(taroWindowModule), loadPicker && loadMathPicker(container));
|
|
29967
29648
|
}
|
|
29968
29649
|
loadTaroEnv.__loaded = !1;
|
|
@@ -29999,7 +29680,7 @@
|
|
|
29999
29680
|
init() {
|
|
30000
29681
|
this._context = new WxContext2d(this, this._dpr);
|
|
30001
29682
|
}
|
|
30002
|
-
release() {}
|
|
29683
|
+
release(...params) {}
|
|
30003
29684
|
};
|
|
30004
29685
|
WxCanvas.env = "wx", WxCanvas = __decorate$s([injectable(), __metadata$n("design:paramtypes", [Object])], WxCanvas);
|
|
30005
29686
|
|
|
@@ -30272,7 +29953,7 @@
|
|
|
30272
29953
|
getDocument() {
|
|
30273
29954
|
return null;
|
|
30274
29955
|
}
|
|
30275
|
-
release() {}
|
|
29956
|
+
release(...params) {}
|
|
30276
29957
|
mapToCanvasPoint(event) {
|
|
30277
29958
|
var _a;
|
|
30278
29959
|
return null === (_a = null == event ? void 0 : event.type) || void 0 === _a || _a.startsWith("mouse"), event;
|
|
@@ -30284,8 +29965,7 @@
|
|
|
30284
29965
|
wxEnvModule._isWxBound || (wxEnvModule._isWxBound = !0, bind(WxEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(WxEnvContribution));
|
|
30285
29966
|
});
|
|
30286
29967
|
wxEnvModule._isWxBound = !1;
|
|
30287
|
-
function loadWxEnv(container) {
|
|
30288
|
-
let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
29968
|
+
function loadWxEnv(container, loadPicker = !0) {
|
|
30289
29969
|
loadWxEnv.__loaded || (loadWxEnv.__loaded = !0, container.load(wxEnvModule), container.load(wxCanvasModule), container.load(wxWindowModule), loadPicker && loadMathPicker(container));
|
|
30290
29970
|
}
|
|
30291
29971
|
loadWxEnv.__loaded = !1;
|
|
@@ -30294,7 +29974,7 @@
|
|
|
30294
29974
|
loadAllModule(container);
|
|
30295
29975
|
}
|
|
30296
29976
|
function loadAllModule(container) {
|
|
30297
|
-
loadAllModule.__loaded || (loadAllModule.__loaded = !0, loadBrowserEnv(container, !1), loadFeishuEnv(container, !1), loadLynxEnv(container, !1), loadNodeEnv(container), loadTaroEnv(container, !1), loadWxEnv(container, !1), loadCanvasPicker(container), vglobal.hooks.onSetEnv.tap("loadMathPicker", (lastEnv, env) => {
|
|
29977
|
+
loadAllModule.__loaded || (loadAllModule.__loaded = !0, loadBrowserEnv(container, !1), loadFeishuEnv(container, !1), loadLynxEnv(container, !1), loadNodeEnv(container, !1), loadTaroEnv(container, !1), loadWxEnv(container, !1), loadCanvasPicker(container), vglobal.hooks.onSetEnv.tap("loadMathPicker", (lastEnv, env) => {
|
|
30298
29978
|
"browser" !== env && loadMathPicker(container);
|
|
30299
29979
|
}));
|
|
30300
29980
|
}
|
|
@@ -30330,7 +30010,7 @@
|
|
|
30330
30010
|
init() {
|
|
30331
30011
|
this._context = new TTContext2d(this, this._dpr);
|
|
30332
30012
|
}
|
|
30333
|
-
release() {}
|
|
30013
|
+
release(...params) {}
|
|
30334
30014
|
};
|
|
30335
30015
|
TTCanvas.env = "tt", TTCanvas = __decorate$o([injectable(), __metadata$k("design:paramtypes", [Object])], TTCanvas);
|
|
30336
30016
|
|
|
@@ -30598,7 +30278,7 @@
|
|
|
30598
30278
|
getDocument() {
|
|
30599
30279
|
return null;
|
|
30600
30280
|
}
|
|
30601
|
-
release() {}
|
|
30281
|
+
release(...params) {}
|
|
30602
30282
|
mapToCanvasPoint(event) {
|
|
30603
30283
|
var _a;
|
|
30604
30284
|
return null === (_a = null == event ? void 0 : event.type) || void 0 === _a || _a.startsWith("mouse"), event;
|
|
@@ -30610,8 +30290,7 @@
|
|
|
30610
30290
|
ttEnvModule.isTTBound || (ttEnvModule.isTTBound = !0, bind(TTEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(TTEnvContribution));
|
|
30611
30291
|
});
|
|
30612
30292
|
ttEnvModule.isTTBound = !1;
|
|
30613
|
-
function loadTTEnv(container) {
|
|
30614
|
-
let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
30293
|
+
function loadTTEnv(container, loadPicker = !0) {
|
|
30615
30294
|
loadTTEnv.__loaded || (loadTTEnv.__loaded = !0, container.load(ttEnvModule), container.load(ttCanvasModule), container.load(ttWindowModule), loadPicker && loadMathPicker(container));
|
|
30616
30295
|
}
|
|
30617
30296
|
loadTTEnv.__loaded = !1;
|
|
@@ -30660,8 +30339,7 @@
|
|
|
30660
30339
|
_context.globalAlpha = strokeOpacity * opacity * this.baseGlobalAlpha, _context.lineWidth = keepStrokeScale ? lineWidth : getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, 0 === lineDash[0] && 0 === lineDash[1] || (lineDash && _context.setLineDash(lineDash), _context.lineDashOffset = lineDashOffset), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
|
|
30661
30340
|
}
|
|
30662
30341
|
}
|
|
30663
|
-
measureText(text) {
|
|
30664
|
-
let method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : application.global.measureTextMethod;
|
|
30342
|
+
measureText(text, method = application.global.measureTextMethod) {
|
|
30665
30343
|
this.setTransform(1, 0, 0, 1, 0, 0, !0, application.global.devicePixelRatio);
|
|
30666
30344
|
return super.measureText(text, method);
|
|
30667
30345
|
}
|
|
@@ -30721,7 +30399,7 @@
|
|
|
30721
30399
|
this._context = new HarmonyContext2d(this, this._dpr);
|
|
30722
30400
|
}
|
|
30723
30401
|
resize(width, height) {}
|
|
30724
|
-
release() {}
|
|
30402
|
+
release(...params) {}
|
|
30725
30403
|
};
|
|
30726
30404
|
HarmonyCanvas.env = "harmony", HarmonyCanvas = __decorate$k([injectable(), __metadata$h("design:paramtypes", [Object])], HarmonyCanvas);
|
|
30727
30405
|
|
|
@@ -30965,7 +30643,7 @@
|
|
|
30965
30643
|
getDocument() {
|
|
30966
30644
|
return null;
|
|
30967
30645
|
}
|
|
30968
|
-
release() {}
|
|
30646
|
+
release(...params) {}
|
|
30969
30647
|
};
|
|
30970
30648
|
HarmonyEnvContribution = __decorate$i([injectable(), __metadata$f("design:paramtypes", [])], HarmonyEnvContribution);
|
|
30971
30649
|
|
|
@@ -30973,8 +30651,7 @@
|
|
|
30973
30651
|
harmonyEnvModule.isHarmonyBound || (harmonyEnvModule.isHarmonyBound = !0, bind(HarmonyEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(HarmonyEnvContribution));
|
|
30974
30652
|
});
|
|
30975
30653
|
harmonyEnvModule.isHarmonyBound = !1;
|
|
30976
|
-
function loadHarmonyEnv(container) {
|
|
30977
|
-
let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
30654
|
+
function loadHarmonyEnv(container, loadPicker = !0) {
|
|
30978
30655
|
loadHarmonyEnv.__loaded || (loadHarmonyEnv.__loaded = !0, container.load(harmonyEnvModule), container.load(harmonyCanvasModule), container.load(harmonyWindowModule), loadPicker && loadMathPicker(container));
|
|
30979
30656
|
}
|
|
30980
30657
|
loadHarmonyEnv.__loaded = !1;
|
|
@@ -31631,65 +31308,48 @@
|
|
|
31631
31308
|
_registerText.__loaded = !1;
|
|
31632
31309
|
const registerText = _registerText;
|
|
31633
31310
|
|
|
31634
|
-
function pseudoRandom(n) {
|
|
31635
|
-
let seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
31311
|
+
function pseudoRandom(n, seed = 0) {
|
|
31636
31312
|
let hash = 3735928559 ^ seed;
|
|
31637
31313
|
return hash = (2654435769 ^ hash) + (hash << 6) + (hash >> 2), hash = 3432918353 * (hash ^ n), hash = hash << 15 | hash >>> 17, hash ^= hash << 25, hash += hash << 9, hash ^= hash >> 4, hash ^= hash << 18, hash |= 1, (hash >>> 0) % 2147483647 / 2147483647;
|
|
31638
31314
|
}
|
|
31639
|
-
function randomOpacity(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31640
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31641
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31315
|
+
function randomOpacity(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
31642
31316
|
const targetRandomValue = 2 * pseudoRandom(row * columnCount + column) * Math.PI,
|
|
31643
31317
|
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI + targetRandomValue) + 1) / 2;
|
|
31644
31318
|
return Math.min(1, Math.max(0, _r));
|
|
31645
31319
|
}
|
|
31646
|
-
function columnLeftToRight(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31647
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31648
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31320
|
+
function columnLeftToRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
31649
31321
|
const delay = column / columnCount,
|
|
31650
31322
|
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
31651
31323
|
return Math.min(1, Math.max(0, _r));
|
|
31652
31324
|
}
|
|
31653
|
-
function columnRightToLeft(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31654
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31655
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31325
|
+
function columnRightToLeft(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
31656
31326
|
const delay = (columnCount - 1 - column) / columnCount,
|
|
31657
31327
|
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
31658
31328
|
return Math.min(1, Math.max(0, _r));
|
|
31659
31329
|
}
|
|
31660
|
-
function rowTopToBottom(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31661
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31662
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31330
|
+
function rowTopToBottom(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
31663
31331
|
const delay = row / rowCount,
|
|
31664
31332
|
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
31665
31333
|
return Math.min(1, Math.max(0, _r));
|
|
31666
31334
|
}
|
|
31667
|
-
function rowBottomToTop(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31668
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31669
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31335
|
+
function rowBottomToTop(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
31670
31336
|
const delay = (rowCount - 1 - row) / rowCount,
|
|
31671
31337
|
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
31672
31338
|
return Math.min(1, Math.max(0, _r));
|
|
31673
31339
|
}
|
|
31674
|
-
function diagonalCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31675
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31676
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31340
|
+
function diagonalCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
31677
31341
|
const centerRow = rowCount / 2,
|
|
31678
31342
|
centerCol = columnCount / 2,
|
|
31679
31343
|
distance = Math.sqrt(Math.pow((row - centerRow) / rowCount, 2) + Math.pow((column - centerCol) / columnCount, 2)),
|
|
31680
31344
|
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
31681
31345
|
return Math.min(1, Math.max(0, _r));
|
|
31682
31346
|
}
|
|
31683
|
-
function diagonalTopLeftToBottomRight(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31684
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31685
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31347
|
+
function diagonalTopLeftToBottomRight(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
31686
31348
|
const delay = (row / rowCount + column / columnCount) / 2,
|
|
31687
31349
|
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
31688
31350
|
return Math.min(1, Math.max(0, _r));
|
|
31689
31351
|
}
|
|
31690
|
-
function rotationScan(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31691
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31692
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31352
|
+
function rotationScan(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
31693
31353
|
const centerRow = rowCount / 2,
|
|
31694
31354
|
centerCol = columnCount / 2,
|
|
31695
31355
|
angle = Math.atan2(row - centerRow, column - centerCol),
|
|
@@ -31697,33 +31357,25 @@
|
|
|
31697
31357
|
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * delay * Math.PI) + 1) / 2;
|
|
31698
31358
|
return Math.min(1, Math.max(0, _r));
|
|
31699
31359
|
}
|
|
31700
|
-
function rippleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31701
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31702
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31360
|
+
function rippleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
31703
31361
|
const centerRow = rowCount / 2,
|
|
31704
31362
|
centerCol = columnCount / 2,
|
|
31705
31363
|
normalizedDistance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)) / Math.sqrt(Math.pow(rowCount / 2, 2) + Math.pow(columnCount / 2, 2)),
|
|
31706
31364
|
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI * 3 - 2 * normalizedDistance * Math.PI) + 1) / 2;
|
|
31707
31365
|
return Math.min(1, Math.max(0, _r));
|
|
31708
31366
|
}
|
|
31709
|
-
function snakeWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31710
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31711
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31367
|
+
function snakeWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
31712
31368
|
const delay = (row + column) % (rowCount + columnCount) / (rowCount + columnCount),
|
|
31713
31369
|
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
|
|
31714
31370
|
return Math.min(1, Math.max(0, _r));
|
|
31715
31371
|
}
|
|
31716
|
-
function alternatingWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31717
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31718
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31372
|
+
function alternatingWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
31719
31373
|
const rowPhase = row / rowCount,
|
|
31720
31374
|
colPhase = column / columnCount,
|
|
31721
31375
|
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * rowPhase * Math.PI) * Math.sin(2 * ratio * Math.PI - 2 * colPhase * Math.PI) + 1) / 2;
|
|
31722
31376
|
return Math.min(1, Math.max(0, _r));
|
|
31723
31377
|
}
|
|
31724
|
-
function spiralEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31725
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31726
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31378
|
+
function spiralEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
31727
31379
|
const centerRow = rowCount / 2,
|
|
31728
31380
|
centerCol = columnCount / 2,
|
|
31729
31381
|
distance = Math.sqrt(Math.pow(row - centerRow, 2) + Math.pow(column - centerCol, 2)),
|
|
@@ -31732,41 +31384,31 @@
|
|
|
31732
31384
|
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 4 * delay * Math.PI) + 1) / 2;
|
|
31733
31385
|
return Math.min(1, Math.max(0, _r));
|
|
31734
31386
|
}
|
|
31735
|
-
function columnCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31736
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31737
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31387
|
+
function columnCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
31738
31388
|
const centerCol = columnCount / 2,
|
|
31739
31389
|
distance = Math.abs(column - centerCol) / centerCol,
|
|
31740
31390
|
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
31741
31391
|
return Math.min(1, Math.max(0, _r));
|
|
31742
31392
|
}
|
|
31743
|
-
function columnEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31744
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31745
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31393
|
+
function columnEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
31746
31394
|
const centerCol = columnCount / 2,
|
|
31747
31395
|
distance = 1 - Math.abs(column - centerCol) / centerCol,
|
|
31748
31396
|
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
31749
31397
|
return Math.min(1, Math.max(0, _r));
|
|
31750
31398
|
}
|
|
31751
|
-
function rowCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31752
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31753
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31399
|
+
function rowCenterToEdge(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
31754
31400
|
const centerRow = rowCount / 2,
|
|
31755
31401
|
distance = Math.abs(row - centerRow) / centerRow,
|
|
31756
31402
|
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
31757
31403
|
return Math.min(1, Math.max(0, _r));
|
|
31758
31404
|
}
|
|
31759
|
-
function rowEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31760
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31761
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31405
|
+
function rowEdgeToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
31762
31406
|
const centerRow = rowCount / 2,
|
|
31763
31407
|
distance = 1 - Math.abs(row - centerRow) / centerRow,
|
|
31764
31408
|
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * distance * Math.PI) + 1) / 2;
|
|
31765
31409
|
return Math.min(1, Math.max(0, _r));
|
|
31766
31410
|
}
|
|
31767
|
-
function cornerToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31768
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31769
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31411
|
+
function cornerToCenter(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
31770
31412
|
const centerRow = rowCount / 2,
|
|
31771
31413
|
centerCol = columnCount / 2,
|
|
31772
31414
|
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
@@ -31774,9 +31416,7 @@
|
|
|
31774
31416
|
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
|
|
31775
31417
|
return Math.min(1, Math.max(0, _r));
|
|
31776
31418
|
}
|
|
31777
|
-
function centerToCorner(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31778
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31779
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31419
|
+
function centerToCorner(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
31780
31420
|
const centerRow = rowCount / 2,
|
|
31781
31421
|
centerCol = columnCount / 2,
|
|
31782
31422
|
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
@@ -31784,9 +31424,7 @@
|
|
|
31784
31424
|
_r = minRatio + amplitude * (Math.sin(2 * ratio * Math.PI - 2 * normalizedDistance * Math.PI) + 1) / 2;
|
|
31785
31425
|
return Math.min(1, Math.max(0, _r));
|
|
31786
31426
|
}
|
|
31787
|
-
function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31788
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31789
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31427
|
+
function pulseWave(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
31790
31428
|
const centerRow = rowCount / 2,
|
|
31791
31429
|
centerCol = columnCount / 2,
|
|
31792
31430
|
distance = Math.sqrt(Math.pow((row - centerRow) / centerRow, 2) + Math.pow((column - centerCol) / centerCol, 2)),
|
|
@@ -31796,9 +31434,7 @@
|
|
|
31796
31434
|
_r = minRatio + amplitude * ((Math.sin(wavePhase - 4 * normalizedDistance * Math.PI) + 1) / 2) * (.7 * decay + .3);
|
|
31797
31435
|
return Math.min(1, Math.max(0, _r));
|
|
31798
31436
|
}
|
|
31799
|
-
function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic) {
|
|
31800
|
-
let minRatio = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
|
|
31801
|
-
let amplitude = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 1;
|
|
31437
|
+
function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic, minRatio = 0, amplitude = 1) {
|
|
31802
31438
|
const index = row * columnCount + column,
|
|
31803
31439
|
phase = 2 * pseudoRandom(index, 0) * Math.PI,
|
|
31804
31440
|
speed = .5 * pseudoRandom(index, 1) + .5,
|
|
@@ -31941,8 +31577,7 @@
|
|
|
31941
31577
|
}), this._clearDragEvents();
|
|
31942
31578
|
};
|
|
31943
31579
|
}
|
|
31944
|
-
setScrollRange(range) {
|
|
31945
|
-
let render = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
31580
|
+
setScrollRange(range, render = !0) {
|
|
31946
31581
|
const {
|
|
31947
31582
|
direction = "horizontal",
|
|
31948
31583
|
limitRange = [0, 1],
|
|
@@ -32445,8 +32080,7 @@
|
|
|
32445
32080
|
getTextBounds: useNaiveCanvas ? void 0 : getTextBounds,
|
|
32446
32081
|
specialCharSet: "-/: .,@%'\"~" + TextMeasure.ALPHABET_CHAR_SET + TextMeasure.ALPHABET_CHAR_SET.toUpperCase()
|
|
32447
32082
|
}, null != option ? option : {}), textSpec);
|
|
32448
|
-
function measureTextSize(text, textSpec) {
|
|
32449
|
-
let defaultTextTheme = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
32083
|
+
function measureTextSize(text, textSpec, defaultTextTheme = {}) {
|
|
32450
32084
|
if (!text) return {
|
|
32451
32085
|
width: 0,
|
|
32452
32086
|
height: 0
|
|
@@ -32467,12 +32101,10 @@
|
|
|
32467
32101
|
height: bounds.height()
|
|
32468
32102
|
};
|
|
32469
32103
|
}
|
|
32470
|
-
function isRichText(attributes) {
|
|
32471
|
-
let typeKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "type";
|
|
32104
|
+
function isRichText(attributes, typeKey = "type") {
|
|
32472
32105
|
return "rich" === getTextType(attributes, typeKey);
|
|
32473
32106
|
}
|
|
32474
|
-
function getTextType(attributes) {
|
|
32475
|
-
let typeKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "type";
|
|
32107
|
+
function getTextType(attributes, typeKey = "type") {
|
|
32476
32108
|
var _a, _b;
|
|
32477
32109
|
return isObject$2(attributes.text) && "type" in attributes.text ? null !== (_a = attributes.text.type) && void 0 !== _a ? _a : "text" : typeKey in attributes && null !== (_b = attributes[typeKey]) && void 0 !== _b ? _b : "text";
|
|
32478
32110
|
}
|
|
@@ -32500,8 +32132,7 @@
|
|
|
32500
32132
|
} = text;
|
|
32501
32133
|
return attributes.react = react, attributes.text = _originText, attributes.renderable = !1, attributes;
|
|
32502
32134
|
}
|
|
32503
|
-
function createTextGraphicByType(textAttributes) {
|
|
32504
|
-
let typeKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "type";
|
|
32135
|
+
function createTextGraphicByType(textAttributes, typeKey = "type") {
|
|
32505
32136
|
const textType = getTextType(textAttributes, typeKey);
|
|
32506
32137
|
return "rich" === textType ? graphicCreator.richtext(richTextAttributeTransform(textAttributes)) : ("html" === textType ? textAttributes = htmlAttributeTransform(textAttributes) : "react" === textType && (textAttributes = reactAttributeTransform(textAttributes)), graphicCreator.text(textAttributes));
|
|
32507
32138
|
}
|
|
@@ -33920,14 +33551,12 @@
|
|
|
33920
33551
|
return (null === (_a = item1.OBBBounds) || void 0 === _a ? void 0 : _a.empty()) || (null === (_b = item2.OBBBounds) || void 0 === _b ? void 0 : _b.empty()) ? isRectIntersect(item1.AABBBounds, item2.AABBBounds, !1) && (!item1.rotatedBounds || !item2.rotatedBounds || isRotateAABBIntersect(item1.rotatedBounds, item2.rotatedBounds, !0)) : item1.OBBBounds.intersects(item2.OBBBounds);
|
|
33921
33552
|
}
|
|
33922
33553
|
const DELTA_ANGLE = Math.sin(Math.PI / 10);
|
|
33923
|
-
function isAngleVertical(angle) {
|
|
33924
|
-
let delta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DELTA_ANGLE;
|
|
33554
|
+
function isAngleVertical(angle, delta = DELTA_ANGLE) {
|
|
33925
33555
|
const hasAngle = !isNil$1(angle) && 0 !== angle,
|
|
33926
33556
|
cos = hasAngle ? Math.cos(angle) : 1;
|
|
33927
33557
|
return hasAngle && Math.abs(cos) <= delta;
|
|
33928
33558
|
}
|
|
33929
|
-
function isAngleHorizontal(angle) {
|
|
33930
|
-
let delta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DELTA_ANGLE;
|
|
33559
|
+
function isAngleHorizontal(angle, delta = DELTA_ANGLE) {
|
|
33931
33560
|
const hasAngle = !isNil$1(angle) && 0 !== angle,
|
|
33932
33561
|
sin = hasAngle ? Math.sin(angle) : 0;
|
|
33933
33562
|
return !hasAngle || Math.abs(sin) <= delta;
|
|
@@ -33939,8 +33568,7 @@
|
|
|
33939
33568
|
y: tickPosition.y + tickVector[1]
|
|
33940
33569
|
};
|
|
33941
33570
|
}
|
|
33942
|
-
function getAxisBreakSymbolAttrs() {
|
|
33943
|
-
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
33571
|
+
function getAxisBreakSymbolAttrs(props = {}) {
|
|
33944
33572
|
var _a, _b;
|
|
33945
33573
|
const {
|
|
33946
33574
|
style = {},
|
|
@@ -33965,9 +33593,7 @@
|
|
|
33965
33593
|
y: point.y + vector[1]
|
|
33966
33594
|
};
|
|
33967
33595
|
}
|
|
33968
|
-
function getCircleVerticalVector(offset, point, center) {
|
|
33969
|
-
let inside = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
|
|
33970
|
-
let axisInside = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
|
|
33596
|
+
function getCircleVerticalVector(offset, point, center, inside = !1, axisInside = !1) {
|
|
33971
33597
|
const vector = [point.x - center.x, point.y - center.y];
|
|
33972
33598
|
return scale(vector, (inside ? -1 : 1) * (axisInside ? -1 : 1) * offset / length(vector));
|
|
33973
33599
|
}
|
|
@@ -34351,8 +33977,7 @@
|
|
|
34351
33977
|
function reset$1(items) {
|
|
34352
33978
|
return items.forEach(item => item.setAttribute("opacity", 1)), items;
|
|
34353
33979
|
}
|
|
34354
|
-
function forceItemVisible$1(sourceItem, items, check, comparator) {
|
|
34355
|
-
let inverse = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
|
|
33980
|
+
function forceItemVisible$1(sourceItem, items, check, comparator, inverse = !1) {
|
|
34356
33981
|
if (check && !sourceItem.attribute.opacity) {
|
|
34357
33982
|
const remainLength = items.length;
|
|
34358
33983
|
if (remainLength > 1) {
|
|
@@ -34380,10 +34005,7 @@
|
|
|
34380
34005
|
do {
|
|
34381
34006
|
items = reduce(items, sep);
|
|
34382
34007
|
} while (items.length >= 3 && hasOverlap$1(items, sep));
|
|
34383
|
-
const shouldCheck =
|
|
34384
|
-
let checkLength = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
34385
|
-
return checkLength && length < 3 || visibility;
|
|
34386
|
-
},
|
|
34008
|
+
const shouldCheck = (length, visibility, checkLength = !0) => checkLength && length < 3 || visibility,
|
|
34387
34009
|
checkFirst = shouldCheck(items.length, config.firstVisible, !1);
|
|
34388
34010
|
let checkLast = shouldCheck(items.length, config.lastVisible);
|
|
34389
34011
|
const firstSourceItem = source[0],
|
|
@@ -34418,8 +34040,7 @@
|
|
|
34418
34040
|
function tryRotate(orient, items) {
|
|
34419
34041
|
"bottom" !== orient && "top" !== orient || rotateXAxis(orient, items), "left" !== orient && "right" !== orient || rotateYAxis(orient, items), genRotateBounds(items);
|
|
34420
34042
|
}
|
|
34421
|
-
function clampAngle() {
|
|
34422
|
-
let angle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
34043
|
+
function clampAngle(angle = 0) {
|
|
34423
34044
|
if (angle < 0) for (; angle < 0;) angle += 2 * Math.PI;
|
|
34424
34045
|
if (angle > 0) for (; angle >= 2 * Math.PI;) angle -= 2 * Math.PI;
|
|
34425
34046
|
return angle;
|
|
@@ -34438,8 +34059,7 @@
|
|
|
34438
34059
|
}));
|
|
34439
34060
|
});
|
|
34440
34061
|
}
|
|
34441
|
-
function getXAxisLabelAlign(orient) {
|
|
34442
|
-
let angle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
34062
|
+
function getXAxisLabelAlign(orient, angle = 0) {
|
|
34443
34063
|
let align = ["center", "left", "left", "left", "center", "right", "right", "right", "left"],
|
|
34444
34064
|
baseline = ["top", "top", "middle", "bottom", "bottom", "bottom", "middle", "top", "top"];
|
|
34445
34065
|
"top" === orient && (align = ["center", "right", "right", "right", "center", "left", "left", "left", "right"], baseline = ["bottom", "bottom", "middle", "top", "top", "top", "middle", "bottom", "bottom"]);
|
|
@@ -34450,8 +34070,7 @@
|
|
|
34450
34070
|
textBaseline: baseline[index]
|
|
34451
34071
|
};
|
|
34452
34072
|
}
|
|
34453
|
-
function getYAxisLabelAlign(orient) {
|
|
34454
|
-
let angle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
34073
|
+
function getYAxisLabelAlign(orient, angle = 0) {
|
|
34455
34074
|
let align = ["right", "right", "center", "left", "left", "left", "center", "right", "right"],
|
|
34456
34075
|
baseline = ["middle", "middle", "top", "top", "middle", "middle", "bottom", "bottom", "middle"];
|
|
34457
34076
|
"right" === orient && (align = ["left", "left", "center", "right", "right", "right", "center", "left", "left"], baseline = ["middle", "middle", "bottom", "bottom", "middle", "middle", "top", "middle", "middle"]);
|
|
@@ -34629,8 +34248,7 @@
|
|
|
34629
34248
|
} = this.attribute;
|
|
34630
34249
|
return [end.x - start.x, end.y - start.y];
|
|
34631
34250
|
}
|
|
34632
|
-
getVerticalVector(offset) {
|
|
34633
|
-
let inside = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
34251
|
+
getVerticalVector(offset, inside = !1, point) {
|
|
34634
34252
|
const {
|
|
34635
34253
|
verticalFactor = 1
|
|
34636
34254
|
} = this.attribute,
|
|
@@ -35086,9 +34704,7 @@
|
|
|
35086
34704
|
} = this.attribute;
|
|
35087
34705
|
return polarToCartesian(center, inside && innerRadius > 0 ? innerRadius : radius, startAngle + (endAngle - startAngle) * tickValue);
|
|
35088
34706
|
}
|
|
35089
|
-
getVerticalVector(offset) {
|
|
35090
|
-
let inside = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
35091
|
-
let point = arguments.length > 2 ? arguments[2] : undefined;
|
|
34707
|
+
getVerticalVector(offset, inside = !1, point) {
|
|
35092
34708
|
return getCircleVerticalVector(offset, point, this.attribute.center, inside, this.attribute.inside);
|
|
35093
34709
|
}
|
|
35094
34710
|
getRelativeVector(point) {
|
|
@@ -35337,7 +34953,31 @@
|
|
|
35337
34953
|
separation: autoHideSeparation
|
|
35338
34954
|
}));
|
|
35339
34955
|
}
|
|
35340
|
-
afterLabelsOverlap(labelShapes, labelData, labelContainer, layer, layerCount) {
|
|
34956
|
+
afterLabelsOverlap(labelShapes, labelData, labelContainer, layer, layerCount) {
|
|
34957
|
+
var _a;
|
|
34958
|
+
const {
|
|
34959
|
+
layoutRect: layoutRect,
|
|
34960
|
+
autoLabelMaxWidth: autoLabelMaxWidth
|
|
34961
|
+
} = this.attribute;
|
|
34962
|
+
if (!autoLabelMaxWidth || !layoutRect || !labelShapes || 0 === labelShapes.length) return;
|
|
34963
|
+
const rectRight = 0 + layoutRect.width;
|
|
34964
|
+
for (let i = 0; i < labelShapes.length; i++) {
|
|
34965
|
+
const label = labelShapes[i],
|
|
34966
|
+
x = label.attribute.x,
|
|
34967
|
+
align = null !== (_a = label.attribute.textAlign) && void 0 !== _a ? _a : "center";
|
|
34968
|
+
let maxWidth = 0;
|
|
34969
|
+
if ("left" === align) maxWidth = rectRight - x;else if ("right" === align) maxWidth = x - 0;else {
|
|
34970
|
+
const leftDist = x - 0,
|
|
34971
|
+
rightDist = rectRight - x;
|
|
34972
|
+
maxWidth = 2 * Math.max(0, Math.min(leftDist, rightDist));
|
|
34973
|
+
}
|
|
34974
|
+
maxWidth > 0 ? label.setAttributes({
|
|
34975
|
+
maxLineWidth: maxWidth
|
|
34976
|
+
}) : label.setAttributes({
|
|
34977
|
+
maxLineWidth: 0
|
|
34978
|
+
});
|
|
34979
|
+
}
|
|
34980
|
+
}
|
|
35341
34981
|
getTextBaseline(vector) {
|
|
35342
34982
|
return Math.abs(vector[1] / vector[0]) < .3 ? "middle" : vector[1] < 0 ? "bottom" : vector[1] > 0 ? "top" : "middle";
|
|
35343
34983
|
}
|
|
@@ -35433,8 +35073,7 @@
|
|
|
35433
35073
|
index: index,
|
|
35434
35074
|
value: t
|
|
35435
35075
|
}));
|
|
35436
|
-
const labelOverlap =
|
|
35437
|
-
let gap = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
35076
|
+
const labelOverlap = (prevLabel, nextLabel, gap = 0) => {
|
|
35438
35077
|
const prevBounds = new AABBBounds(prevLabel).expand(gap / 2),
|
|
35439
35078
|
nextBounds = new AABBBounds(nextLabel).expand(gap / 2);
|
|
35440
35079
|
return prevBounds.intersects(nextBounds);
|
|
@@ -35587,8 +35226,7 @@
|
|
|
35587
35226
|
x1 = newDomain[endIndex];
|
|
35588
35227
|
return x1 < x0 && ([startIndex, endIndex] = [endIndex, startIndex], [x0, x1] = [x1, x0]), newDomain[startIndex] = options.floor(x0), newDomain[endIndex] = options.ceil(x1), newDomain;
|
|
35589
35228
|
};
|
|
35590
|
-
const niceNumber =
|
|
35591
|
-
let round = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
35229
|
+
const niceNumber = (value, round = !1) => {
|
|
35592
35230
|
const exponent = Math.floor(Math.log10(value)),
|
|
35593
35231
|
fraction = value / Math.pow(10, exponent);
|
|
35594
35232
|
let niceFraction;
|
|
@@ -35832,22 +35470,19 @@
|
|
|
35832
35470
|
rangeRound(_, slience) {
|
|
35833
35471
|
return this._range = [toNumber(_[0]), toNumber(_[1])], this._round = !0, this.rescale(slience);
|
|
35834
35472
|
}
|
|
35835
|
-
ticks() {
|
|
35836
|
-
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
35473
|
+
ticks(count = 10) {
|
|
35837
35474
|
const d = this.calculateVisibleDomain(this._range);
|
|
35838
35475
|
if (-1 === count) return d;
|
|
35839
35476
|
return ticks$1(0, d.length - 1, count, !1).map(i => d[i]);
|
|
35840
35477
|
}
|
|
35841
|
-
tickData() {
|
|
35842
|
-
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
35478
|
+
tickData(count = 10) {
|
|
35843
35479
|
return this.ticks(count).map((tick, index) => ({
|
|
35844
35480
|
index: index,
|
|
35845
35481
|
tick: tick,
|
|
35846
35482
|
value: (this.scale(tick) - this._range[0] + this._bandwidth / 2) / (this._range[1] - this._range[0])
|
|
35847
35483
|
}));
|
|
35848
35484
|
}
|
|
35849
|
-
forceTicks() {
|
|
35850
|
-
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
35485
|
+
forceTicks(count = 10) {
|
|
35851
35486
|
const d = this.calculateVisibleDomain(this._range);
|
|
35852
35487
|
return ticks$1(0, d.length - 1, count, !0).filter(i => i < d.length).map(i => d[i]);
|
|
35853
35488
|
}
|
|
@@ -35943,9 +35578,7 @@
|
|
|
35943
35578
|
}
|
|
35944
35579
|
|
|
35945
35580
|
class ContinuousScale extends BaseScale {
|
|
35946
|
-
constructor() {
|
|
35947
|
-
let transformer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : identity;
|
|
35948
|
-
let untransformer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : identity;
|
|
35581
|
+
constructor(transformer = identity, untransformer = identity) {
|
|
35949
35582
|
super(), this._unknown = void 0, this.transformer = transformer, this.untransformer = untransformer, this._forceAlign = !0, this._domain = [0, 1], this._range = [0, 1], this._clamp = identity, this._piecewise = bimap, this._interpolate = interpolate;
|
|
35950
35583
|
}
|
|
35951
35584
|
calculateVisibleDomain(range) {
|
|
@@ -36007,11 +35640,10 @@
|
|
|
36007
35640
|
interpolate(_, slience) {
|
|
36008
35641
|
return arguments.length ? (this._interpolate = _, this.rescale(slience)) : this._interpolate;
|
|
36009
35642
|
}
|
|
36010
|
-
ticks() {
|
|
35643
|
+
ticks(count = 10) {
|
|
36011
35644
|
return [];
|
|
36012
35645
|
}
|
|
36013
|
-
tickData() {
|
|
36014
|
-
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
35646
|
+
tickData(count = 10) {
|
|
36015
35647
|
const ticks = this.ticks(count);
|
|
36016
35648
|
return (null != ticks ? ticks : []).map((tick, index) => ({
|
|
36017
35649
|
index: index,
|
|
@@ -36165,8 +35797,7 @@
|
|
|
36165
35797
|
for (; ++i < count;) ticks[i] = start + i * step;
|
|
36166
35798
|
return reverse && ticks.reverse(), ticks;
|
|
36167
35799
|
}
|
|
36168
|
-
function niceLinear(d) {
|
|
36169
|
-
let count = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
|
|
35800
|
+
function niceLinear(d, count = 10) {
|
|
36170
35801
|
let prestep,
|
|
36171
35802
|
step,
|
|
36172
35803
|
i0 = 0,
|
|
@@ -36253,15 +35884,11 @@
|
|
|
36253
35884
|
tickFormat() {
|
|
36254
35885
|
return () => {};
|
|
36255
35886
|
}
|
|
36256
|
-
d3Ticks() {
|
|
36257
|
-
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
36258
|
-
let options = arguments.length > 1 ? arguments[1] : undefined;
|
|
35887
|
+
d3Ticks(count = 10, options) {
|
|
36259
35888
|
const d = this.calculateVisibleDomain(this._range);
|
|
36260
35889
|
return d3Ticks(d[0], d[d.length - 1], count, options);
|
|
36261
35890
|
}
|
|
36262
|
-
ticks() {
|
|
36263
|
-
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
36264
|
-
let options = arguments.length > 1 ? arguments[1] : undefined;
|
|
35891
|
+
ticks(count = 10, options) {
|
|
36265
35892
|
var _a;
|
|
36266
35893
|
if (isFunction$1(null == options ? void 0 : options.customTicks)) return options.customTicks(this, count);
|
|
36267
35894
|
if (isValid$1(this._rangeFactorStart) && isValid$1(this._rangeFactorEnd) && (this._rangeFactorStart > 0 || this._rangeFactorEnd < 1) && 2 === this._range.length || !this._niceType) return this.d3Ticks(count, options);
|
|
@@ -36281,8 +35908,7 @@
|
|
|
36281
35908
|
}
|
|
36282
35909
|
return ticksResult;
|
|
36283
35910
|
}
|
|
36284
|
-
forceTicks() {
|
|
36285
|
-
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
35911
|
+
forceTicks(count = 10) {
|
|
36286
35912
|
const d = this.calculateVisibleDomain(this._range);
|
|
36287
35913
|
return forceTicks(d[0], d[d.length - 1], count);
|
|
36288
35914
|
}
|
|
@@ -36290,9 +35916,7 @@
|
|
|
36290
35916
|
const d = this.calculateVisibleDomain(this._range);
|
|
36291
35917
|
return stepTicks(d[0], d[d.length - 1], step);
|
|
36292
35918
|
}
|
|
36293
|
-
nice() {
|
|
36294
|
-
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
36295
|
-
let option = arguments.length > 1 ? arguments[1] : undefined;
|
|
35919
|
+
nice(count = 10, option) {
|
|
36296
35920
|
var _a, _b;
|
|
36297
35921
|
const originalDomain = this._domain;
|
|
36298
35922
|
let niceMinMax = [];
|
|
@@ -36306,15 +35930,13 @@
|
|
|
36306
35930
|
}
|
|
36307
35931
|
return this;
|
|
36308
35932
|
}
|
|
36309
|
-
niceMin() {
|
|
36310
|
-
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
35933
|
+
niceMin(count = 10) {
|
|
36311
35934
|
this._niceType = "min";
|
|
36312
35935
|
const maxD = this._domain[this._domain.length - 1],
|
|
36313
35936
|
niceDomain = niceLinear(this.domain(), count);
|
|
36314
35937
|
return niceDomain && (niceDomain[niceDomain.length - 1] = maxD, this._niceDomain = niceDomain, this.rescale()), this;
|
|
36315
35938
|
}
|
|
36316
|
-
niceMax() {
|
|
36317
|
-
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
35939
|
+
niceMax(count = 10) {
|
|
36318
35940
|
this._niceType = "max";
|
|
36319
35941
|
const minD = this._domain[0],
|
|
36320
35942
|
niceDomain = niceLinear(this._domain.slice(), count);
|
|
@@ -36323,8 +35945,7 @@
|
|
|
36323
35945
|
}
|
|
36324
35946
|
|
|
36325
35947
|
class LogNiceMixin {
|
|
36326
|
-
nice() {
|
|
36327
|
-
let option = arguments.length > 1 ? arguments[1] : undefined;
|
|
35948
|
+
nice(count = 10, option) {
|
|
36328
35949
|
var _b, _c, _d, _e;
|
|
36329
35950
|
const originalDomain = this._domain;
|
|
36330
35951
|
let niceMinMax = [],
|
|
@@ -36359,12 +35980,10 @@
|
|
|
36359
35980
|
function reflect(f) {
|
|
36360
35981
|
return x => -f(-x);
|
|
36361
35982
|
}
|
|
36362
|
-
function limitPositiveZero() {
|
|
36363
|
-
let min = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Number.EPSILON;
|
|
35983
|
+
function limitPositiveZero(min = Number.EPSILON) {
|
|
36364
35984
|
return x => Math.max(x, min);
|
|
36365
35985
|
}
|
|
36366
|
-
function limitNegativeZero() {
|
|
36367
|
-
let min = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Number.EPSILON;
|
|
35986
|
+
function limitNegativeZero(min = Number.EPSILON) {
|
|
36368
35987
|
return x => Math.min(x, -min);
|
|
36369
35988
|
}
|
|
36370
35989
|
class LogScale extends ContinuousScale {
|
|
@@ -36395,21 +36014,17 @@
|
|
|
36395
36014
|
tickFormat() {
|
|
36396
36015
|
return identity;
|
|
36397
36016
|
}
|
|
36398
|
-
d3Ticks() {
|
|
36399
|
-
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
36400
|
-
let options = arguments.length > 1 ? arguments[1] : undefined;
|
|
36017
|
+
d3Ticks(count = 10, options) {
|
|
36401
36018
|
const d = this.domain(),
|
|
36402
36019
|
u = this._limit(d[0]),
|
|
36403
36020
|
v = this._limit(d[d.length - 1]);
|
|
36404
36021
|
return d3TicksForLog(u, v, count, this._base, this.transformer, this.untransformer, options);
|
|
36405
36022
|
}
|
|
36406
|
-
ticks() {
|
|
36407
|
-
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
36023
|
+
ticks(count = 10) {
|
|
36408
36024
|
const d = this.calculateVisibleDomain(this._range);
|
|
36409
36025
|
return ticksBaseTransform(this._limit(d[0]), this._limit(d[d.length - 1]), count, this._base, this.transformer, this.untransformer);
|
|
36410
36026
|
}
|
|
36411
|
-
forceTicks() {
|
|
36412
|
-
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
36027
|
+
forceTicks(count = 10) {
|
|
36413
36028
|
const d = this.calculateVisibleDomain(this._range);
|
|
36414
36029
|
return forceTicksBaseTransform(d[0], d[d.length - 1], count, this.transformer, this.untransformer);
|
|
36415
36030
|
}
|
|
@@ -36451,21 +36066,17 @@
|
|
|
36451
36066
|
constant(_, slience) {
|
|
36452
36067
|
return arguments.length ? (this._const = _, this.transformer = symlog(_), this.untransformer = symexp(_), this.rescale(slience)) : this._const;
|
|
36453
36068
|
}
|
|
36454
|
-
d3Ticks() {
|
|
36455
|
-
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
36456
|
-
let options = arguments.length > 1 ? arguments[1] : undefined;
|
|
36069
|
+
d3Ticks(count = 10, options) {
|
|
36457
36070
|
const d = this.domain(),
|
|
36458
36071
|
u = d[0],
|
|
36459
36072
|
v = d[d.length - 1];
|
|
36460
36073
|
return d3TicksForLog(u, v, count, this._const, this.transformer, this.untransformer, options);
|
|
36461
36074
|
}
|
|
36462
|
-
ticks() {
|
|
36463
|
-
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
36075
|
+
ticks(count = 10) {
|
|
36464
36076
|
const d = this.calculateVisibleDomain(this._range);
|
|
36465
36077
|
return ticksBaseTransform(d[0], d[d.length - 1], count, this._const, this.transformer, this.untransformer);
|
|
36466
36078
|
}
|
|
36467
|
-
forceTicks() {
|
|
36468
|
-
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
36079
|
+
forceTicks(count = 10) {
|
|
36469
36080
|
const d = this.calculateVisibleDomain(this._range);
|
|
36470
36081
|
return forceTicksBaseTransform(d[0], d[d.length - 1], count, this.transformer, this.untransformer);
|
|
36471
36082
|
}
|
|
@@ -36521,8 +36132,7 @@
|
|
|
36521
36132
|
} else scaleTicks = getTicks(count);
|
|
36522
36133
|
return scaleTicks;
|
|
36523
36134
|
}
|
|
36524
|
-
function forceItemVisible(sourceItem, items, check, comparator) {
|
|
36525
|
-
let inverse = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
|
|
36135
|
+
function forceItemVisible(sourceItem, items, check, comparator, inverse = !1) {
|
|
36526
36136
|
if (check && !items.includes(sourceItem)) {
|
|
36527
36137
|
let remainLength = items.length;
|
|
36528
36138
|
if (remainLength > 1) {
|
|
@@ -36624,10 +36234,7 @@
|
|
|
36624
36234
|
const labelBoundsList = getCartesianLabelBounds(scale, domain, op);
|
|
36625
36235
|
return labelBoundsList && labelBoundsList.map(bounds => isHorizontal ? [bounds.x1, bounds.x2, bounds.width()] : [bounds.y1, bounds.y2, bounds.height()]);
|
|
36626
36236
|
},
|
|
36627
|
-
boundsOverlap =
|
|
36628
|
-
let gap = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
36629
|
-
return Math.max(prevBounds[0], nextBounds[0]) - gap / 2 <= Math.min(prevBounds[1], nextBounds[1]) + gap / 2;
|
|
36630
|
-
};
|
|
36237
|
+
boundsOverlap = (prevBounds, nextBounds, gap = 0) => Math.max(prevBounds[0], nextBounds[0]) - gap / 2 <= Math.min(prevBounds[1], nextBounds[1]) + gap / 2;
|
|
36631
36238
|
const boundsDistance = (prevBounds, nextBounds) => prevBounds[1] < nextBounds[0] ? nextBounds[0] - prevBounds[1] : nextBounds[1] < prevBounds[0] ? prevBounds[0] - nextBounds[1] : 0;
|
|
36632
36239
|
const linearDiscreteTicks = (scale, op) => {
|
|
36633
36240
|
var _a;
|
|
@@ -36857,13 +36464,12 @@
|
|
|
36857
36464
|
const index = y * w + x;
|
|
36858
36465
|
_clear(index >>> 5, ~(1 << (31 & index)));
|
|
36859
36466
|
},
|
|
36860
|
-
getRange:
|
|
36861
|
-
|
|
36862
|
-
|
|
36863
|
-
|
|
36864
|
-
|
|
36865
|
-
|
|
36866
|
-
} = _ref;
|
|
36467
|
+
getRange: ({
|
|
36468
|
+
x1: x1,
|
|
36469
|
+
y1: y1,
|
|
36470
|
+
x2: x2,
|
|
36471
|
+
y2: y2
|
|
36472
|
+
}) => {
|
|
36867
36473
|
if (x2 < 0 || y2 < 0 || x1 > w || y1 > h) return !0;
|
|
36868
36474
|
let start,
|
|
36869
36475
|
end,
|
|
@@ -36879,36 +36485,31 @@
|
|
|
36879
36485
|
}
|
|
36880
36486
|
return !1;
|
|
36881
36487
|
},
|
|
36882
|
-
setRange:
|
|
36883
|
-
|
|
36884
|
-
|
|
36885
|
-
|
|
36886
|
-
|
|
36887
|
-
|
|
36888
|
-
} = _ref2;
|
|
36488
|
+
setRange: ({
|
|
36489
|
+
x1: x1,
|
|
36490
|
+
y1: y1,
|
|
36491
|
+
x2: x2,
|
|
36492
|
+
y2: y2
|
|
36493
|
+
}) => {
|
|
36889
36494
|
if (x2 < 0 || y2 < 0 || x1 > w || y1 > h) return;
|
|
36890
36495
|
let start, end, indexStart, indexEnd, i;
|
|
36891
36496
|
for (; y1 <= y2; ++y1) if (start = y1 * w + x1, end = y1 * w + x2, indexStart = start >>> 5, indexEnd = end >>> 5, indexStart === indexEnd) _set(indexStart, RIGHT0[31 & start] & RIGHT1[1 + (31 & end)]);else for (_set(indexStart, RIGHT0[31 & start]), _set(indexEnd, RIGHT1[1 + (31 & end)]), i = indexStart + 1; i < indexEnd; ++i) _set(i, 4294967295);
|
|
36892
36497
|
},
|
|
36893
|
-
clearRange:
|
|
36894
|
-
|
|
36895
|
-
|
|
36896
|
-
|
|
36897
|
-
|
|
36898
|
-
|
|
36899
|
-
} = _ref3;
|
|
36498
|
+
clearRange: ({
|
|
36499
|
+
x1: x1,
|
|
36500
|
+
y1: y1,
|
|
36501
|
+
x2: x2,
|
|
36502
|
+
y2: y2
|
|
36503
|
+
}) => {
|
|
36900
36504
|
let start, end, indexStart, indexEnd, i;
|
|
36901
36505
|
for (; y1 <= y2; ++y1) if (start = y1 * w + x1, end = y1 * w + x2, indexStart = start >>> 5, indexEnd = end >>> 5, indexStart === indexEnd) _clear(indexStart, RIGHT1[31 & start] | RIGHT0[1 + (31 & end)]);else for (_clear(indexStart, RIGHT1[31 & start]), _clear(indexEnd, RIGHT0[1 + (31 & end)]), i = indexStart + 1; i < indexEnd; ++i) _clear(i, 0);
|
|
36902
36506
|
},
|
|
36903
|
-
outOfBounds:
|
|
36904
|
-
|
|
36905
|
-
|
|
36906
|
-
|
|
36907
|
-
|
|
36908
|
-
|
|
36909
|
-
} = _ref4;
|
|
36910
|
-
return x1 < 0 || y1 < 0 || y2 >= h || x2 >= w;
|
|
36911
|
-
},
|
|
36507
|
+
outOfBounds: ({
|
|
36508
|
+
x1: x1,
|
|
36509
|
+
y1: y1,
|
|
36510
|
+
x2: x2,
|
|
36511
|
+
y2: y2
|
|
36512
|
+
}) => x1 < 0 || y1 < 0 || y2 >= h || x2 >= w,
|
|
36912
36513
|
toImageData: ctx => {
|
|
36913
36514
|
const imageData = ctx.createImageData(w, h),
|
|
36914
36515
|
data = imageData.data;
|
|
@@ -36923,13 +36524,12 @@
|
|
|
36923
36524
|
};
|
|
36924
36525
|
}
|
|
36925
36526
|
|
|
36926
|
-
function bitmapTool(width, height
|
|
36927
|
-
|
|
36928
|
-
|
|
36929
|
-
|
|
36930
|
-
|
|
36931
|
-
|
|
36932
|
-
};
|
|
36527
|
+
function bitmapTool(width, height, padding = {
|
|
36528
|
+
top: 0,
|
|
36529
|
+
left: 0,
|
|
36530
|
+
right: 0,
|
|
36531
|
+
bottom: 0
|
|
36532
|
+
}) {
|
|
36933
36533
|
const {
|
|
36934
36534
|
top = 0,
|
|
36935
36535
|
left = 0,
|
|
@@ -36966,8 +36566,7 @@
|
|
|
36966
36566
|
y2: $.y(_y2)
|
|
36967
36567
|
};
|
|
36968
36568
|
}
|
|
36969
|
-
function boundToRange($, bound) {
|
|
36970
|
-
let clamp = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
36569
|
+
function boundToRange($, bound, clamp = !1) {
|
|
36971
36570
|
return clamp ? clampRangeByBitmap($, bound) : {
|
|
36972
36571
|
x1: $.x(bound.x1),
|
|
36973
36572
|
x2: $.x(bound.x2),
|
|
@@ -36976,9 +36575,7 @@
|
|
|
36976
36575
|
};
|
|
36977
36576
|
}
|
|
36978
36577
|
|
|
36979
|
-
function canPlace($, bitmap, bound) {
|
|
36980
|
-
let checkBound = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !0;
|
|
36981
|
-
let pad = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
36578
|
+
function canPlace($, bitmap, bound, checkBound = !0, pad = 0) {
|
|
36982
36579
|
let range = bound;
|
|
36983
36580
|
pad > 0 && (range = {
|
|
36984
36581
|
x1: bound.x1 - pad,
|
|
@@ -36989,11 +36586,7 @@
|
|
|
36989
36586
|
const outOfBounds = bitmap.outOfBounds(range);
|
|
36990
36587
|
return (!checkBound || !outOfBounds) && (outOfBounds && (range = clampRangeByBitmap($, range)), !bitmap.getRange(range));
|
|
36991
36588
|
}
|
|
36992
|
-
function placeToCandidates($, bitmap, text) {
|
|
36993
|
-
let candidates = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
36994
|
-
let clampForce = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !0;
|
|
36995
|
-
let pad = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
|
|
36996
|
-
let changePosition = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : !1;
|
|
36589
|
+
function placeToCandidates($, bitmap, text, candidates = [], clampForce = !0, pad = 0, changePosition = !1) {
|
|
36997
36590
|
const validCandidates = candidates.filter(candidate => isValid$1(candidate));
|
|
36998
36591
|
for (let i = 0; i < validCandidates.length; i++) {
|
|
36999
36592
|
let measureText;
|
|
@@ -37034,8 +36627,7 @@
|
|
|
37034
36627
|
function defaultLabelPosition(type) {
|
|
37035
36628
|
return "rect" === type ? DefaultRectPositions : DefaultPositions;
|
|
37036
36629
|
}
|
|
37037
|
-
function clampText(text, width, height) {
|
|
37038
|
-
let padding = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
36630
|
+
function clampText(text, width, height, padding = {}) {
|
|
37039
36631
|
const {
|
|
37040
36632
|
x1: x1,
|
|
37041
36633
|
x2: x2,
|
|
@@ -37062,8 +36654,7 @@
|
|
|
37062
36654
|
};
|
|
37063
36655
|
}
|
|
37064
36656
|
|
|
37065
|
-
const fadeIn$1 =
|
|
37066
|
-
let textAttribute = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
36657
|
+
const fadeIn$1 = (textAttribute = {}) => {
|
|
37067
36658
|
var _a, _b, _c;
|
|
37068
36659
|
return {
|
|
37069
36660
|
from: {
|
|
@@ -37078,8 +36669,7 @@
|
|
|
37078
36669
|
}
|
|
37079
36670
|
};
|
|
37080
36671
|
},
|
|
37081
|
-
fadeOut$1 =
|
|
37082
|
-
let textAttribute = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
36672
|
+
fadeOut$1 = (textAttribute = {}) => {
|
|
37083
36673
|
var _a, _b, _c;
|
|
37084
36674
|
return {
|
|
37085
36675
|
from: {
|
|
@@ -37233,9 +36823,7 @@
|
|
|
37233
36823
|
} = boundsB;
|
|
37234
36824
|
return !(ax1 <= bx1 && ax2 <= bx1 || ax1 >= bx2 && ax2 >= bx2 || ay1 <= by1 && ay2 <= by1 || ay1 >= by2 && ay2 >= by2);
|
|
37235
36825
|
}
|
|
37236
|
-
const labelingPoint =
|
|
37237
|
-
let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "top";
|
|
37238
|
-
let offset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
36826
|
+
const labelingPoint = (textBounds, graphicBounds, position = "top", offset = 0) => {
|
|
37239
36827
|
if (!textBounds) return;
|
|
37240
36828
|
const {
|
|
37241
36829
|
x1: x1,
|
|
@@ -37301,9 +36889,7 @@
|
|
|
37301
36889
|
}
|
|
37302
36890
|
return points;
|
|
37303
36891
|
};
|
|
37304
|
-
function labelingLineOrArea(textBounds, graphicBounds) {
|
|
37305
|
-
let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "end";
|
|
37306
|
-
let offset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
36892
|
+
function labelingLineOrArea(textBounds, graphicBounds, position = "end", offset = 0) {
|
|
37307
36893
|
if (!textBounds || !graphicBounds) return {
|
|
37308
36894
|
x: 1 / 0,
|
|
37309
36895
|
y: 1 / 0
|
|
@@ -37357,11 +36943,7 @@
|
|
|
37357
36943
|
}
|
|
37358
36944
|
|
|
37359
36945
|
const isIntersect = (top, bottom) => Math.ceil(top) > Math.floor(bottom),
|
|
37360
|
-
isXIntersect = (
|
|
37361
|
-
let [a, b] = _ref;
|
|
37362
|
-
let [c, d] = _ref2;
|
|
37363
|
-
return d > a && b > c;
|
|
37364
|
-
};
|
|
36946
|
+
isXIntersect = ([a, b], [c, d]) => d > a && b > c;
|
|
37365
36947
|
function getIntersectionLength(range1, range2) {
|
|
37366
36948
|
const [start1, end1] = range1,
|
|
37367
36949
|
[start2, end2] = range2,
|
|
@@ -37684,8 +37266,7 @@
|
|
|
37684
37266
|
getRelatedGraphic(item) {
|
|
37685
37267
|
return this._idToGraphic.get(item.id);
|
|
37686
37268
|
}
|
|
37687
|
-
_initText() {
|
|
37688
|
-
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
37269
|
+
_initText(data = []) {
|
|
37689
37270
|
const {
|
|
37690
37271
|
textStyle = {}
|
|
37691
37272
|
} = this.attribute,
|
|
@@ -37799,8 +37380,7 @@
|
|
|
37799
37380
|
visible: !1
|
|
37800
37381
|
}), !1);
|
|
37801
37382
|
}
|
|
37802
|
-
_processClampForce(text, bmpTool, bitmap) {
|
|
37803
|
-
let overlapPadding = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
37383
|
+
_processClampForce(text, bmpTool, bitmap, overlapPadding = 0) {
|
|
37804
37384
|
const {
|
|
37805
37385
|
dy = 0,
|
|
37806
37386
|
dx = 0
|
|
@@ -37913,9 +37493,7 @@
|
|
|
37913
37493
|
} = this.attribute;
|
|
37914
37494
|
if (baseMarkGroupName) return this.getRootNode().find(node => node.name === baseMarkGroupName, !0);
|
|
37915
37495
|
}
|
|
37916
|
-
getGraphicBounds(graphic) {
|
|
37917
|
-
let point = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
37918
|
-
let position = arguments.length > 2 ? arguments[2] : undefined;
|
|
37496
|
+
getGraphicBounds(graphic, point = {}, position) {
|
|
37919
37497
|
if (graphic) {
|
|
37920
37498
|
if (!1 !== graphic.attribute.visible) return graphic.AABBBounds;
|
|
37921
37499
|
const {
|
|
@@ -38058,13 +37636,12 @@
|
|
|
38058
37636
|
_syncStateWithRelatedGraphic(relatedGraphic) {
|
|
38059
37637
|
this.attribute.syncState && relatedGraphic && relatedGraphic.on("afterAttributeUpdate", this._handleRelatedGraphicSetState);
|
|
38060
37638
|
}
|
|
38061
|
-
_afterRelatedGraphicAttributeUpdate(text, texts, labelLine, labelLines, index, relatedGraphic, to,
|
|
38062
|
-
|
|
38063
|
-
|
|
38064
|
-
|
|
38065
|
-
|
|
38066
|
-
|
|
38067
|
-
} = _ref;
|
|
37639
|
+
_afterRelatedGraphicAttributeUpdate(text, texts, labelLine, labelLines, index, relatedGraphic, to, {
|
|
37640
|
+
mode: mode,
|
|
37641
|
+
duration: duration,
|
|
37642
|
+
easing: easing,
|
|
37643
|
+
delay: delay
|
|
37644
|
+
}) {
|
|
38068
37645
|
const listener = event => {
|
|
38069
37646
|
var _a, _b, _c;
|
|
38070
37647
|
const {
|
|
@@ -38211,9 +37788,7 @@
|
|
|
38211
37788
|
data: data
|
|
38212
37789
|
}, merge$1({}, SymbolLabel.defaultAttributes, restAttributes))), this.name = "symbol-label";
|
|
38213
37790
|
}
|
|
38214
|
-
labeling(textBounds, graphicBounds) {
|
|
38215
|
-
let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "top";
|
|
38216
|
-
let offset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
37791
|
+
labeling(textBounds, graphicBounds, position = "top", offset = 0) {
|
|
38217
37792
|
return labelingPoint(textBounds, graphicBounds, position, offset);
|
|
38218
37793
|
}
|
|
38219
37794
|
}
|
|
@@ -38247,9 +37822,7 @@
|
|
|
38247
37822
|
data: data
|
|
38248
37823
|
}, merge$1({}, RectLabel.defaultAttributes, restAttributes)));
|
|
38249
37824
|
}
|
|
38250
|
-
labeling(textBounds, graphicBounds) {
|
|
38251
|
-
let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "top";
|
|
38252
|
-
let offset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
37825
|
+
labeling(textBounds, graphicBounds, position = "top", offset = 0) {
|
|
38253
37826
|
if (!textBounds || !graphicBounds) return;
|
|
38254
37827
|
const {
|
|
38255
37828
|
x1: x1,
|
|
@@ -38311,9 +37884,7 @@
|
|
|
38311
37884
|
data: data
|
|
38312
37885
|
}, merge$1({}, LineLabel.defaultAttributes, restAttributes))), this.name = "line-label";
|
|
38313
37886
|
}
|
|
38314
|
-
getGraphicBounds(graphic) {
|
|
38315
|
-
let point = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
38316
|
-
let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "end";
|
|
37887
|
+
getGraphicBounds(graphic, point = {}, position = "end") {
|
|
38317
37888
|
if (!graphic || "line" !== graphic.type && "area" !== graphic.type) return super.getGraphicBounds(graphic, point);
|
|
38318
37889
|
let points = graphic.attribute.points;
|
|
38319
37890
|
const segments = graphic.attribute.segments;
|
|
@@ -38329,9 +37900,7 @@
|
|
|
38329
37900
|
y2: points[index].y
|
|
38330
37901
|
} : void 0;
|
|
38331
37902
|
}
|
|
38332
|
-
labeling(textBounds, graphicBounds) {
|
|
38333
|
-
let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "end";
|
|
38334
|
-
let offset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
37903
|
+
labeling(textBounds, graphicBounds, position = "end", offset = 0) {
|
|
38335
37904
|
return labelingLineOrArea(textBounds, graphicBounds, position, offset);
|
|
38336
37905
|
}
|
|
38337
37906
|
};
|
|
@@ -38386,7 +37955,7 @@
|
|
|
38386
37955
|
_overlapping(labels) {
|
|
38387
37956
|
return ["inside", "inside-center"].includes(this.attribute.position) ? super._overlapping(labels) : labels;
|
|
38388
37957
|
}
|
|
38389
|
-
labeling(textBounds, graphicBounds) {
|
|
37958
|
+
labeling(textBounds, graphicBounds, position = "outside", offset = 0) {
|
|
38390
37959
|
if (textBounds && graphicBounds) return {
|
|
38391
37960
|
x: 0,
|
|
38392
37961
|
y: 0
|
|
@@ -42998,8 +42567,7 @@
|
|
|
42998
42567
|
item.hasState(LegendStateValue.selected) && selectedData.push(item.data);
|
|
42999
42568
|
}), selectedData;
|
|
43000
42569
|
}
|
|
43001
|
-
_appendDataToShape(shape, name, data, delegateShape) {
|
|
43002
|
-
let states = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
42570
|
+
_appendDataToShape(shape, name, data, delegateShape, states = {}) {
|
|
43003
42571
|
shape.name = name, shape.data = data, shape.delegate = delegateShape, shape.states = merge$1({}, DEFAULT_STATES, states);
|
|
43004
42572
|
}
|
|
43005
42573
|
_dispatchLegendEvent(eventName, legendItem, event) {
|
|
@@ -43959,8 +43527,7 @@
|
|
|
43959
43527
|
}
|
|
43960
43528
|
};
|
|
43961
43529
|
|
|
43962
|
-
function getSizeHandlerPath() {
|
|
43963
|
-
let align = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "bottom";
|
|
43530
|
+
function getSizeHandlerPath(align = "bottom") {
|
|
43964
43531
|
let centerX = 0;
|
|
43965
43532
|
return "top" === align ? `\n M${centerX},-6L${centerX - 3.5},-2.5\n v5\n h7\n v-5\n Z\n` : "left" === align ? (centerX = 1, `\n M${centerX - 6},0L${centerX - 6 + 2.5},-3.5\n h5\n v7\n h-5\n Z\n`) : "right" === align ? (centerX = -1, `\n M${centerX + 6},0L${centerX + 6 - 2.5},-3.5\n h-5\n v7\n h5\n Z\n `) : `\n M${centerX},6L${centerX - 3.5},2.5\n v-5\n h7\n v5\n Z\n`;
|
|
43966
43533
|
}
|
|
@@ -44527,72 +44094,54 @@
|
|
|
44527
44094
|
PlayerEventEnum.change = "change", PlayerEventEnum.play = "play", PlayerEventEnum.pause = "pause", PlayerEventEnum.backward = "backward", PlayerEventEnum.forward = "forward", PlayerEventEnum.end = "end", PlayerEventEnum.OnChange = "change", PlayerEventEnum.OnPlay = "play", PlayerEventEnum.OnPause = "pause", PlayerEventEnum.OnBackward = "backward", PlayerEventEnum.OnForward = "forward", PlayerEventEnum.OnEnd = "end";
|
|
44528
44095
|
}(PlayerEventEnum || (PlayerEventEnum = {}));
|
|
44529
44096
|
|
|
44530
|
-
const isReachEndByDefault =
|
|
44531
|
-
|
|
44532
|
-
|
|
44533
|
-
|
|
44534
|
-
|
|
44535
|
-
|
|
44536
|
-
|
|
44537
|
-
|
|
44538
|
-
|
|
44539
|
-
|
|
44540
|
-
|
|
44541
|
-
|
|
44542
|
-
|
|
44543
|
-
|
|
44544
|
-
|
|
44545
|
-
}
|
|
44546
|
-
|
|
44547
|
-
|
|
44548
|
-
|
|
44549
|
-
|
|
44550
|
-
|
|
44551
|
-
|
|
44552
|
-
|
|
44553
|
-
|
|
44554
|
-
|
|
44555
|
-
|
|
44556
|
-
|
|
44557
|
-
|
|
44558
|
-
|
|
44559
|
-
|
|
44560
|
-
|
|
44561
|
-
|
|
44562
|
-
|
|
44563
|
-
|
|
44564
|
-
|
|
44565
|
-
|
|
44566
|
-
|
|
44567
|
-
|
|
44568
|
-
|
|
44569
|
-
|
|
44570
|
-
|
|
44571
|
-
|
|
44572
|
-
|
|
44573
|
-
|
|
44574
|
-
|
|
44575
|
-
|
|
44576
|
-
|
|
44577
|
-
|
|
44578
|
-
};
|
|
44579
|
-
const isReachStart = _ref8 => {
|
|
44580
|
-
let {
|
|
44581
|
-
direction: direction,
|
|
44582
|
-
maxIndex: maxIndex,
|
|
44583
|
-
minIndex: minIndex,
|
|
44584
|
-
dataIndex: dataIndex
|
|
44585
|
-
} = _ref8;
|
|
44586
|
-
return isReachStartByDefault({
|
|
44587
|
-
direction: direction,
|
|
44588
|
-
minIndex: minIndex,
|
|
44589
|
-
dataIndex: dataIndex
|
|
44590
|
-
}) || isReachStartByReverse({
|
|
44591
|
-
direction: direction,
|
|
44592
|
-
maxIndex: maxIndex,
|
|
44593
|
-
dataIndex: dataIndex
|
|
44594
|
-
});
|
|
44595
|
-
};
|
|
44097
|
+
const isReachEndByDefault = ({
|
|
44098
|
+
direction: direction,
|
|
44099
|
+
maxIndex: maxIndex,
|
|
44100
|
+
dataIndex: dataIndex
|
|
44101
|
+
}) => direction === DirectionEnum.Default && dataIndex === maxIndex;
|
|
44102
|
+
const isReachEndByReverse = ({
|
|
44103
|
+
direction: direction,
|
|
44104
|
+
minIndex: minIndex,
|
|
44105
|
+
dataIndex: dataIndex
|
|
44106
|
+
}) => direction === DirectionEnum.Reverse && dataIndex === minIndex;
|
|
44107
|
+
const isReachEnd = ({
|
|
44108
|
+
direction: direction,
|
|
44109
|
+
maxIndex: maxIndex,
|
|
44110
|
+
minIndex: minIndex,
|
|
44111
|
+
dataIndex: dataIndex
|
|
44112
|
+
}) => isReachEndByDefault({
|
|
44113
|
+
direction: direction,
|
|
44114
|
+
maxIndex: maxIndex,
|
|
44115
|
+
dataIndex: dataIndex
|
|
44116
|
+
}) || isReachEndByReverse({
|
|
44117
|
+
direction: direction,
|
|
44118
|
+
minIndex: minIndex,
|
|
44119
|
+
dataIndex: dataIndex
|
|
44120
|
+
});
|
|
44121
|
+
const isReachStartByDefault = ({
|
|
44122
|
+
direction: direction,
|
|
44123
|
+
minIndex: minIndex,
|
|
44124
|
+
dataIndex: dataIndex
|
|
44125
|
+
}) => direction === DirectionEnum.Default && dataIndex === minIndex;
|
|
44126
|
+
const isReachStartByReverse = ({
|
|
44127
|
+
direction: direction,
|
|
44128
|
+
maxIndex: maxIndex,
|
|
44129
|
+
dataIndex: dataIndex
|
|
44130
|
+
}) => direction === DirectionEnum.Reverse && dataIndex === maxIndex;
|
|
44131
|
+
const isReachStart = ({
|
|
44132
|
+
direction: direction,
|
|
44133
|
+
maxIndex: maxIndex,
|
|
44134
|
+
minIndex: minIndex,
|
|
44135
|
+
dataIndex: dataIndex
|
|
44136
|
+
}) => isReachStartByDefault({
|
|
44137
|
+
direction: direction,
|
|
44138
|
+
minIndex: minIndex,
|
|
44139
|
+
dataIndex: dataIndex
|
|
44140
|
+
}) || isReachStartByReverse({
|
|
44141
|
+
direction: direction,
|
|
44142
|
+
maxIndex: maxIndex,
|
|
44143
|
+
dataIndex: dataIndex
|
|
44144
|
+
});
|
|
44596
44145
|
const isHorizontal$1 = orient => "top" === orient || "bottom" === orient;
|
|
44597
44146
|
const forwardStep = (direction, currentIndex, min, max) => "default" === direction ? Math.min(currentIndex + 1, max) : Math.max(currentIndex - 1, min);
|
|
44598
44147
|
|
|
@@ -45250,10 +44799,7 @@
|
|
|
45250
44799
|
};
|
|
45251
44800
|
Brush$1.defaultAttributes = DEFAULT_BRUSH_ATTRIBUTES;
|
|
45252
44801
|
|
|
45253
|
-
const mergeRowAttrs =
|
|
45254
|
-
for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
45255
|
-
sources[_key - 1] = arguments[_key];
|
|
45256
|
-
}
|
|
44802
|
+
const mergeRowAttrs = (target, ...sources) => {
|
|
45257
44803
|
const shapeList = [target.shape, ...sources.map(s => null == s ? void 0 : s.shape)],
|
|
45258
44804
|
keyList = [target.key, ...sources.map(s => null == s ? void 0 : s.key)],
|
|
45259
44805
|
valueList = [target.value, ...sources.map(s => null == s ? void 0 : s.value)];
|
|
@@ -45571,8 +45117,7 @@
|
|
|
45571
45117
|
const shapeWidths = [],
|
|
45572
45118
|
keyWidths = [],
|
|
45573
45119
|
valueWidths = [];
|
|
45574
|
-
filteredContent.forEach((
|
|
45575
|
-
let [item, itemAttr] = _ref;
|
|
45120
|
+
filteredContent.forEach(([item, itemAttr], i) => {
|
|
45576
45121
|
var _a;
|
|
45577
45122
|
const {
|
|
45578
45123
|
key: key,
|
|
@@ -48233,16 +47778,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
48233
47778
|
};
|
|
48234
47779
|
|
|
48235
47780
|
const ignoreWhen = value => isDataView(value) || isHTMLElement(value);
|
|
48236
|
-
function cloneDeepSpec(spec) {
|
|
48237
|
-
let excludeKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ["data"];
|
|
47781
|
+
function cloneDeepSpec(spec, excludeKeys = ["data"]) {
|
|
48238
47782
|
return cloneDeep(spec, ignoreWhen, excludeKeys);
|
|
48239
47783
|
}
|
|
48240
47784
|
|
|
48241
|
-
function mergeSpec(target) {
|
|
47785
|
+
function mergeSpec(target, ...sources) {
|
|
48242
47786
|
let sourceIndex = -1;
|
|
48243
|
-
const length =
|
|
47787
|
+
const length = sources.length;
|
|
48244
47788
|
for (; ++sourceIndex < length;) {
|
|
48245
|
-
const source =
|
|
47789
|
+
const source = sources[sourceIndex];
|
|
48246
47790
|
baseMerge(target, source, !0, !0);
|
|
48247
47791
|
}
|
|
48248
47792
|
return target;
|
|
@@ -49337,8 +48881,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
49337
48881
|
return isNil$1(attrs.x) && (attrs.x = x), isNil$1(attrs.y) && (attrs.y = y), isNil$1(attrs.defined) && !1 === defined && (attrs.defined = !1), attrs.context = item.key, isArea && (isNil$1(attrs.x1) && (attrs.x1 = x1), isNil$1(attrs.y1) && (attrs.y1 = y1)), attrs;
|
|
49338
48882
|
}) : null != lastPoints ? lastPoints : [];
|
|
49339
48883
|
}
|
|
49340
|
-
function getLargeRectsPoints(items, includeOnePoint) {
|
|
49341
|
-
let lastPoints = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
48884
|
+
function getLargeRectsPoints(items, includeOnePoint, lastPoints = []) {
|
|
49342
48885
|
if (!items || !items.length || 1 === items.length && !includeOnePoint) return [];
|
|
49343
48886
|
const arr = new Float32Array(4 * items.length);
|
|
49344
48887
|
return items.forEach((item, index) => {
|
|
@@ -49351,8 +48894,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
49351
48894
|
arr[4 * index] = x, arr[4 * index + 1] = y, arr[4 * index + 2] = width, arr[4 * index + 3] = y1 - y;
|
|
49352
48895
|
}), arr;
|
|
49353
48896
|
}
|
|
49354
|
-
function getLargeSymbolsPoints(items, includeOnePoint) {
|
|
49355
|
-
let lastPoints = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
48897
|
+
function getLargeSymbolsPoints(items, includeOnePoint, lastPoints = []) {
|
|
49356
48898
|
if (!items || !items.length || 1 === items.length && !includeOnePoint) return [];
|
|
49357
48899
|
const arr = new Float32Array(2 * items.length);
|
|
49358
48900
|
return items.forEach((item, index) => {
|
|
@@ -49571,8 +49113,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
49571
49113
|
}, Factory.getStageEventPlugin = type => Factory._stageEventPlugins[type];
|
|
49572
49114
|
|
|
49573
49115
|
const isMarkType = type => !!GrammarMarkType[type];
|
|
49574
|
-
function createGraphicItem(mark, markType) {
|
|
49575
|
-
let attrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
49116
|
+
function createGraphicItem(mark, markType, attrs = {}) {
|
|
49576
49117
|
var _a;
|
|
49577
49118
|
const graphicItem = Factory.getGraphicType(markType) ? Factory.createGraphic(markType, attrs) : Factory.createGraphicComponent(markType, attrs, {
|
|
49578
49119
|
skipDefault: null === (_a = null == mark ? void 0 : mark.spec) || void 0 === _a ? void 0 : _a.skipTheme
|
|
@@ -49582,8 +49123,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
49582
49123
|
}
|
|
49583
49124
|
return graphicItem;
|
|
49584
49125
|
}
|
|
49585
|
-
function createGlyphGraphicItem(mark, glyphMeta) {
|
|
49586
|
-
let attrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
49126
|
+
function createGlyphGraphicItem(mark, glyphMeta, attrs = {}) {
|
|
49587
49127
|
if (!Factory.getGraphicType(GrammarMarkType.glyph)) return;
|
|
49588
49128
|
const graphicItem = Factory.createGraphic(GrammarMarkType.glyph, attrs),
|
|
49589
49129
|
glyphMarks = glyphMeta.getMarks(),
|
|
@@ -49800,8 +49340,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
49800
49340
|
}, graphicAttributes;
|
|
49801
49341
|
}, this.mark = mark;
|
|
49802
49342
|
}
|
|
49803
|
-
initGraphicItem() {
|
|
49804
|
-
let attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
49343
|
+
initGraphicItem(attributes = {}) {
|
|
49805
49344
|
if (this.graphicItem) return;
|
|
49806
49345
|
const attrTransforms = this.mark.getAttributeTransforms();
|
|
49807
49346
|
if (this.graphicItem = this.mark.addGraphicItem(attrTransforms ? transformAttributes(attrTransforms, attributes, this) : attributes, this.groupKey), !this.graphicItem) return;
|
|
@@ -49879,9 +49418,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
49879
49418
|
const setCustomizedShape = null === (_a = this.mark.getSpec()) || void 0 === _a ? void 0 : _a.setCustomizedShape;
|
|
49880
49419
|
setCustomizedShape && (this.graphicItem.pathProxy = attrs => setCustomizedShape(this.data, attrs, new CustomPath2D()));
|
|
49881
49420
|
}
|
|
49882
|
-
encodeItems(items, encoders) {
|
|
49883
|
-
let isReentered = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
49884
|
-
let parameters = arguments.length > 3 ? arguments[3] : undefined;
|
|
49421
|
+
encodeItems(items, encoders, isReentered = !1, parameters) {
|
|
49885
49422
|
const isCollectionMark = this.mark.isCollectionMark(),
|
|
49886
49423
|
updateEncoder = encoders[BuiltInEncodeNames.update],
|
|
49887
49424
|
enterEncoder = encoders[BuiltInEncodeNames.enter],
|
|
@@ -50020,8 +49557,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
50020
49557
|
this.graphicItem.setAttributes(currentGraphicAttributes);
|
|
50021
49558
|
} else this.graphicItem.setAttributes(graphicAttributes);
|
|
50022
49559
|
}
|
|
50023
|
-
getGraphicAttribute(channel) {
|
|
50024
|
-
let prev = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
49560
|
+
getGraphicAttribute(channel, prev = !1) {
|
|
50025
49561
|
var _a;
|
|
50026
49562
|
if (!this.graphicItem) return;
|
|
50027
49563
|
if (prev) {
|
|
@@ -50037,15 +49573,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
50037
49573
|
}
|
|
50038
49574
|
return get$1(null === (_a = this.graphicItem) || void 0 === _a ? void 0 : _a.attribute, getKey);
|
|
50039
49575
|
}
|
|
50040
|
-
setGraphicAttribute(channel, value) {
|
|
50041
|
-
let final = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
49576
|
+
setGraphicAttribute(channel, value, final = !0) {
|
|
50042
49577
|
if (!this.graphicItem) return;
|
|
50043
49578
|
const finalGraphicAttributes = this.getFinalGraphicAttributes(),
|
|
50044
49579
|
prevGraphicAttributes = this.getPrevGraphicAttributes();
|
|
50045
49580
|
final && finalGraphicAttributes && (finalGraphicAttributes[channel] = value), prevGraphicAttributes && !has$1(prevGraphicAttributes, channel) && (prevGraphicAttributes[channel] = this.graphicItem.attribute[channel]), this.graphicItem.setAttribute(channel, value);
|
|
50046
49581
|
}
|
|
50047
|
-
setGraphicAttributes(attributes) {
|
|
50048
|
-
let final = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
49582
|
+
setGraphicAttributes(attributes, final = !0) {
|
|
50049
49583
|
if (!this.graphicItem) return;
|
|
50050
49584
|
const finalGraphicAttributes = this.getFinalGraphicAttributes(),
|
|
50051
49585
|
prevGraphicAttributes = this.getPrevGraphicAttributes();
|
|
@@ -50805,17 +50339,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
50805
50339
|
removeEventListener(type, handler) {
|
|
50806
50340
|
return handler ? this.off(type, handler) : this.off(type), this;
|
|
50807
50341
|
}
|
|
50808
|
-
emit(event) {
|
|
50342
|
+
emit(event, ...args) {
|
|
50809
50343
|
var _a, _b;
|
|
50810
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
50811
|
-
args[_key - 1] = arguments[_key];
|
|
50812
|
-
}
|
|
50813
50344
|
return null === (_b = null === (_a = this.view) || void 0 === _a ? void 0 : _a.emit) || void 0 === _b || _b.call(_a, event, ...args), super.emit(event, ...args);
|
|
50814
50345
|
}
|
|
50815
|
-
emitGrammarEvent(event) {
|
|
50816
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
50817
|
-
args[_key2 - 1] = arguments[_key2];
|
|
50818
|
-
}
|
|
50346
|
+
emitGrammarEvent(event, ...args) {
|
|
50819
50347
|
return super.emit(event, ...args);
|
|
50820
50348
|
}
|
|
50821
50349
|
evaluateTransform(transforms, upstream, parameters) {
|
|
@@ -50838,15 +50366,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
50838
50366
|
name(name) {
|
|
50839
50367
|
return arguments.length ? (this._name = name, this) : this._name;
|
|
50840
50368
|
}
|
|
50841
|
-
attach(reference) {
|
|
50842
|
-
let count = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
50369
|
+
attach(reference, count = 1) {
|
|
50843
50370
|
return array(reference).filter(ref => !isNil$1(ref)).forEach(ref => {
|
|
50844
50371
|
var _a;
|
|
50845
50372
|
isNil$1(reference) || (ref.targets.includes(this) || ref.targets.push(this), this.references.set(ref, (null !== (_a = this.references.get(ref)) && void 0 !== _a ? _a : 0) + count));
|
|
50846
50373
|
}), this;
|
|
50847
50374
|
}
|
|
50848
|
-
detach(reference) {
|
|
50849
|
-
let count = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
50375
|
+
detach(reference, count = 1) {
|
|
50850
50376
|
return array(reference).filter(ref => !isNil$1(ref)).forEach(ref => {
|
|
50851
50377
|
const refCount = this.references.get(ref) - count;
|
|
50852
50378
|
refCount > 0 ? this.references.set(ref, refCount - 1) : (this.references.delete(ref), ref.targets.includes(this) && (ref.targets = ref.targets.filter(target => target !== this)));
|
|
@@ -50986,7 +50512,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
50986
50512
|
return null;
|
|
50987
50513
|
};
|
|
50988
50514
|
|
|
50989
|
-
const jsonParser =
|
|
50515
|
+
const jsonParser = (data, options = {}, dataView) => {
|
|
50990
50516
|
if (!isString$1(data)) return array(data);
|
|
50991
50517
|
try {
|
|
50992
50518
|
return array(JSON.parse(data));
|
|
@@ -51075,24 +50601,21 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
51075
50601
|
getDataIDKey() {
|
|
51076
50602
|
return this._dataIDKey;
|
|
51077
50603
|
}
|
|
51078
|
-
values(values, format) {
|
|
51079
|
-
let load = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
50604
|
+
values(values, format, load = !0) {
|
|
51080
50605
|
const spec = Object.assign({}, this.spec, {
|
|
51081
50606
|
values: values,
|
|
51082
50607
|
format: format
|
|
51083
50608
|
});
|
|
51084
50609
|
return isNil$1(values) || (spec.url = void 0, spec.source = void 0), load ? this.parseLoad(spec) : this;
|
|
51085
50610
|
}
|
|
51086
|
-
url(url, format) {
|
|
51087
|
-
let load = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
50611
|
+
url(url, format, load = !0) {
|
|
51088
50612
|
const spec = Object.assign({}, this.spec, {
|
|
51089
50613
|
url: url,
|
|
51090
50614
|
format: format
|
|
51091
50615
|
});
|
|
51092
50616
|
return isNil$1(url) || (spec.values = void 0, spec.source = void 0), load ? this.parseLoad(spec) : this;
|
|
51093
50617
|
}
|
|
51094
|
-
source(source, format) {
|
|
51095
|
-
let load = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
50618
|
+
source(source, format, load = !0) {
|
|
51096
50619
|
const spec = Object.assign({}, this.spec, {
|
|
51097
50620
|
source: source,
|
|
51098
50621
|
format: format
|
|
@@ -51356,12 +50879,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
51356
50879
|
resize(width, height) {
|
|
51357
50880
|
return this._view.emit(HOOK_EVENT.BEFORE_STAGE_RESIZE), this.shouldResize(width, height) && (this._width = width, this._height = height, this._stage && this._stage.resize(width, height)), this._view.emit(HOOK_EVENT.AFTER_STAGE_RESIZE), this;
|
|
51358
50881
|
}
|
|
51359
|
-
setViewBox(viewBox) {
|
|
51360
|
-
let rerender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
50882
|
+
setViewBox(viewBox, rerender = !0) {
|
|
51361
50883
|
return this._stage ? (!viewBox || this._viewBox && viewBox.x1 === this._viewBox.x1 && viewBox.x2 === this._viewBox.x2 && viewBox.y1 === this._viewBox.y1 && viewBox.y2 === this._viewBox.y2 || (this._viewBox = viewBox, this._stage.setViewBox(viewBox.x1, viewBox.y1, viewBox.x2 - viewBox.x1, viewBox.y2 - viewBox.y1, rerender)), this) : this;
|
|
51362
50884
|
}
|
|
51363
|
-
render() {
|
|
51364
|
-
let immediately = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
50885
|
+
render(immediately = !1) {
|
|
51365
50886
|
return this._view.emit(HOOK_EVENT.BEFORE_VRENDER_DRAW), this.initStage(), this._stage.disableDirtyBounds(), this._stage.afterNextRender(this.handleAfterNextRender), immediately && (this._stage.render(), this._view.emit(HOOK_EVENT.AFTER_VRENDER_DRAW)), this;
|
|
51366
50887
|
}
|
|
51367
50888
|
renderNextFrame() {
|
|
@@ -51468,8 +50989,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
51468
50989
|
canvasY: pos.y
|
|
51469
50990
|
};
|
|
51470
50991
|
}
|
|
51471
|
-
function defineSrPosition(event, pos) {
|
|
51472
|
-
let client = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
50992
|
+
function defineSrPosition(event, pos, client = !0) {
|
|
51473
50993
|
const keys = ["canvasX", "canvasY"];
|
|
51474
50994
|
return client && (keys.push("clientX"), keys.push("clientY")), keys.forEach(key => {
|
|
51475
50995
|
isValidNumber$1(pos[key]) && Object.defineProperty(event, key, {
|
|
@@ -52278,8 +51798,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
52278
51798
|
removeChild(mark) {
|
|
52279
51799
|
return this.children = this.children.filter(child => child !== mark), this;
|
|
52280
51800
|
}
|
|
52281
|
-
includesChild(mark) {
|
|
52282
|
-
let descendant = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
51801
|
+
includesChild(mark, descendant = !0) {
|
|
52283
51802
|
return !!this.children.includes(mark) || !!descendant && this.children.some(child => child.markType === GrammarMarkType.group && child.includesChild(mark, !0));
|
|
52284
51803
|
}
|
|
52285
51804
|
updateLayoutChildren() {
|
|
@@ -53319,13 +52838,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
53319
52838
|
fn();
|
|
53320
52839
|
});
|
|
53321
52840
|
}
|
|
53322
|
-
constructor() {
|
|
53323
|
-
|
|
53324
|
-
|
|
53325
|
-
|
|
53326
|
-
(super(), _this = this), this._observer = null, this._onResize = debounce(function () {
|
|
53327
|
-
const size = _this._getContainerSize();
|
|
53328
|
-
size && _this.resize(size.width, size.height);
|
|
52841
|
+
constructor(options = {}, config = {}) {
|
|
52842
|
+
super(), this._observer = null, this._onResize = debounce((...args) => {
|
|
52843
|
+
const size = this._getContainerSize();
|
|
52844
|
+
size && this.resize(size.width, size.height);
|
|
53329
52845
|
}, 100), this.delegateEvent = (event, type) => {
|
|
53330
52846
|
const extendedEvt = getExtendedEvents(this, event, type, EVENT_SOURCE_VIEW);
|
|
53331
52847
|
this.emit(type, extendedEvt, event.element);
|
|
@@ -53435,22 +52951,19 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
53435
52951
|
glyphType: glyphType
|
|
53436
52952
|
});
|
|
53437
52953
|
}
|
|
53438
|
-
component(componentType, group) {
|
|
53439
|
-
let mode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "2d";
|
|
52954
|
+
component(componentType, group, mode = "2d") {
|
|
53440
52955
|
return this.mark(GrammarMarkType.component, group, {
|
|
53441
52956
|
componentType: componentType,
|
|
53442
52957
|
mode: mode
|
|
53443
52958
|
});
|
|
53444
52959
|
}
|
|
53445
|
-
axis(group) {
|
|
53446
|
-
let mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "2d";
|
|
52960
|
+
axis(group, mode = "2d") {
|
|
53447
52961
|
return this.mark(GrammarMarkType.component, group, {
|
|
53448
52962
|
componentType: ComponentEnum.axis,
|
|
53449
52963
|
mode: mode
|
|
53450
52964
|
});
|
|
53451
52965
|
}
|
|
53452
|
-
grid(group) {
|
|
53453
|
-
let mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "2d";
|
|
52966
|
+
grid(group, mode = "2d") {
|
|
53454
52967
|
return this.mark(GrammarMarkType.component, group, {
|
|
53455
52968
|
componentType: ComponentEnum.grid,
|
|
53456
52969
|
mode: mode
|
|
@@ -53599,8 +53112,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
53599
53112
|
getCurrentTheme() {
|
|
53600
53113
|
return this._theme;
|
|
53601
53114
|
}
|
|
53602
|
-
setCurrentTheme(theme) {
|
|
53603
|
-
let render = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
53115
|
+
setCurrentTheme(theme, render = !0) {
|
|
53604
53116
|
return this.theme(theme), this.grammars.getAllMarks().forEach(mark => {
|
|
53605
53117
|
mark.commit();
|
|
53606
53118
|
}), render ? (this.evaluate(), this.renderer.render(!0)) : this._dataflow.evaluate(), this;
|
|
@@ -53802,8 +53314,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
53802
53314
|
}
|
|
53803
53315
|
return null;
|
|
53804
53316
|
}
|
|
53805
|
-
resize(width, height) {
|
|
53806
|
-
let render = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
53317
|
+
resize(width, height, render = !0) {
|
|
53807
53318
|
let needDataflow = !1;
|
|
53808
53319
|
return width !== this.width() && (needDataflow = !0, this.updateSignal(SIGNAL_WIDTH, width)), height !== this.height() && (needDataflow = !0, this.updateSignal(SIGNAL_HEIGHT, height)), needDataflow && (render ? this.evaluate({
|
|
53809
53320
|
morph: !1
|
|
@@ -54088,8 +53599,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54088
53599
|
getGlyphGraphicItems() {
|
|
54089
53600
|
return this.glyphGraphicItems;
|
|
54090
53601
|
}
|
|
54091
|
-
initGraphicItem() {
|
|
54092
|
-
let attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
53602
|
+
initGraphicItem(attributes = {}) {
|
|
54093
53603
|
if (this.graphicItem) return;
|
|
54094
53604
|
this.graphicItem = this.mark.addGraphicItem(attributes, this.groupKey), this.graphicItem[BridgeElementKey] = this, this.graphicItem.onBeforeAttributeUpdate = this._onGlyphAttributeUpdate(!1);
|
|
54095
53605
|
const glyphMarks = this.glyphMeta.getMarks();
|
|
@@ -54150,8 +53660,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54150
53660
|
}
|
|
54151
53661
|
return defaultEncodeValues;
|
|
54152
53662
|
}
|
|
54153
|
-
_onGlyphAttributeUpdate() {
|
|
54154
|
-
let first = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
53663
|
+
_onGlyphAttributeUpdate(first = !1) {
|
|
54155
53664
|
return attributes => {
|
|
54156
53665
|
if (!this.mark) return attributes;
|
|
54157
53666
|
const glyphMarks = this.glyphMeta.getMarks(),
|
|
@@ -54185,26 +53694,20 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54185
53694
|
glyphItem.nextAttrs = Object.assign({}, items[index].nextAttrs, additionalAttributes);
|
|
54186
53695
|
}), glyphItems;
|
|
54187
53696
|
}
|
|
54188
|
-
getGraphicAttribute(channel) {
|
|
54189
|
-
let prev = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
54190
|
-
let markName = arguments.length > 2 ? arguments[2] : undefined;
|
|
53697
|
+
getGraphicAttribute(channel, prev = !1, markName) {
|
|
54191
53698
|
if (!this.graphicItem) return;
|
|
54192
53699
|
const prevGraphicAttributes = this.getPrevGraphicAttributes(markName);
|
|
54193
53700
|
if (prev && has$1(prevGraphicAttributes, channel)) return prevGraphicAttributes[channel];
|
|
54194
53701
|
return (markName ? this.glyphGraphicItems[markName] : this.graphicItem).attribute[channel];
|
|
54195
53702
|
}
|
|
54196
|
-
setGraphicAttribute(channel, value) {
|
|
54197
|
-
let final = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
54198
|
-
let markName = arguments.length > 3 ? arguments[3] : undefined;
|
|
53703
|
+
setGraphicAttribute(channel, value, final = !0, markName) {
|
|
54199
53704
|
if (!this.graphicItem) return;
|
|
54200
53705
|
const graphicItem = markName ? this.glyphGraphicItems[markName] : this.graphicItem,
|
|
54201
53706
|
finalGraphicAttributes = this.getFinalGraphicAttributes(markName),
|
|
54202
53707
|
prevGraphicAttributes = this.getPrevGraphicAttributes(markName);
|
|
54203
53708
|
final && (finalGraphicAttributes[channel] = value), has$1(prevGraphicAttributes, channel) || (prevGraphicAttributes[channel] = graphicItem.attribute[channel]), graphicItem.setAttribute(channel, value);
|
|
54204
53709
|
}
|
|
54205
|
-
setGraphicAttributes(attributes) {
|
|
54206
|
-
let final = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
54207
|
-
let markName = arguments.length > 2 ? arguments[2] : undefined;
|
|
53710
|
+
setGraphicAttributes(attributes, final = !0, markName) {
|
|
54208
53711
|
if (!this.graphicItem) return;
|
|
54209
53712
|
const graphicItem = markName ? this.glyphGraphicItems[markName] : this.graphicItem,
|
|
54210
53713
|
finalGraphicAttributes = this.getFinalGraphicAttributes(markName),
|
|
@@ -55141,8 +54644,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
55141
54644
|
}
|
|
55142
54645
|
return t;
|
|
55143
54646
|
};
|
|
55144
|
-
const generateLabelAttributes =
|
|
55145
|
-
let theme = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
|
|
54647
|
+
const generateLabelAttributes = (marks, groupSize, encoder, labelStyle, parameters, theme = {}) => {
|
|
55146
54648
|
var _a;
|
|
55147
54649
|
const labelTheme = null === (_a = theme.components) || void 0 === _a ? void 0 : _a.dataLabel,
|
|
55148
54650
|
dataLabels = marks.map((mark, index) => {
|
|
@@ -56949,9 +56451,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56949
56451
|
animate(animationParameters, parameters) {
|
|
56950
56452
|
return this.isAnimating = !0, this.animateElement(animationParameters, parameters), 0 === this.runnings.length && this.animationEnd(), this;
|
|
56951
56453
|
}
|
|
56952
|
-
stop() {
|
|
56953
|
-
let stopState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "end";
|
|
56954
|
-
let invokeCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
56454
|
+
stop(stopState = "end", invokeCallback = !0) {
|
|
56955
56455
|
return this.runnings.forEach(running => running.stop(stopState)), this.animationEnd(invokeCallback), this;
|
|
56956
56456
|
}
|
|
56957
56457
|
pause() {
|
|
@@ -56974,8 +56474,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56974
56474
|
getEndAttributes() {
|
|
56975
56475
|
return this.runnings.reduce((attributes, running) => Object.assign(attributes, running.getEndProps()), {});
|
|
56976
56476
|
}
|
|
56977
|
-
animationEnd() {
|
|
56978
|
-
let invokeCallback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
56477
|
+
animationEnd(invokeCallback = !0) {
|
|
56979
56478
|
var _a;
|
|
56980
56479
|
this.isAnimating = !1, this.runnings = null, invokeCallback && (null === (_a = this.callbackFunction) || void 0 === _a || _a.call(null));
|
|
56981
56480
|
}
|
|
@@ -57077,8 +56576,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57077
56576
|
normalizedConfig = normalizedConfig.concat(normalizeStateAnimationConfig(state, config[state]));
|
|
57078
56577
|
}), normalizedConfig;
|
|
57079
56578
|
}
|
|
57080
|
-
function normalizeStateAnimationConfig(state, config) {
|
|
57081
|
-
let initialIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
56579
|
+
function normalizeStateAnimationConfig(state, config, initialIndex = 0) {
|
|
57082
56580
|
const normalizedConfig = [];
|
|
57083
56581
|
let index = initialIndex;
|
|
57084
56582
|
return array(config).forEach(animationConfig => {
|
|
@@ -57248,8 +56746,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57248
56746
|
release() {
|
|
57249
56747
|
this.stop(), this.animators.clear(), this.configs = null, this.animators = null, this.elementRecorder = null, this.timelineCount = null;
|
|
57250
56748
|
}
|
|
57251
|
-
animateByTimeline(config, elements, parameters) {
|
|
57252
|
-
let forceState = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
|
|
56749
|
+
animateByTimeline(config, elements, parameters, forceState = !1) {
|
|
57253
56750
|
var _a;
|
|
57254
56751
|
const animators = [],
|
|
57255
56752
|
animatedElements = elements.filter(element => {
|
|
@@ -57348,8 +56845,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57348
56845
|
timeSlices: timeSlices
|
|
57349
56846
|
};
|
|
57350
56847
|
}
|
|
57351
|
-
clearElementAnimation(element) {
|
|
57352
|
-
let clearElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
56848
|
+
clearElementAnimation(element, clearElement = !0) {
|
|
57353
56849
|
this.animators.forEach(animators => {
|
|
57354
56850
|
animators.forEach(animator => {
|
|
57355
56851
|
animator.element === element && (animator.animationOptions.state === DiffState.exit ? animator.stop("start", !1) : animator.stop("end", !1), this.handleAnimatorEnd(animator, clearElement));
|
|
@@ -57362,12 +56858,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57362
56858
|
this.clearElement(element, i === elements.length - 1);
|
|
57363
56859
|
});
|
|
57364
56860
|
}
|
|
57365
|
-
clearElement(element) {
|
|
57366
|
-
let updateMark = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
56861
|
+
clearElement(element, updateMark = !0) {
|
|
57367
56862
|
this.clearElementAnimation(element), element.getGraphicItem() && (element.clearGraphicAttributes(), element.diffState === DiffState.exit && (element.isReserved = !1), updateMark && this.mark.cleanExitElements());
|
|
57368
56863
|
}
|
|
57369
|
-
handleAnimatorEnd(animator) {
|
|
57370
|
-
let clearElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
56864
|
+
handleAnimatorEnd(animator, clearElement = !0) {
|
|
57371
56865
|
const element = animator.element,
|
|
57372
56866
|
animationOptions = animator.animationOptions,
|
|
57373
56867
|
animationState = animationOptions.state,
|
|
@@ -64294,7 +63788,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
64294
63788
|
};
|
|
64295
63789
|
registerVChartCore();
|
|
64296
63790
|
|
|
64297
|
-
const version = "1.13.
|
|
63791
|
+
const version = "1.13.13";
|
|
64298
63792
|
|
|
64299
63793
|
const addVChartProperty = (data, op) => {
|
|
64300
63794
|
const context = op.beforeCall();
|
|
@@ -78856,7 +78350,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
78856
78350
|
return this._startAngle;
|
|
78857
78351
|
}
|
|
78858
78352
|
_layoutAngleAxis() {
|
|
78859
|
-
var _a, _b, _c;
|
|
78353
|
+
var _a, _b, _c, _d, _e;
|
|
78860
78354
|
const center = this.getCenter();
|
|
78861
78355
|
const radius = this.computeLayoutOuterRadius();
|
|
78862
78356
|
const innerRadius = this.computeLayoutInnerRadius();
|
|
@@ -78864,7 +78358,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
78864
78358
|
const items = this.getLabelItems(angleRange);
|
|
78865
78359
|
const commonAttrs = Object.assign(Object.assign({}, this.getLayoutStartPoint()), { inside: this._spec.inside, center,
|
|
78866
78360
|
radius,
|
|
78867
|
-
innerRadius, startAngle: this._startAngle, endAngle: this._endAngle,
|
|
78361
|
+
innerRadius, startAngle: this._startAngle, endAngle: this._endAngle, layoutRect: this.getRefLayoutRect(), autoLabelMaxWidth: (_b = (_a = this._spec.label) === null || _a === void 0 ? void 0 : _a.autoLabelMaxWidth) !== null && _b !== void 0 ? _b : false, sides: ((_e = (_d = (_c = this._getRelatedAxis(this._option.radiusAxisIndex)) === null || _c === void 0 ? void 0 : _c.getSpec()) === null || _d === void 0 ? void 0 : _d.grid) === null || _e === void 0 ? void 0 : _e.smooth)
|
|
78868
78362
|
? undefined
|
|
78869
78363
|
: this.getScale().domain().length });
|
|
78870
78364
|
const attrs = Object.assign(Object.assign({}, commonAttrs), { size: this.getRefLayoutRect(), title: {
|
|
@@ -81881,9 +81375,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
81881
81375
|
}
|
|
81882
81376
|
return this.pointsAtRadius[radius] = points, points;
|
|
81883
81377
|
}
|
|
81884
|
-
getTextInfo(item) {
|
|
81885
|
-
let shrinkRatio = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
81886
|
-
let index = arguments.length > 2 ? arguments[2] : undefined;
|
|
81378
|
+
getTextInfo(item, shrinkRatio = 1, index) {
|
|
81887
81379
|
var _a;
|
|
81888
81380
|
const sizeShrinkRatio = this.options.clip ? 1 : shrinkRatio,
|
|
81889
81381
|
fontSize = Math.max(Math.floor((this.isTryRepeatFill ? this.options.fillTextFontSize : this.getTextFontSize(item)) * sizeShrinkRatio), this.options.minFontSize);
|
|
@@ -81961,8 +81453,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
81961
81453
|
}
|
|
81962
81454
|
return !0;
|
|
81963
81455
|
}
|
|
81964
|
-
layoutWord(index) {
|
|
81965
|
-
let shrinkRatio = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
81456
|
+
layoutWord(index, shrinkRatio = 1) {
|
|
81966
81457
|
const item = this.data[index],
|
|
81967
81458
|
info = this.getTextInfo(item, shrinkRatio, index);
|
|
81968
81459
|
if (!info) return !1;
|
|
@@ -84377,9 +83868,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
84377
83868
|
}));
|
|
84378
83869
|
};
|
|
84379
83870
|
|
|
84380
|
-
const flattenNodes =
|
|
84381
|
-
let output = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
84382
|
-
let options = arguments.length > 2 ? arguments[2] : undefined;
|
|
83871
|
+
const flattenNodes = (nodes, output = [], options) => {
|
|
84383
83872
|
const hasMaxDepth = (null == options ? void 0 : options.maxDepth) >= 0;
|
|
84384
83873
|
return nodes.forEach(node => {
|
|
84385
83874
|
(!hasMaxDepth || node.depth <= options.maxDepth) && (output.push((null == options ? void 0 : options.callback) ? options.callback(node) : node), node.children && (hasMaxDepth && node.depth === options.maxDepth ? (node.children = null, node.isLeaf = !0) : flattenNodes(node.children, output, options)));
|
|
@@ -84420,13 +83909,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
84420
83909
|
partition(0, n, parent.value, x0, y0, x1, y1);
|
|
84421
83910
|
}
|
|
84422
83911
|
|
|
84423
|
-
function dice (parent, x0, y0, x1, y1
|
|
84424
|
-
|
|
84425
|
-
|
|
84426
|
-
|
|
84427
|
-
|
|
84428
|
-
|
|
84429
|
-
};
|
|
83912
|
+
function dice (parent, x0, y0, x1, y1, keyMap = {
|
|
83913
|
+
x0: "x0",
|
|
83914
|
+
x1: "x1",
|
|
83915
|
+
y0: "y0",
|
|
83916
|
+
y1: "y1"
|
|
83917
|
+
}) {
|
|
84430
83918
|
const nodes = parent.children;
|
|
84431
83919
|
let node,
|
|
84432
83920
|
i = -1;
|
|
@@ -84489,12 +83977,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
84489
83977
|
squarifyRatio(ratio, parent, x0, y0, x1, y1);
|
|
84490
83978
|
};
|
|
84491
83979
|
|
|
84492
|
-
const calculateNodeValue$1 =
|
|
84493
|
-
let depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
84494
|
-
let flattenIndex = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : -1;
|
|
84495
|
-
let parent = arguments.length > 4 ? arguments[4] : undefined;
|
|
84496
|
-
let getNodeKey = arguments.length > 5 ? arguments[5] : undefined;
|
|
84497
|
-
let valueField = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : "value";
|
|
83980
|
+
const calculateNodeValue$1 = (subTree, output, depth = 0, flattenIndex = -1, parent, getNodeKey, valueField = "value") => {
|
|
84498
83981
|
let sum = 0,
|
|
84499
83982
|
prevFlattenIndex = null != flattenIndex ? flattenIndex : -1,
|
|
84500
83983
|
maxDepth = depth;
|
|
@@ -84814,8 +84297,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
84814
84297
|
const a = 1664525,
|
|
84815
84298
|
c = 1013904223,
|
|
84816
84299
|
m = 4294967296;
|
|
84817
|
-
function randomLCG() {
|
|
84818
|
-
let initS = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
84300
|
+
function randomLCG(initS = 1) {
|
|
84819
84301
|
let s = initS;
|
|
84820
84302
|
return () => (s = (a * s + c) % m) / m;
|
|
84821
84303
|
}
|
|
@@ -90030,21 +89512,18 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
90030
89512
|
circleList = Object.values(circles);
|
|
90031
89513
|
if (!circleList.length) return [];
|
|
90032
89514
|
intersectionArea(circleList, areaStats);
|
|
90033
|
-
const arcs = areaStats.arcs.map(
|
|
90034
|
-
|
|
90035
|
-
|
|
90036
|
-
|
|
90037
|
-
|
|
90038
|
-
|
|
90039
|
-
|
|
90040
|
-
|
|
90041
|
-
|
|
90042
|
-
|
|
90043
|
-
|
|
90044
|
-
|
|
90045
|
-
largeArcFlag: width > circle.radius
|
|
90046
|
-
};
|
|
90047
|
-
}),
|
|
89515
|
+
const arcs = areaStats.arcs.map(({
|
|
89516
|
+
p1: p1,
|
|
89517
|
+
p2: p2,
|
|
89518
|
+
circle: circle,
|
|
89519
|
+
width: width
|
|
89520
|
+
}) => ({
|
|
89521
|
+
p1: p1,
|
|
89522
|
+
p2: p2,
|
|
89523
|
+
radius: circle.radius,
|
|
89524
|
+
setId: circle.setId,
|
|
89525
|
+
largeArcFlag: width > circle.radius
|
|
89526
|
+
})),
|
|
90048
89527
|
result = [];
|
|
90049
89528
|
let i = 0,
|
|
90050
89529
|
arc = arcs[0];
|
|
@@ -104741,6 +104220,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
104741
104220
|
};
|
|
104742
104221
|
this.onWheel = (e) => {
|
|
104743
104222
|
var _a, _b;
|
|
104223
|
+
if (this._spec.preventDefault !== false) {
|
|
104224
|
+
e.preventDefault();
|
|
104225
|
+
e.stopPropagation();
|
|
104226
|
+
}
|
|
104744
104227
|
const scrollX = e.deltaX;
|
|
104745
104228
|
const scrollY = e.deltaY;
|
|
104746
104229
|
const rootMark = this.getRootMark();
|
|
@@ -104750,7 +104233,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
104750
104233
|
const { percent: yPercent, y } = (_a = this._computeFinalScrollY(rootMark.attribute.y - scrollY)) !== null && _a !== void 0 ? _a : {};
|
|
104751
104234
|
const { percent: xPercent, x } = (_b = this._computeFinalScrollX(rootMark.attribute.x - scrollX)) !== null && _b !== void 0 ? _b : {};
|
|
104752
104235
|
const eventResult = {};
|
|
104753
|
-
const isScroll = isValidNumber$1(x) || isValidNumber$1(y);
|
|
104754
104236
|
if (isValidNumber$1(x)) {
|
|
104755
104237
|
this._updateScrollX(rootMark, x, xPercent);
|
|
104756
104238
|
eventResult.x = x;
|
|
@@ -104759,12 +104241,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
104759
104241
|
this._updateScrollY(rootMark, y, yPercent);
|
|
104760
104242
|
eventResult.y = y;
|
|
104761
104243
|
}
|
|
104762
|
-
if (isScroll) {
|
|
104763
|
-
if (this._spec.preventDefault !== false) {
|
|
104764
|
-
e.preventDefault();
|
|
104765
|
-
e.stopPropagation();
|
|
104766
|
-
}
|
|
104767
|
-
}
|
|
104768
104244
|
this._event.emit('chartScroll', eventResult);
|
|
104769
104245
|
};
|
|
104770
104246
|
}
|
|
@@ -104821,7 +104297,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
104821
104297
|
}
|
|
104822
104298
|
_computeFinalScrollY(y) {
|
|
104823
104299
|
var _a;
|
|
104824
|
-
y = Math.max(this._scrollLimit.y.min, Math.min(y, this._scrollLimit.y.max));
|
|
104825
104300
|
if (this._lastScrollY === y) {
|
|
104826
104301
|
return null;
|
|
104827
104302
|
}
|
|
@@ -104829,15 +104304,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
104829
104304
|
if (((_a = this._spec.y) === null || _a === void 0 ? void 0 : _a.enable) === false) {
|
|
104830
104305
|
return null;
|
|
104831
104306
|
}
|
|
104832
|
-
const
|
|
104307
|
+
const finalY = Math.max(this._scrollLimit.y.min, Math.min(y, this._scrollLimit.y.max));
|
|
104308
|
+
const percent = Math.abs(finalY / this._scrollLimit.y.size);
|
|
104833
104309
|
return {
|
|
104834
|
-
y,
|
|
104310
|
+
y: finalY,
|
|
104835
104311
|
percent
|
|
104836
104312
|
};
|
|
104837
104313
|
}
|
|
104838
104314
|
_computeFinalScrollX(x) {
|
|
104839
104315
|
var _a;
|
|
104840
|
-
x = Math.max(this._scrollLimit.x.min, Math.min(x, this._scrollLimit.x.max));
|
|
104841
104316
|
if (this._lastScrollX === x) {
|
|
104842
104317
|
return null;
|
|
104843
104318
|
}
|
|
@@ -104845,9 +104320,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
104845
104320
|
if (((_a = this._spec.x) === null || _a === void 0 ? void 0 : _a.enable) === false) {
|
|
104846
104321
|
return null;
|
|
104847
104322
|
}
|
|
104848
|
-
const
|
|
104323
|
+
const finalX = Math.max(this._scrollLimit.x.min, Math.min(x, this._scrollLimit.x.max));
|
|
104324
|
+
const percent = Math.abs(finalX / this._scrollLimit.x.size);
|
|
104849
104325
|
return {
|
|
104850
|
-
x,
|
|
104326
|
+
x: finalX,
|
|
104851
104327
|
percent
|
|
104852
104328
|
};
|
|
104853
104329
|
}
|