@visactor/vrender 0.15.0-alpha.15 → 0.15.0-alpha.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/graphic/config.js +3 -1
- package/cjs/graphic/config.js.map +1 -1
- package/cjs/graphic/graphic.js +9 -2
- package/cjs/graphic/graphic.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/interface/graphic/line.d.ts +1 -0
- package/cjs/interface/graphic/line.js.map +1 -1
- package/cjs/interface/graphic.d.ts +1 -0
- package/cjs/interface/graphic.js.map +1 -1
- package/cjs/render/contributions/render/area-render.js +31 -21
- package/cjs/render/contributions/render/area-render.js.map +1 -1
- package/cjs/render/contributions/render/line-render.js +50 -23
- package/cjs/render/contributions/render/line-render.js.map +1 -1
- package/dist/index.js +271 -204
- package/dist/index.min.js +1 -1
- package/es/graphic/config.js +3 -1
- package/es/graphic/config.js.map +1 -1
- package/es/graphic/graphic.js +9 -2
- package/es/graphic/graphic.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/interface/graphic/line.d.ts +1 -0
- package/es/interface/graphic/line.js.map +1 -1
- package/es/interface/graphic.d.ts +1 -0
- package/es/interface/graphic.js.map +1 -1
- package/es/render/contributions/render/area-render.js +30 -20
- package/es/render/contributions/render/area-render.js.map +1 -1
- package/es/render/contributions/render/line-render.js +49 -22
- package/es/render/contributions/render/line-render.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -344,7 +344,7 @@
|
|
|
344
344
|
var isCallable$h = isCallable$i;
|
|
345
345
|
var $documentAll = documentAll_1;
|
|
346
346
|
var documentAll = $documentAll.all;
|
|
347
|
-
var isObject$
|
|
347
|
+
var isObject$f = $documentAll.IS_HTMLDDA ? function (it) {
|
|
348
348
|
return _typeof(it) == 'object' ? it !== null : isCallable$h(it) || it === documentAll;
|
|
349
349
|
} : function (it) {
|
|
350
350
|
return _typeof(it) == 'object' ? it !== null : isCallable$h(it);
|
|
@@ -453,16 +453,16 @@
|
|
|
453
453
|
|
|
454
454
|
var call$7 = functionCall;
|
|
455
455
|
var isCallable$d = isCallable$i;
|
|
456
|
-
var isObject$
|
|
456
|
+
var isObject$e = isObject$f;
|
|
457
457
|
var $TypeError$7 = TypeError;
|
|
458
458
|
|
|
459
459
|
// `OrdinaryToPrimitive` abstract operation
|
|
460
460
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
461
461
|
var ordinaryToPrimitive$1 = function ordinaryToPrimitive(input, pref) {
|
|
462
462
|
var fn, val;
|
|
463
|
-
if (pref === 'string' && isCallable$d(fn = input.toString) && !isObject$
|
|
464
|
-
if (isCallable$d(fn = input.valueOf) && !isObject$
|
|
465
|
-
if (pref !== 'string' && isCallable$d(fn = input.toString) && !isObject$
|
|
463
|
+
if (pref === 'string' && isCallable$d(fn = input.toString) && !isObject$e(val = call$7(fn, input))) return val;
|
|
464
|
+
if (isCallable$d(fn = input.valueOf) && !isObject$e(val = call$7(fn, input))) return val;
|
|
465
|
+
if (pref !== 'string' && isCallable$d(fn = input.toString) && !isObject$e(val = call$7(fn, input))) return val;
|
|
466
466
|
throw $TypeError$7("Can't convert object to primitive value");
|
|
467
467
|
};
|
|
468
468
|
|
|
@@ -548,7 +548,7 @@
|
|
|
548
548
|
};
|
|
549
549
|
|
|
550
550
|
var call$6 = functionCall;
|
|
551
|
-
var isObject$
|
|
551
|
+
var isObject$d = isObject$f;
|
|
552
552
|
var isSymbol$1 = isSymbol$2;
|
|
553
553
|
var getMethod$2 = getMethod$3;
|
|
554
554
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
@@ -559,13 +559,13 @@
|
|
|
559
559
|
// `ToPrimitive` abstract operation
|
|
560
560
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
561
561
|
var toPrimitive$1 = function toPrimitive(input, pref) {
|
|
562
|
-
if (!isObject$
|
|
562
|
+
if (!isObject$d(input) || isSymbol$1(input)) return input;
|
|
563
563
|
var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
|
|
564
564
|
var result;
|
|
565
565
|
if (exoticToPrim) {
|
|
566
566
|
if (pref === undefined) pref = 'default';
|
|
567
567
|
result = call$6(exoticToPrim, input, pref);
|
|
568
|
-
if (!isObject$
|
|
568
|
+
if (!isObject$d(result) || isSymbol$1(result)) return result;
|
|
569
569
|
throw $TypeError$6("Can't convert object to primitive value");
|
|
570
570
|
}
|
|
571
571
|
if (pref === undefined) pref = 'number';
|
|
@@ -583,10 +583,10 @@
|
|
|
583
583
|
};
|
|
584
584
|
|
|
585
585
|
var global$6 = global$d;
|
|
586
|
-
var isObject$
|
|
586
|
+
var isObject$c = isObject$f;
|
|
587
587
|
var document$1 = global$6.document;
|
|
588
588
|
// typeof document.createElement is 'object' in old IE
|
|
589
|
-
var EXISTS$1 = isObject$
|
|
589
|
+
var EXISTS$1 = isObject$c(document$1) && isObject$c(document$1.createElement);
|
|
590
590
|
var documentCreateElement$1 = function documentCreateElement(it) {
|
|
591
591
|
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
592
592
|
};
|
|
@@ -643,13 +643,13 @@
|
|
|
643
643
|
}).prototype != 42;
|
|
644
644
|
});
|
|
645
645
|
|
|
646
|
-
var isObject$
|
|
646
|
+
var isObject$b = isObject$f;
|
|
647
647
|
var $String$2 = String;
|
|
648
648
|
var $TypeError$5 = TypeError;
|
|
649
649
|
|
|
650
650
|
// `Assert: Type(argument) is Object`
|
|
651
651
|
var anObject$i = function anObject(argument) {
|
|
652
|
-
if (isObject$
|
|
652
|
+
if (isObject$b(argument)) return argument;
|
|
653
653
|
throw $TypeError$5($String$2(argument) + ' is not an object');
|
|
654
654
|
};
|
|
655
655
|
|
|
@@ -753,7 +753,7 @@
|
|
|
753
753
|
|
|
754
754
|
var NATIVE_WEAK_MAP$1 = weakMapBasicDetection;
|
|
755
755
|
var global$4 = global$d;
|
|
756
|
-
var isObject$
|
|
756
|
+
var isObject$a = isObject$f;
|
|
757
757
|
var createNonEnumerableProperty$2 = createNonEnumerableProperty$3;
|
|
758
758
|
var hasOwn$7 = hasOwnProperty_1;
|
|
759
759
|
var shared$1 = sharedStore;
|
|
@@ -762,14 +762,14 @@
|
|
|
762
762
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
763
763
|
var TypeError$1 = global$4.TypeError;
|
|
764
764
|
var WeakMap$1 = global$4.WeakMap;
|
|
765
|
-
var set, get$
|
|
765
|
+
var set, get$2, has$2;
|
|
766
766
|
var enforce = function enforce(it) {
|
|
767
|
-
return has$
|
|
767
|
+
return has$2(it) ? get$2(it) : set(it, {});
|
|
768
768
|
};
|
|
769
769
|
var getterFor = function getterFor(TYPE) {
|
|
770
770
|
return function (it) {
|
|
771
771
|
var state;
|
|
772
|
-
if (!isObject$
|
|
772
|
+
if (!isObject$a(it) || (state = get$2(it)).type !== TYPE) {
|
|
773
773
|
throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
|
|
774
774
|
}
|
|
775
775
|
return state;
|
|
@@ -788,10 +788,10 @@
|
|
|
788
788
|
store$2.set(it, metadata);
|
|
789
789
|
return metadata;
|
|
790
790
|
};
|
|
791
|
-
get$
|
|
791
|
+
get$2 = function get(it) {
|
|
792
792
|
return store$2.get(it) || {};
|
|
793
793
|
};
|
|
794
|
-
has$
|
|
794
|
+
has$2 = function has(it) {
|
|
795
795
|
return store$2.has(it);
|
|
796
796
|
};
|
|
797
797
|
} else {
|
|
@@ -803,17 +803,17 @@
|
|
|
803
803
|
createNonEnumerableProperty$2(it, STATE, metadata);
|
|
804
804
|
return metadata;
|
|
805
805
|
};
|
|
806
|
-
get$
|
|
806
|
+
get$2 = function get(it) {
|
|
807
807
|
return hasOwn$7(it, STATE) ? it[STATE] : {};
|
|
808
808
|
};
|
|
809
|
-
has$
|
|
809
|
+
has$2 = function has(it) {
|
|
810
810
|
return hasOwn$7(it, STATE);
|
|
811
811
|
};
|
|
812
812
|
}
|
|
813
813
|
var internalState = {
|
|
814
814
|
set: set,
|
|
815
|
-
get: get$
|
|
816
|
-
has: has$
|
|
815
|
+
get: get$2,
|
|
816
|
+
has: has$2,
|
|
817
817
|
enforce: enforce,
|
|
818
818
|
getterFor: getterFor
|
|
819
819
|
};
|
|
@@ -1185,7 +1185,7 @@
|
|
|
1185
1185
|
});
|
|
1186
1186
|
|
|
1187
1187
|
var fails$6 = fails$g;
|
|
1188
|
-
var isObject$
|
|
1188
|
+
var isObject$9 = isObject$f;
|
|
1189
1189
|
var classof$4 = classofRaw$2;
|
|
1190
1190
|
var ARRAY_BUFFER_NON_EXTENSIBLE = arrayBufferNonExtensible;
|
|
1191
1191
|
|
|
@@ -1198,7 +1198,7 @@
|
|
|
1198
1198
|
// `Object.isExtensible` method
|
|
1199
1199
|
// https://tc39.es/ecma262/#sec-object.isextensible
|
|
1200
1200
|
var objectIsExtensible = FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE ? function isExtensible(it) {
|
|
1201
|
-
if (!isObject$
|
|
1201
|
+
if (!isObject$9(it)) return false;
|
|
1202
1202
|
if (ARRAY_BUFFER_NON_EXTENSIBLE && classof$4(it) == 'ArrayBuffer') return false;
|
|
1203
1203
|
return $isExtensible ? $isExtensible(it) : true;
|
|
1204
1204
|
} : $isExtensible;
|
|
@@ -1212,7 +1212,7 @@
|
|
|
1212
1212
|
var $$b = _export;
|
|
1213
1213
|
var uncurryThis$d = functionUncurryThis;
|
|
1214
1214
|
var hiddenKeys$1 = hiddenKeys$5;
|
|
1215
|
-
var isObject$
|
|
1215
|
+
var isObject$8 = isObject$f;
|
|
1216
1216
|
var hasOwn$3 = hasOwnProperty_1;
|
|
1217
1217
|
var defineProperty$2 = objectDefineProperty.f;
|
|
1218
1218
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
@@ -1235,7 +1235,7 @@
|
|
|
1235
1235
|
|
|
1236
1236
|
var fastKey$1 = function fastKey(it, create) {
|
|
1237
1237
|
// return a primitive with prefix
|
|
1238
|
-
if (!isObject$
|
|
1238
|
+
if (!isObject$8(it)) return _typeof(it) == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
|
|
1239
1239
|
if (!hasOwn$3(it, METADATA)) {
|
|
1240
1240
|
// can't set metadata to uncaught frozen object
|
|
1241
1241
|
if (!isExtensible$1(it)) return 'F';
|
|
@@ -1591,7 +1591,7 @@
|
|
|
1591
1591
|
}() : undefined);
|
|
1592
1592
|
|
|
1593
1593
|
var isCallable$5 = isCallable$i;
|
|
1594
|
-
var isObject$
|
|
1594
|
+
var isObject$7 = isObject$f;
|
|
1595
1595
|
var setPrototypeOf$1 = objectSetPrototypeOf;
|
|
1596
1596
|
|
|
1597
1597
|
// makes subclassing work correct for wrapped built-ins
|
|
@@ -1601,7 +1601,7 @@
|
|
|
1601
1601
|
// it can work only with native `setPrototypeOf`
|
|
1602
1602
|
setPrototypeOf$1 &&
|
|
1603
1603
|
// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
|
|
1604
|
-
isCallable$5(NewTarget = dummy.constructor) && NewTarget !== Wrapper && isObject$
|
|
1604
|
+
isCallable$5(NewTarget = dummy.constructor) && NewTarget !== Wrapper && isObject$7(NewTargetPrototype = NewTarget.prototype) && NewTargetPrototype !== Wrapper.prototype) setPrototypeOf$1($this, NewTargetPrototype);
|
|
1605
1605
|
return $this;
|
|
1606
1606
|
};
|
|
1607
1607
|
|
|
@@ -1615,7 +1615,7 @@
|
|
|
1615
1615
|
var anInstance$2 = anInstance$3;
|
|
1616
1616
|
var isCallable$4 = isCallable$i;
|
|
1617
1617
|
var isNullOrUndefined$3 = isNullOrUndefined$7;
|
|
1618
|
-
var isObject$
|
|
1618
|
+
var isObject$6 = isObject$f;
|
|
1619
1619
|
var fails$4 = fails$g;
|
|
1620
1620
|
var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
|
|
1621
1621
|
var setToStringTag$2 = setToStringTag$3;
|
|
@@ -1634,11 +1634,11 @@
|
|
|
1634
1634
|
uncurriedNativeMethod(this, value === 0 ? 0 : value);
|
|
1635
1635
|
return this;
|
|
1636
1636
|
} : KEY == 'delete' ? function (key) {
|
|
1637
|
-
return IS_WEAK && !isObject$
|
|
1637
|
+
return IS_WEAK && !isObject$6(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
|
1638
1638
|
} : KEY == 'get' ? function get(key) {
|
|
1639
|
-
return IS_WEAK && !isObject$
|
|
1639
|
+
return IS_WEAK && !isObject$6(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
|
1640
1640
|
} : KEY == 'has' ? function has(key) {
|
|
1641
|
-
return IS_WEAK && !isObject$
|
|
1641
|
+
return IS_WEAK && !isObject$6(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
|
1642
1642
|
} : function set(key, value) {
|
|
1643
1643
|
uncurriedNativeMethod(this, key === 0 ? 0 : key, value);
|
|
1644
1644
|
return this;
|
|
@@ -1869,7 +1869,7 @@
|
|
|
1869
1869
|
|
|
1870
1870
|
var fails$2 = fails$g;
|
|
1871
1871
|
var isCallable$2 = isCallable$i;
|
|
1872
|
-
var isObject$
|
|
1872
|
+
var isObject$5 = isObject$f;
|
|
1873
1873
|
var getPrototypeOf$4 = objectGetPrototypeOf;
|
|
1874
1874
|
var defineBuiltIn$1 = defineBuiltIn$5;
|
|
1875
1875
|
var wellKnownSymbol$3 = wellKnownSymbol$b;
|
|
@@ -1889,7 +1889,7 @@
|
|
|
1889
1889
|
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
|
|
1890
1890
|
}
|
|
1891
1891
|
}
|
|
1892
|
-
var NEW_ITERATOR_PROTOTYPE = !isObject$
|
|
1892
|
+
var NEW_ITERATOR_PROTOTYPE = !isObject$5(IteratorPrototype$2) || fails$2(function () {
|
|
1893
1893
|
var test = {};
|
|
1894
1894
|
// FF44- legacy iterators case
|
|
1895
1895
|
return IteratorPrototype$2[ITERATOR$1].call(test) !== test;
|
|
@@ -2280,7 +2280,7 @@
|
|
|
2280
2280
|
// `IsArray` abstract operation
|
|
2281
2281
|
// https://tc39.es/ecma262/#sec-isarray
|
|
2282
2282
|
// eslint-disable-next-line es/no-array-isarray -- safe
|
|
2283
|
-
var isArray$
|
|
2283
|
+
var isArray$4 = Array.isArray || function isArray(argument) {
|
|
2284
2284
|
return classof$1(argument) == 'Array';
|
|
2285
2285
|
};
|
|
2286
2286
|
|
|
@@ -2333,9 +2333,9 @@
|
|
|
2333
2333
|
}) || called;
|
|
2334
2334
|
}) ? isConstructorLegacy : isConstructorModern;
|
|
2335
2335
|
|
|
2336
|
-
var isArray$
|
|
2336
|
+
var isArray$3 = isArray$4;
|
|
2337
2337
|
var isConstructor = isConstructor$1;
|
|
2338
|
-
var isObject$
|
|
2338
|
+
var isObject$4 = isObject$f;
|
|
2339
2339
|
var wellKnownSymbol = wellKnownSymbol$b;
|
|
2340
2340
|
var SPECIES = wellKnownSymbol('species');
|
|
2341
2341
|
var $Array = Array;
|
|
@@ -2344,10 +2344,10 @@
|
|
|
2344
2344
|
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
2345
2345
|
var arraySpeciesConstructor$1 = function arraySpeciesConstructor(originalArray) {
|
|
2346
2346
|
var C;
|
|
2347
|
-
if (isArray$
|
|
2347
|
+
if (isArray$3(originalArray)) {
|
|
2348
2348
|
C = originalArray.constructor;
|
|
2349
2349
|
// cross-realm fallback
|
|
2350
|
-
if (isConstructor(C) && (C === $Array || isArray$
|
|
2350
|
+
if (isConstructor(C) && (C === $Array || isArray$3(C.prototype))) C = undefined;else if (isObject$4(C)) {
|
|
2351
2351
|
C = C[SPECIES];
|
|
2352
2352
|
if (C === null) C = undefined;
|
|
2353
2353
|
}
|
|
@@ -2454,7 +2454,7 @@
|
|
|
2454
2454
|
var anInstance = anInstance$3;
|
|
2455
2455
|
var anObject$9 = anObject$i;
|
|
2456
2456
|
var isNullOrUndefined$1 = isNullOrUndefined$7;
|
|
2457
|
-
var isObject$
|
|
2457
|
+
var isObject$3 = isObject$f;
|
|
2458
2458
|
var iterate$1 = iterate$4;
|
|
2459
2459
|
var ArrayIterationModule = arrayIteration;
|
|
2460
2460
|
var hasOwn = hasOwnProperty_1;
|
|
@@ -2526,7 +2526,7 @@
|
|
|
2526
2526
|
// https://tc39.es/ecma262/#sec-weakset.prototype.delete
|
|
2527
2527
|
'delete': function _delete(key) {
|
|
2528
2528
|
var state = getInternalState(this);
|
|
2529
|
-
if (!isObject$
|
|
2529
|
+
if (!isObject$3(key)) return false;
|
|
2530
2530
|
var data = getWeakData(key);
|
|
2531
2531
|
if (data === true) return uncaughtFrozenStore(state)['delete'](key);
|
|
2532
2532
|
return data && hasOwn(data, state.id) && delete data[state.id];
|
|
@@ -2536,7 +2536,7 @@
|
|
|
2536
2536
|
// https://tc39.es/ecma262/#sec-weakset.prototype.has
|
|
2537
2537
|
has: function has(key) {
|
|
2538
2538
|
var state = getInternalState(this);
|
|
2539
|
-
if (!isObject$
|
|
2539
|
+
if (!isObject$3(key)) return false;
|
|
2540
2540
|
var data = getWeakData(key);
|
|
2541
2541
|
if (data === true) return uncaughtFrozenStore(state).has(key);
|
|
2542
2542
|
return data && hasOwn(data, state.id);
|
|
@@ -2547,7 +2547,7 @@
|
|
|
2547
2547
|
// https://tc39.es/ecma262/#sec-weakmap.prototype.get
|
|
2548
2548
|
get: function get(key) {
|
|
2549
2549
|
var state = getInternalState(this);
|
|
2550
|
-
if (isObject$
|
|
2550
|
+
if (isObject$3(key)) {
|
|
2551
2551
|
var data = getWeakData(key);
|
|
2552
2552
|
if (data === true) return uncaughtFrozenStore(state).get(key);
|
|
2553
2553
|
return data ? data[state.id] : undefined;
|
|
@@ -2576,13 +2576,13 @@
|
|
|
2576
2576
|
var InternalMetadataModule = internalMetadataExports;
|
|
2577
2577
|
var collection = collection$2;
|
|
2578
2578
|
var collectionWeak = collectionWeak$1;
|
|
2579
|
-
var isObject$
|
|
2579
|
+
var isObject$2 = isObject$f;
|
|
2580
2580
|
var enforceInternalState = internalState.enforce;
|
|
2581
2581
|
var fails = fails$g;
|
|
2582
2582
|
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
2583
2583
|
var $Object = Object;
|
|
2584
2584
|
// eslint-disable-next-line es/no-array-isarray -- safe
|
|
2585
|
-
var isArray$
|
|
2585
|
+
var isArray$2 = Array.isArray;
|
|
2586
2586
|
// eslint-disable-next-line es/no-object-isextensible -- safe
|
|
2587
2587
|
var isExtensible = $Object.isExtensible;
|
|
2588
2588
|
// eslint-disable-next-line es/no-object-isfrozen -- safe
|
|
@@ -2629,7 +2629,7 @@
|
|
|
2629
2629
|
var nativeGet = uncurryThis$5(WeakMapPrototype.get);
|
|
2630
2630
|
defineBuiltIns(WeakMapPrototype, {
|
|
2631
2631
|
'delete': function _delete(key) {
|
|
2632
|
-
if (isObject$
|
|
2632
|
+
if (isObject$2(key) && !isExtensible(key)) {
|
|
2633
2633
|
var state = enforceInternalState(this);
|
|
2634
2634
|
if (!state.frozen) state.frozen = new InternalWeakMap();
|
|
2635
2635
|
return nativeDelete(this, key) || state.frozen['delete'](key);
|
|
@@ -2637,7 +2637,7 @@
|
|
|
2637
2637
|
return nativeDelete(this, key);
|
|
2638
2638
|
},
|
|
2639
2639
|
has: function has(key) {
|
|
2640
|
-
if (isObject$
|
|
2640
|
+
if (isObject$2(key) && !isExtensible(key)) {
|
|
2641
2641
|
var state = enforceInternalState(this);
|
|
2642
2642
|
if (!state.frozen) state.frozen = new InternalWeakMap();
|
|
2643
2643
|
return nativeHas(this, key) || state.frozen.has(key);
|
|
@@ -2645,7 +2645,7 @@
|
|
|
2645
2645
|
return nativeHas(this, key);
|
|
2646
2646
|
},
|
|
2647
2647
|
get: function get(key) {
|
|
2648
|
-
if (isObject$
|
|
2648
|
+
if (isObject$2(key) && !isExtensible(key)) {
|
|
2649
2649
|
var state = enforceInternalState(this);
|
|
2650
2650
|
if (!state.frozen) state.frozen = new InternalWeakMap();
|
|
2651
2651
|
return nativeHas(this, key) ? nativeGet(this, key) : state.frozen.get(key);
|
|
@@ -2653,7 +2653,7 @@
|
|
|
2653
2653
|
return nativeGet(this, key);
|
|
2654
2654
|
},
|
|
2655
2655
|
set: function set(key, value) {
|
|
2656
|
-
if (isObject$
|
|
2656
|
+
if (isObject$2(key) && !isExtensible(key)) {
|
|
2657
2657
|
var state = enforceInternalState(this);
|
|
2658
2658
|
if (!state.frozen) state.frozen = new InternalWeakMap();
|
|
2659
2659
|
nativeHas(this, key) ? nativeSet(this, key, value) : state.frozen.set(key, value);
|
|
@@ -2666,7 +2666,7 @@
|
|
|
2666
2666
|
defineBuiltIns(WeakMapPrototype, {
|
|
2667
2667
|
set: function set(key, value) {
|
|
2668
2668
|
var arrayIntegrityLevel;
|
|
2669
|
-
if (isArray$
|
|
2669
|
+
if (isArray$2(key)) {
|
|
2670
2670
|
if (isFrozen(key)) arrayIntegrityLevel = FROZEN;else if (isSealed(key)) arrayIntegrityLevel = SEALED;
|
|
2671
2671
|
}
|
|
2672
2672
|
nativeSet(this, key, value);
|
|
@@ -6708,79 +6708,96 @@
|
|
|
6708
6708
|
var isType = function isType(value, type) {
|
|
6709
6709
|
return Object.prototype.toString.call(value) === "[object ".concat(type, "]");
|
|
6710
6710
|
};
|
|
6711
|
+
var isType$1 = isType;
|
|
6711
6712
|
|
|
6712
6713
|
var isBoolean = function isBoolean(value) {
|
|
6713
6714
|
var fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
6714
|
-
return fuzzy ? "boolean" == typeof value : !0 === value || !1 === value || isType(value, "Boolean");
|
|
6715
|
+
return fuzzy ? "boolean" == typeof value : !0 === value || !1 === value || isType$1(value, "Boolean");
|
|
6715
6716
|
};
|
|
6717
|
+
var isBoolean$1 = isBoolean;
|
|
6716
6718
|
|
|
6717
6719
|
var isFunction = function isFunction(value) {
|
|
6718
6720
|
return "function" == typeof value;
|
|
6719
6721
|
};
|
|
6722
|
+
var isFunction$1 = isFunction;
|
|
6720
6723
|
|
|
6721
6724
|
var isNil = function isNil(value) {
|
|
6722
6725
|
return null == value;
|
|
6723
6726
|
};
|
|
6727
|
+
var isNil$1 = isNil;
|
|
6724
6728
|
|
|
6725
6729
|
var isValid = function isValid(value) {
|
|
6726
6730
|
return null != value;
|
|
6727
6731
|
};
|
|
6732
|
+
var isValid$1 = isValid;
|
|
6728
6733
|
|
|
6729
6734
|
var isObject = function isObject(value) {
|
|
6730
6735
|
var type = _typeof(value);
|
|
6731
6736
|
return null !== value && "object" === type || "function" === type;
|
|
6732
6737
|
};
|
|
6738
|
+
var isObject$1 = isObject;
|
|
6733
6739
|
|
|
6734
6740
|
var isUndefined = function isUndefined(value) {
|
|
6735
6741
|
return void 0 === value;
|
|
6736
6742
|
};
|
|
6743
|
+
var isUndefined$1 = isUndefined;
|
|
6737
6744
|
|
|
6738
6745
|
var isString = function isString(value) {
|
|
6739
6746
|
var fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
6740
6747
|
var type = _typeof(value);
|
|
6741
|
-
return fuzzy ? "string" === type : "string" === type || isType(value, "String");
|
|
6748
|
+
return fuzzy ? "string" === type : "string" === type || isType$1(value, "String");
|
|
6742
6749
|
};
|
|
6750
|
+
var isString$1 = isString;
|
|
6743
6751
|
|
|
6744
6752
|
var isArray = function isArray(value) {
|
|
6745
|
-
return Array.isArray ? Array.isArray(value) : isType(value, "Array");
|
|
6753
|
+
return Array.isArray ? Array.isArray(value) : isType$1(value, "Array");
|
|
6746
6754
|
};
|
|
6755
|
+
var isArray$1 = isArray;
|
|
6747
6756
|
|
|
6748
6757
|
var isDate = function isDate(value) {
|
|
6749
|
-
return isType(value, "Date");
|
|
6758
|
+
return isType$1(value, "Date");
|
|
6750
6759
|
};
|
|
6760
|
+
var isDate$1 = isDate;
|
|
6751
6761
|
|
|
6752
6762
|
var isNumber$1 = function isNumber(value) {
|
|
6753
6763
|
var fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
6754
6764
|
var type = _typeof(value);
|
|
6755
|
-
return fuzzy ? "number" === type : "number" === type || isType(value, "Number");
|
|
6765
|
+
return fuzzy ? "number" === type : "number" === type || isType$1(value, "Number");
|
|
6756
6766
|
};
|
|
6767
|
+
var isNumber$2 = isNumber$1;
|
|
6757
6768
|
|
|
6758
6769
|
var isValidNumber = function isValidNumber(value) {
|
|
6759
|
-
return isNumber$
|
|
6770
|
+
return isNumber$2(value) && Number.isFinite(value);
|
|
6760
6771
|
};
|
|
6772
|
+
var isValidNumber$1 = isValidNumber;
|
|
6761
6773
|
|
|
6762
6774
|
var isValidUrl = function isValidUrl(value) {
|
|
6763
6775
|
return new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(value);
|
|
6764
6776
|
};
|
|
6777
|
+
var isValidUrl$1 = isValidUrl;
|
|
6765
6778
|
|
|
6766
6779
|
var isRegExp = function isRegExp(value) {
|
|
6767
|
-
return isType(value, "RegExp");
|
|
6780
|
+
return isType$1(value, "RegExp");
|
|
6768
6781
|
};
|
|
6782
|
+
var isRegExp$1 = isRegExp;
|
|
6769
6783
|
|
|
6770
6784
|
var isBase64 = function isBase64(value) {
|
|
6771
6785
|
return new RegExp(/^data:image\/(?:gif|png|jpeg|bmp|webp)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g).test(value);
|
|
6772
6786
|
};
|
|
6787
|
+
var isBase64$1 = isBase64;
|
|
6773
6788
|
|
|
6774
6789
|
var get = function get(obj, path, defaultValue) {
|
|
6775
|
-
var paths = isString(path) ? path.split(".") : path;
|
|
6790
|
+
var paths = isString$1(path) ? path.split(".") : path;
|
|
6776
6791
|
for (var p = 0; p < paths.length; p++) obj = obj ? obj[paths[p]] : void 0;
|
|
6777
6792
|
return void 0 === obj ? defaultValue : obj;
|
|
6778
6793
|
};
|
|
6794
|
+
var get$1 = get;
|
|
6779
6795
|
|
|
6780
6796
|
var hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
6781
6797
|
has = function has(object, key) {
|
|
6782
6798
|
return null != object && hasOwnProperty.call(object, key);
|
|
6783
6799
|
};
|
|
6800
|
+
var has$1 = has;
|
|
6784
6801
|
|
|
6785
6802
|
function getRegExpFlags(re) {
|
|
6786
6803
|
var flags = "";
|
|
@@ -6797,7 +6814,7 @@
|
|
|
6797
6814
|
if (0 === depth) return parent;
|
|
6798
6815
|
var child;
|
|
6799
6816
|
if ("object" != _typeof(parent)) return parent;
|
|
6800
|
-
if (isArray(parent) ? child = [] : isRegExp(parent) ? (child = new RegExp(parent.source, getRegExpFlags(parent)), parent.lastIndex && (child.lastIndex = parent.lastIndex)) : child = isDate(parent) ? new Date(parent.getTime()) : void 0 === prototype ? Object.create(Object.getPrototypeOf(parent)) : Object.create(prototype), circular) {
|
|
6817
|
+
if (isArray$1(parent) ? child = [] : isRegExp$1(parent) ? (child = new RegExp(parent.source, getRegExpFlags(parent)), parent.lastIndex && (child.lastIndex = parent.lastIndex)) : child = isDate$1(parent) ? new Date(parent.getTime()) : void 0 === prototype ? Object.create(Object.getPrototypeOf(parent)) : Object.create(prototype), circular) {
|
|
6801
6818
|
var index = allParents.indexOf(parent);
|
|
6802
6819
|
if (-1 !== index) return allChildren[index];
|
|
6803
6820
|
allParents.push(parent), allChildren.push(child);
|
|
@@ -6808,7 +6825,7 @@
|
|
|
6808
6825
|
}
|
|
6809
6826
|
|
|
6810
6827
|
function arrayEqual(a, b) {
|
|
6811
|
-
if (!isArray(a) || !isArray(b)) return !1;
|
|
6828
|
+
if (!isArray$1(a) || !isArray$1(b)) return !1;
|
|
6812
6829
|
if (a.length !== b.length) return !1;
|
|
6813
6830
|
for (var i = 0; i < a.length; i++) if (a[i] !== b[i]) return !1;
|
|
6814
6831
|
return !0;
|
|
@@ -6824,14 +6841,6 @@
|
|
|
6824
6841
|
return Math.abs(a - b) <= Math.max(abs, rel);
|
|
6825
6842
|
}
|
|
6826
6843
|
|
|
6827
|
-
var hasRaf = !1;
|
|
6828
|
-
try {
|
|
6829
|
-
hasRaf = "function" == typeof requestAnimationFrame && "function" == typeof cancelAnimationFrame;
|
|
6830
|
-
} catch (err) {
|
|
6831
|
-
hasRaf = !1;
|
|
6832
|
-
}
|
|
6833
|
-
hasRaf = !1;
|
|
6834
|
-
|
|
6835
6844
|
var epsilon = 1e-12;
|
|
6836
6845
|
var pi = Math.PI;
|
|
6837
6846
|
var halfPi$1 = pi / 2;
|
|
@@ -6892,12 +6901,12 @@
|
|
|
6892
6901
|
}, {
|
|
6893
6902
|
key: "add",
|
|
6894
6903
|
value: function add(point) {
|
|
6895
|
-
return isNumber$
|
|
6904
|
+
return isNumber$2(point) ? (this.x += point, void (this.y += point)) : (this.x += point.x, this.y += point.y, this);
|
|
6896
6905
|
}
|
|
6897
6906
|
}, {
|
|
6898
6907
|
key: "sub",
|
|
6899
6908
|
value: function sub(point) {
|
|
6900
|
-
return isNumber$
|
|
6909
|
+
return isNumber$2(point) ? (this.x -= point, void (this.y -= point)) : (this.x -= point.x, this.y -= point.y, this);
|
|
6901
6910
|
}
|
|
6902
6911
|
}, {
|
|
6903
6912
|
key: "multi",
|
|
@@ -7001,7 +7010,7 @@
|
|
|
7001
7010
|
key: "expand",
|
|
7002
7011
|
value: function expand() {
|
|
7003
7012
|
var d = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
7004
|
-
return isArray(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;
|
|
7013
|
+
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;
|
|
7005
7014
|
}
|
|
7006
7015
|
}, {
|
|
7007
7016
|
key: "round",
|
|
@@ -7426,17 +7435,17 @@
|
|
|
7426
7435
|
var TextMeasure = /*#__PURE__*/function () {
|
|
7427
7436
|
function TextMeasure(option, textSpec) {
|
|
7428
7437
|
_classCallCheck(this, TextMeasure);
|
|
7429
|
-
this._numberCharSize = null, this._fullCharSize = null, this._letterCharSize = null, this._specialCharSizeMap = {}, this._canvas = null, this._context = null, this._contextSaved = !1, this._notSupportCanvas = !1, this._notSupportVRender = !1, this._userSpec = {}, this.specialCharSet = "-/: .,@%'\"~", this._option = option, this._userSpec = null != textSpec ? textSpec : {}, this.textSpec = this._initSpec(), isValid(option.specialCharSet) && (this.specialCharSet = option.specialCharSet), this._standardMethod = isValid(option.getTextBounds) ? this.fullMeasure.bind(this) : this.measureWithNaiveCanvas.bind(this);
|
|
7438
|
+
this._numberCharSize = null, this._fullCharSize = null, this._letterCharSize = null, this._specialCharSizeMap = {}, this._canvas = null, this._context = null, this._contextSaved = !1, this._notSupportCanvas = !1, this._notSupportVRender = !1, this._userSpec = {}, this.specialCharSet = "-/: .,@%'\"~", this._option = option, this._userSpec = null != textSpec ? textSpec : {}, this.textSpec = this._initSpec(), isValid$1(option.specialCharSet) && (this.specialCharSet = option.specialCharSet), this._standardMethod = isValid$1(option.getTextBounds) ? this.fullMeasure.bind(this) : this.measureWithNaiveCanvas.bind(this);
|
|
7430
7439
|
}
|
|
7431
7440
|
_createClass(TextMeasure, [{
|
|
7432
7441
|
key: "initContext",
|
|
7433
7442
|
value: function initContext() {
|
|
7434
7443
|
if (this._notSupportCanvas) return !1;
|
|
7435
|
-
if (isNil(this._canvas) && (isValid(this._option.getCanvasForMeasure) && (this._canvas = this._option.getCanvasForMeasure()), isNil(this._canvas) && "undefined" != typeof window && void 0 !== window.document && isValid(globalThis.document) && (this._canvas = globalThis.document.createElement("canvas"))), isNil(this._context) && isValid(this._canvas)) {
|
|
7444
|
+
if (isNil$1(this._canvas) && (isValid$1(this._option.getCanvasForMeasure) && (this._canvas = this._option.getCanvasForMeasure()), isNil$1(this._canvas) && "undefined" != typeof window && void 0 !== window.document && isValid$1(globalThis.document) && (this._canvas = globalThis.document.createElement("canvas"))), isNil$1(this._context) && isValid$1(this._canvas)) {
|
|
7436
7445
|
var context = this._canvas.getContext("2d");
|
|
7437
|
-
isValid(context) && (context.save(), context.font = getContextFont$1(this.textSpec), this._contextSaved = !0, this._context = context);
|
|
7446
|
+
isValid$1(context) && (context.save(), context.font = getContextFont$1(this.textSpec), this._contextSaved = !0, this._context = context);
|
|
7438
7447
|
}
|
|
7439
|
-
return !isNil(this._context) || (this._notSupportCanvas = !0, !1);
|
|
7448
|
+
return !isNil$1(this._context) || (this._notSupportCanvas = !0, !1);
|
|
7440
7449
|
}
|
|
7441
7450
|
}, {
|
|
7442
7451
|
key: "_initSpec",
|
|
@@ -7496,11 +7505,11 @@
|
|
|
7496
7505
|
}, {
|
|
7497
7506
|
key: "fullMeasure",
|
|
7498
7507
|
value: function fullMeasure(text) {
|
|
7499
|
-
if (isNil(text)) return {
|
|
7508
|
+
if (isNil$1(text)) return {
|
|
7500
7509
|
width: 0,
|
|
7501
7510
|
height: 0
|
|
7502
7511
|
};
|
|
7503
|
-
if (isNil(this._option.getTextBounds) || !this._notSupportVRender) return this.measureWithNaiveCanvas(text);
|
|
7512
|
+
if (isNil$1(this._option.getTextBounds) || !this._notSupportVRender) return this.measureWithNaiveCanvas(text);
|
|
7504
7513
|
var _this$textSpec = this.textSpec,
|
|
7505
7514
|
fontFamily = _this$textSpec.fontFamily,
|
|
7506
7515
|
fontSize = _this$textSpec.fontSize,
|
|
@@ -7565,7 +7574,7 @@
|
|
|
7565
7574
|
for (var i = 0; i < text.length; i++) {
|
|
7566
7575
|
var _char = text[i];
|
|
7567
7576
|
var size = this._measureSpecialChar(_char);
|
|
7568
|
-
isNil(size) && TextMeasure.NUMBERS_CHAR_SET.includes(_char) && (size = this._measureNumberChar()), isNil(size) && ["F", "W"].includes(eastAsianCharacterInfo(_char)) && (size = this._measureFullSizeChar()), isNil(size) && (size = this._measureLetterChar()), totalSize.width += size.width, totalSize.height = Math.max(totalSize.height, size.height);
|
|
7577
|
+
isNil$1(size) && TextMeasure.NUMBERS_CHAR_SET.includes(_char) && (size = this._measureNumberChar()), isNil$1(size) && ["F", "W"].includes(eastAsianCharacterInfo(_char)) && (size = this._measureFullSizeChar()), isNil$1(size) && (size = this._measureLetterChar()), totalSize.width += size.width, totalSize.height = Math.max(totalSize.height, size.height);
|
|
7569
7578
|
}
|
|
7570
7579
|
return totalSize;
|
|
7571
7580
|
}
|
|
@@ -7601,9 +7610,9 @@
|
|
|
7601
7610
|
width: 0,
|
|
7602
7611
|
height: 0
|
|
7603
7612
|
};
|
|
7604
|
-
if (isNil(text)) return defaultResult;
|
|
7605
|
-
if (isArray(text)) {
|
|
7606
|
-
var textArr = text.filter(isValid).map(function (s) {
|
|
7613
|
+
if (isNil$1(text)) return defaultResult;
|
|
7614
|
+
if (isArray$1(text)) {
|
|
7615
|
+
var textArr = text.filter(isValid$1).map(function (s) {
|
|
7607
7616
|
return s.toString();
|
|
7608
7617
|
});
|
|
7609
7618
|
return 0 === textArr.length ? defaultResult : 1 === textArr.length ? processor(textArr[0]) : {
|
|
@@ -7618,7 +7627,7 @@
|
|
|
7618
7627
|
}, {
|
|
7619
7628
|
key: "_measureNumberChar",
|
|
7620
7629
|
value: function _measureNumberChar() {
|
|
7621
|
-
if (isNil(this._numberCharSize)) {
|
|
7630
|
+
if (isNil$1(this._numberCharSize)) {
|
|
7622
7631
|
var numberBounds = this._standardMethod(TextMeasure.NUMBERS_CHAR_SET);
|
|
7623
7632
|
this._numberCharSize = {
|
|
7624
7633
|
width: numberBounds.width / TextMeasure.NUMBERS_CHAR_SET.length,
|
|
@@ -7630,12 +7639,12 @@
|
|
|
7630
7639
|
}, {
|
|
7631
7640
|
key: "_measureFullSizeChar",
|
|
7632
7641
|
value: function _measureFullSizeChar() {
|
|
7633
|
-
return isNil(this._fullCharSize) && (this._fullCharSize = this._standardMethod(TextMeasure.FULL_SIZE_CHAR)), this._fullCharSize;
|
|
7642
|
+
return isNil$1(this._fullCharSize) && (this._fullCharSize = this._standardMethod(TextMeasure.FULL_SIZE_CHAR)), this._fullCharSize;
|
|
7634
7643
|
}
|
|
7635
7644
|
}, {
|
|
7636
7645
|
key: "_measureLetterChar",
|
|
7637
7646
|
value: function _measureLetterChar() {
|
|
7638
|
-
if (isNil(this._letterCharSize)) {
|
|
7647
|
+
if (isNil$1(this._letterCharSize)) {
|
|
7639
7648
|
var alphabetBounds = this._standardMethod(TextMeasure.ALPHABET_CHAR_SET);
|
|
7640
7649
|
this._letterCharSize = {
|
|
7641
7650
|
width: alphabetBounds.width / TextMeasure.ALPHABET_CHAR_SET.length,
|
|
@@ -7647,23 +7656,18 @@
|
|
|
7647
7656
|
}, {
|
|
7648
7657
|
key: "_measureSpecialChar",
|
|
7649
7658
|
value: function _measureSpecialChar(_char3) {
|
|
7650
|
-
return isValid(this._specialCharSizeMap[_char3]) ? this._specialCharSizeMap[_char3] : this.specialCharSet.includes(_char3) ? (this._specialCharSizeMap[_char3] = this._standardMethod(_char3), this._specialCharSizeMap[_char3]) : null;
|
|
7659
|
+
return isValid$1(this._specialCharSizeMap[_char3]) ? this._specialCharSizeMap[_char3] : this.specialCharSet.includes(_char3) ? (this._specialCharSizeMap[_char3] = this._standardMethod(_char3), this._specialCharSizeMap[_char3]) : null;
|
|
7651
7660
|
}
|
|
7652
7661
|
}, {
|
|
7653
7662
|
key: "release",
|
|
7654
7663
|
value: function release() {
|
|
7655
|
-
isValid(this._canvas) && (this._canvas = null), isValid(this._context) && (this._contextSaved && (this._context.restore(), this._contextSaved = !1), this._context = null);
|
|
7664
|
+
isValid$1(this._canvas) && (this._canvas = null), isValid$1(this._context) && (this._contextSaved && (this._context.restore(), this._contextSaved = !1), this._context = null);
|
|
7656
7665
|
}
|
|
7657
7666
|
}]);
|
|
7658
7667
|
return TextMeasure;
|
|
7659
7668
|
}();
|
|
7660
7669
|
TextMeasure.ALPHABET_CHAR_SET = "abcdefghijklmnopqrstuvwxyz", TextMeasure.NUMBERS_CHAR_SET = "0123456789", TextMeasure.FULL_SIZE_CHAR = "字";
|
|
7661
7670
|
|
|
7662
|
-
var LoggerLevel;
|
|
7663
|
-
!function (LoggerLevel) {
|
|
7664
|
-
LoggerLevel[LoggerLevel.None = 0] = "None", LoggerLevel[LoggerLevel.Error = 1] = "Error", LoggerLevel[LoggerLevel.Warn = 2] = "Warn", LoggerLevel[LoggerLevel.Info = 3] = "Info", LoggerLevel[LoggerLevel.Debug = 4] = "Debug";
|
|
7665
|
-
}(LoggerLevel || (LoggerLevel = {}));
|
|
7666
|
-
|
|
7667
7671
|
const circleThreshold = tau - 1e-8;
|
|
7668
7672
|
class BoundsContext {
|
|
7669
7673
|
constructor(bounds) {
|
|
@@ -9324,6 +9328,7 @@
|
|
|
9324
9328
|
angle: 0,
|
|
9325
9329
|
alpha: 0,
|
|
9326
9330
|
beta: 0,
|
|
9331
|
+
scaleCenter: [0, 0],
|
|
9327
9332
|
anchor: [0, 0],
|
|
9328
9333
|
anchor3d: [0, 0],
|
|
9329
9334
|
postMatrix: new Matrix()
|
|
@@ -9389,7 +9394,7 @@
|
|
|
9389
9394
|
const DefaultCircleAttribute = Object.assign(Object.assign({}, DefaultAttribute), { radius: 1, startAngle: 0, endAngle: pi2 });
|
|
9390
9395
|
const DefaultGroupAttribute = Object.assign(Object.assign({}, DefaultAttribute), { width: 0, height: 0, cornerRadius: 0, path: [], clip: false, visibleAll: true, display: 'relative', flexDirection: 'row', flexWrap: 'wrap', justifyContent: 'flex-start', alignItems: 'flex-start', alignContent: 'flex-start' });
|
|
9391
9396
|
const DefaultGlyphAttribute = Object.assign(Object.assign({}, DefaultAttribute), { path: '', width: 0, height: 0, cornerRadius: 0, clip: false });
|
|
9392
|
-
const DefaultLineAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultConnectAttribute), { points: [], segments: [], curveType: 'linear', clipRange: 1, clipRangeByDimension: 'default' });
|
|
9397
|
+
const DefaultLineAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultConnectAttribute), { points: [], segments: [], curveType: 'linear', clipRange: 1, clipRangeByDimension: 'default', closePath: false });
|
|
9393
9398
|
const DefaultPathAttribute = Object.assign(Object.assign({}, DefaultAttribute), { path: new CustomPath2D(), customPath: () => {
|
|
9394
9399
|
console.warn('空函数');
|
|
9395
9400
|
} });
|
|
@@ -11384,11 +11389,11 @@
|
|
|
11384
11389
|
return this.removeChild(child);
|
|
11385
11390
|
}
|
|
11386
11391
|
addEventListener(type, listener, options) {
|
|
11387
|
-
const capture = (isBoolean(options, true) && options) || (isObject(options) && options.capture);
|
|
11388
|
-
const once = isObject(options) && options.once;
|
|
11389
|
-
const context = isFunction(listener) ? undefined : listener;
|
|
11392
|
+
const capture = (isBoolean$1(options, true) && options) || (isObject$1(options) && options.capture);
|
|
11393
|
+
const once = isObject$1(options) && options.once;
|
|
11394
|
+
const context = isFunction$1(listener) ? undefined : listener;
|
|
11390
11395
|
type = capture ? `${type}capture` : type;
|
|
11391
|
-
listener = isFunction(listener) ? listener : listener.handleEvent;
|
|
11396
|
+
listener = isFunction$1(listener) ? listener : listener.handleEvent;
|
|
11392
11397
|
if (once) {
|
|
11393
11398
|
super.once(type, listener, context);
|
|
11394
11399
|
}
|
|
@@ -11401,11 +11406,11 @@
|
|
|
11401
11406
|
return this.addEventListener(type, listener, options);
|
|
11402
11407
|
}
|
|
11403
11408
|
removeEventListener(type, listener, options) {
|
|
11404
|
-
const capture = (isBoolean(options, true) && options) || (isObject(options) && options.capture);
|
|
11405
|
-
const context = isFunction(listener) ? undefined : listener;
|
|
11409
|
+
const capture = (isBoolean$1(options, true) && options) || (isObject$1(options) && options.capture);
|
|
11410
|
+
const context = isFunction$1(listener) ? undefined : listener;
|
|
11406
11411
|
type = capture ? `${type}capture` : type;
|
|
11407
|
-
listener = isFunction(listener) ? listener : listener.handleEvent;
|
|
11408
|
-
const once = isObject(options) && options.once;
|
|
11412
|
+
listener = isFunction$1(listener) ? listener : listener.handleEvent;
|
|
11413
|
+
const once = isObject$1(options) && options.once;
|
|
11409
11414
|
super.off(type, listener, context, once);
|
|
11410
11415
|
return this;
|
|
11411
11416
|
}
|
|
@@ -11413,7 +11418,7 @@
|
|
|
11413
11418
|
return this.removeEventListener(type, listener, options);
|
|
11414
11419
|
}
|
|
11415
11420
|
once(type, listener, options) {
|
|
11416
|
-
if (isObject(options)) {
|
|
11421
|
+
if (isObject$1(options)) {
|
|
11417
11422
|
options.once = true;
|
|
11418
11423
|
return this.addEventListener(type, listener, options);
|
|
11419
11424
|
}
|
|
@@ -12196,7 +12201,7 @@
|
|
|
12196
12201
|
else if (pickResult && pickResult.group) {
|
|
12197
12202
|
target = pickResult.group;
|
|
12198
12203
|
}
|
|
12199
|
-
else if (x >= 0 && x <= get(this.rootTarget, 'width') && y >= 0 && y <= get(this.rootTarget, 'height')) {
|
|
12204
|
+
else if (x >= 0 && x <= get$1(this.rootTarget, 'width') && y >= 0 && y <= get$1(this.rootTarget, 'height')) {
|
|
12200
12205
|
target = this.rootTarget;
|
|
12201
12206
|
}
|
|
12202
12207
|
else {
|
|
@@ -12339,7 +12344,7 @@
|
|
|
12339
12344
|
Object.assign(domElement.style, style);
|
|
12340
12345
|
}
|
|
12341
12346
|
}
|
|
12342
|
-
else if (applyStyles && isString(mode) && !has(this.cursorStyles, mode)) {
|
|
12347
|
+
else if (applyStyles && isString$1(mode) && !has$1(this.cursorStyles, mode)) {
|
|
12343
12348
|
domElement.style.cursor = mode;
|
|
12344
12349
|
}
|
|
12345
12350
|
}
|
|
@@ -12457,46 +12462,46 @@
|
|
|
12457
12462
|
event.changedTouches.length) {
|
|
12458
12463
|
for (let i = 0, li = event.changedTouches.length; i < li; i++) {
|
|
12459
12464
|
const touch = event.changedTouches[i];
|
|
12460
|
-
if (isUndefined(touch.button)) {
|
|
12465
|
+
if (isUndefined$1(touch.button)) {
|
|
12461
12466
|
touch.button = 0;
|
|
12462
12467
|
}
|
|
12463
|
-
if (isUndefined(touch.buttons)) {
|
|
12468
|
+
if (isUndefined$1(touch.buttons)) {
|
|
12464
12469
|
touch.buttons = 1;
|
|
12465
12470
|
}
|
|
12466
|
-
if (isUndefined(touch.isPrimary)) {
|
|
12471
|
+
if (isUndefined$1(touch.isPrimary)) {
|
|
12467
12472
|
touch.isPrimary = event.touches.length === 1 && event.type === 'touchstart';
|
|
12468
12473
|
}
|
|
12469
|
-
if (isUndefined(touch.width)) {
|
|
12474
|
+
if (isUndefined$1(touch.width)) {
|
|
12470
12475
|
touch.width = touch.radiusX || 1;
|
|
12471
12476
|
}
|
|
12472
|
-
if (isUndefined(touch.height)) {
|
|
12477
|
+
if (isUndefined$1(touch.height)) {
|
|
12473
12478
|
touch.height = touch.radiusY || 1;
|
|
12474
12479
|
}
|
|
12475
|
-
if (isUndefined(touch.tiltX)) {
|
|
12480
|
+
if (isUndefined$1(touch.tiltX)) {
|
|
12476
12481
|
touch.tiltX = 0;
|
|
12477
12482
|
}
|
|
12478
|
-
if (isUndefined(touch.tiltY)) {
|
|
12483
|
+
if (isUndefined$1(touch.tiltY)) {
|
|
12479
12484
|
touch.tiltY = 0;
|
|
12480
12485
|
}
|
|
12481
|
-
if (isUndefined(touch.pointerType)) {
|
|
12486
|
+
if (isUndefined$1(touch.pointerType)) {
|
|
12482
12487
|
touch.pointerType = 'touch';
|
|
12483
12488
|
}
|
|
12484
|
-
if (isUndefined(touch.pointerId)) {
|
|
12489
|
+
if (isUndefined$1(touch.pointerId)) {
|
|
12485
12490
|
touch.pointerId = touch.identifier || 0;
|
|
12486
12491
|
}
|
|
12487
|
-
if (isUndefined(touch.pressure)) {
|
|
12492
|
+
if (isUndefined$1(touch.pressure)) {
|
|
12488
12493
|
touch.pressure = touch.force || 0.5;
|
|
12489
12494
|
}
|
|
12490
|
-
if (isUndefined(touch.twist)) {
|
|
12495
|
+
if (isUndefined$1(touch.twist)) {
|
|
12491
12496
|
touch.twist = 0;
|
|
12492
12497
|
}
|
|
12493
|
-
if (isUndefined(touch.tangentialPressure)) {
|
|
12498
|
+
if (isUndefined$1(touch.tangentialPressure)) {
|
|
12494
12499
|
touch.tangentialPressure = 0;
|
|
12495
12500
|
}
|
|
12496
|
-
if (isUndefined(touch.layerX)) {
|
|
12501
|
+
if (isUndefined$1(touch.layerX)) {
|
|
12497
12502
|
touch.layerX = touch.offsetX = touch.clientX;
|
|
12498
12503
|
}
|
|
12499
|
-
if (isUndefined(touch.layerY)) {
|
|
12504
|
+
if (isUndefined$1(touch.layerY)) {
|
|
12500
12505
|
touch.layerY = touch.offsetY = touch.clientY;
|
|
12501
12506
|
}
|
|
12502
12507
|
touch.isNormalized = true;
|
|
@@ -12507,34 +12512,34 @@
|
|
|
12507
12512
|
else if (!this.globalObj.supportsMouseEvents ||
|
|
12508
12513
|
(event instanceof MouseEvent && (!this.supportsPointerEvents || !(event instanceof PointerEvent)))) {
|
|
12509
12514
|
const tempEvent = event;
|
|
12510
|
-
if (isUndefined(tempEvent.isPrimary)) {
|
|
12515
|
+
if (isUndefined$1(tempEvent.isPrimary)) {
|
|
12511
12516
|
tempEvent.isPrimary = true;
|
|
12512
12517
|
}
|
|
12513
|
-
if (isUndefined(tempEvent.width)) {
|
|
12518
|
+
if (isUndefined$1(tempEvent.width)) {
|
|
12514
12519
|
tempEvent.width = 1;
|
|
12515
12520
|
}
|
|
12516
|
-
if (isUndefined(tempEvent.height)) {
|
|
12521
|
+
if (isUndefined$1(tempEvent.height)) {
|
|
12517
12522
|
tempEvent.height = 1;
|
|
12518
12523
|
}
|
|
12519
|
-
if (isUndefined(tempEvent.tiltX)) {
|
|
12524
|
+
if (isUndefined$1(tempEvent.tiltX)) {
|
|
12520
12525
|
tempEvent.tiltX = 0;
|
|
12521
12526
|
}
|
|
12522
|
-
if (isUndefined(tempEvent.tiltY)) {
|
|
12527
|
+
if (isUndefined$1(tempEvent.tiltY)) {
|
|
12523
12528
|
tempEvent.tiltY = 0;
|
|
12524
12529
|
}
|
|
12525
|
-
if (isUndefined(tempEvent.pointerType)) {
|
|
12530
|
+
if (isUndefined$1(tempEvent.pointerType)) {
|
|
12526
12531
|
tempEvent.pointerType = 'mouse';
|
|
12527
12532
|
}
|
|
12528
|
-
if (isUndefined(tempEvent.pointerId)) {
|
|
12533
|
+
if (isUndefined$1(tempEvent.pointerId)) {
|
|
12529
12534
|
tempEvent.pointerId = MOUSE_POINTER_ID;
|
|
12530
12535
|
}
|
|
12531
|
-
if (isUndefined(tempEvent.pressure)) {
|
|
12536
|
+
if (isUndefined$1(tempEvent.pressure)) {
|
|
12532
12537
|
tempEvent.pressure = 0.5;
|
|
12533
12538
|
}
|
|
12534
|
-
if (isUndefined(tempEvent.twist)) {
|
|
12539
|
+
if (isUndefined$1(tempEvent.twist)) {
|
|
12535
12540
|
tempEvent.twist = 0;
|
|
12536
12541
|
}
|
|
12537
|
-
if (isUndefined(tempEvent.tangentialPressure)) {
|
|
12542
|
+
if (isUndefined$1(tempEvent.tangentialPressure)) {
|
|
12538
12543
|
tempEvent.tangentialPressure = 0;
|
|
12539
12544
|
}
|
|
12540
12545
|
tempEvent.isNormalized = true;
|
|
@@ -14231,7 +14236,7 @@
|
|
|
14231
14236
|
const parseStroke = (stroke) => {
|
|
14232
14237
|
var _a;
|
|
14233
14238
|
let isFullStroke = true;
|
|
14234
|
-
if (isBoolean(stroke, true)) {
|
|
14239
|
+
if (isBoolean$1(stroke, true)) {
|
|
14235
14240
|
for (let i = 0; i < 4; i++) {
|
|
14236
14241
|
_strokeVec4[i] = stroke;
|
|
14237
14242
|
isFullStroke && (isFullStroke = !!((_a = _strokeVec4[i]) !== null && _a !== void 0 ? _a : true));
|
|
@@ -14260,7 +14265,7 @@
|
|
|
14260
14265
|
if (!padding) {
|
|
14261
14266
|
return 0;
|
|
14262
14267
|
}
|
|
14263
|
-
if (isArray(padding)) {
|
|
14268
|
+
if (isArray$1(padding)) {
|
|
14264
14269
|
if (padding.length === 0) {
|
|
14265
14270
|
return 0;
|
|
14266
14271
|
}
|
|
@@ -14411,7 +14416,7 @@
|
|
|
14411
14416
|
return transformKeys.includes(key);
|
|
14412
14417
|
};
|
|
14413
14418
|
function getAttributeFromDefaultAttrList(attr, key) {
|
|
14414
|
-
if (isArray(attr)) {
|
|
14419
|
+
if (isArray$1(attr)) {
|
|
14415
14420
|
let val;
|
|
14416
14421
|
for (let i = 0; i < attr.length && val === undefined; i++) {
|
|
14417
14422
|
val = attr[i][key];
|
|
@@ -14462,8 +14467,8 @@
|
|
|
14462
14467
|
}
|
|
14463
14468
|
onBind() {
|
|
14464
14469
|
var _a, _b, _c, _d, _e, _f;
|
|
14465
|
-
this.fromNumber = isNumber$
|
|
14466
|
-
this.toNumber = isNumber$
|
|
14470
|
+
this.fromNumber = isNumber$2((_a = this.from) === null || _a === void 0 ? void 0 : _a.text) ? (_b = this.from) === null || _b === void 0 ? void 0 : _b.text : Number.parseFloat((_c = this.from) === null || _c === void 0 ? void 0 : _c.text);
|
|
14471
|
+
this.toNumber = isNumber$2((_d = this.to) === null || _d === void 0 ? void 0 : _d.text) ? (_e = this.to) === null || _e === void 0 ? void 0 : _e.text : Number.parseFloat((_f = this.to) === null || _f === void 0 ? void 0 : _f.text);
|
|
14467
14472
|
if (!Number.isFinite(this.toNumber)) {
|
|
14468
14473
|
this.fromNumber = 0;
|
|
14469
14474
|
}
|
|
@@ -14627,7 +14632,7 @@
|
|
|
14627
14632
|
var _a, _b, _c, _d;
|
|
14628
14633
|
this.fromText = (_b = (_a = this.from) === null || _a === void 0 ? void 0 : _a.text) !== null && _b !== void 0 ? _b : '';
|
|
14629
14634
|
this.toText = (_d = (_c = this.to) === null || _c === void 0 ? void 0 : _c.text) !== null && _d !== void 0 ? _d : '';
|
|
14630
|
-
if (!this.toText || isArray(this.toText)) {
|
|
14635
|
+
if (!this.toText || isArray$1(this.toText)) {
|
|
14631
14636
|
this.valid = false;
|
|
14632
14637
|
}
|
|
14633
14638
|
else {
|
|
@@ -15779,7 +15784,7 @@
|
|
|
15779
15784
|
return res;
|
|
15780
15785
|
};
|
|
15781
15786
|
const samplingPoints = (points, count) => {
|
|
15782
|
-
const validatePoints = points.filter(point => point.defined !== false && isNumber$
|
|
15787
|
+
const validatePoints = points.filter(point => point.defined !== false && isNumber$2(point.x) && isNumber$2(point.y));
|
|
15783
15788
|
if (validatePoints.length === 0) {
|
|
15784
15789
|
return [];
|
|
15785
15790
|
}
|
|
@@ -15833,7 +15838,7 @@
|
|
|
15833
15838
|
return res.concat((_a = seg.points) !== null && _a !== void 0 ? _a : []);
|
|
15834
15839
|
}, []);
|
|
15835
15840
|
}
|
|
15836
|
-
const validatePoints = points.filter(point => point.defined !== false && isNumber$
|
|
15841
|
+
const validatePoints = points.filter(point => point.defined !== false && isNumber$2(point.x) && isNumber$2(point.y));
|
|
15837
15842
|
if (!validatePoints.length) {
|
|
15838
15843
|
return [];
|
|
15839
15844
|
}
|
|
@@ -16142,7 +16147,7 @@
|
|
|
16142
16147
|
|
|
16143
16148
|
const reverseNames = {};
|
|
16144
16149
|
for (const name in colorNames) {
|
|
16145
|
-
if (has(colorNames, name)) {
|
|
16150
|
+
if (has$1(colorNames, name)) {
|
|
16146
16151
|
reverseNames[colorNames[name]] = name;
|
|
16147
16152
|
}
|
|
16148
16153
|
}
|
|
@@ -16641,7 +16646,7 @@
|
|
|
16641
16646
|
return;
|
|
16642
16647
|
}
|
|
16643
16648
|
const toValue = toAttrs[fromKey];
|
|
16644
|
-
if (!isNil(toValue) && !isNil(fromAttrs[fromKey]) && toValue !== fromAttrs[fromKey]) {
|
|
16649
|
+
if (!isNil$1(toValue) && !isNil$1(fromAttrs[fromKey]) && toValue !== fromAttrs[fromKey]) {
|
|
16645
16650
|
if (fromKey === 'fill' || fromKey === 'stroke') {
|
|
16646
16651
|
res.push({
|
|
16647
16652
|
from: typeof fromAttrs[fromKey] === 'string'
|
|
@@ -17316,7 +17321,7 @@
|
|
|
17316
17321
|
var _a;
|
|
17317
17322
|
const params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate({ [key]: value }, this.attribute, key, context);
|
|
17318
17323
|
if (!params) {
|
|
17319
|
-
if (!isNil((_a = this.normalAttrs) === null || _a === void 0 ? void 0 : _a[key])) {
|
|
17324
|
+
if (!isNil$1((_a = this.normalAttrs) === null || _a === void 0 ? void 0 : _a[key])) {
|
|
17320
17325
|
this.normalAttrs[key] = value;
|
|
17321
17326
|
}
|
|
17322
17327
|
else {
|
|
@@ -17572,7 +17577,7 @@
|
|
|
17572
17577
|
if (!this.currentStates || !this.currentStates.length) {
|
|
17573
17578
|
return false;
|
|
17574
17579
|
}
|
|
17575
|
-
if (!isNil(stateName)) {
|
|
17580
|
+
if (!isNil$1(stateName)) {
|
|
17576
17581
|
return this.currentStates.includes(stateName);
|
|
17577
17582
|
}
|
|
17578
17583
|
return true;
|
|
@@ -17628,7 +17633,7 @@
|
|
|
17628
17633
|
this.animates.forEach(animate => {
|
|
17629
17634
|
if (animate.stateNames) {
|
|
17630
17635
|
const endProps = animate.getEndProps();
|
|
17631
|
-
if (has(endProps, key)) {
|
|
17636
|
+
if (has$1(endProps, key)) {
|
|
17632
17637
|
value = endProps[key];
|
|
17633
17638
|
}
|
|
17634
17639
|
}
|
|
@@ -17747,7 +17752,7 @@
|
|
|
17747
17752
|
return !!(this._updateTag & exports.UpdateTag.UPDATE_LAYOUT);
|
|
17748
17753
|
}
|
|
17749
17754
|
doUpdateLocalMatrix() {
|
|
17750
|
-
const { x = DefaultTransform.x, y = DefaultTransform.y, scaleX = DefaultTransform.scaleX, scaleY = DefaultTransform.scaleY, angle = DefaultTransform.angle, anchor, postMatrix } = this.attribute;
|
|
17755
|
+
const { x = DefaultTransform.x, y = DefaultTransform.y, scaleX = DefaultTransform.scaleX, scaleY = DefaultTransform.scaleY, angle = DefaultTransform.angle, scaleCenter, anchor, postMatrix } = this.attribute;
|
|
17751
17756
|
const _anchor = [0, 0];
|
|
17752
17757
|
if (anchor) {
|
|
17753
17758
|
if (typeof anchor[0] === 'string') {
|
|
@@ -17767,7 +17772,18 @@
|
|
|
17767
17772
|
_anchor[1] = anchor[1];
|
|
17768
17773
|
}
|
|
17769
17774
|
}
|
|
17770
|
-
|
|
17775
|
+
if (scaleCenter && (scaleX !== 1 || scaleY !== 1)) {
|
|
17776
|
+
const m = this._transMatrix;
|
|
17777
|
+
m.reset();
|
|
17778
|
+
m.translate(_anchor[0], _anchor[1]);
|
|
17779
|
+
m.rotate(angle);
|
|
17780
|
+
m.translate(-_anchor[0], -_anchor[1]);
|
|
17781
|
+
m.translate(x, y);
|
|
17782
|
+
application.transformUtil.fromMatrix(m, m).scale(scaleX, scaleY, { x: scaleCenter[0], y: scaleCenter[1] });
|
|
17783
|
+
}
|
|
17784
|
+
else {
|
|
17785
|
+
normalTransform(this._transMatrix, this._transMatrix.reset(), x, y, scaleX, scaleY, angle, anchor && _anchor);
|
|
17786
|
+
}
|
|
17771
17787
|
const p = this.getOffsetXY(DefaultTransform);
|
|
17772
17788
|
this._transMatrix.e += p.x;
|
|
17773
17789
|
this._transMatrix.f += p.y;
|
|
@@ -17960,7 +17976,7 @@
|
|
|
17960
17976
|
};
|
|
17961
17977
|
}
|
|
17962
17978
|
createPathProxy(path) {
|
|
17963
|
-
if (isString(path, true)) {
|
|
17979
|
+
if (isString$1(path, true)) {
|
|
17964
17980
|
this.pathProxy = new CustomPath2D().fromString(path);
|
|
17965
17981
|
}
|
|
17966
17982
|
else {
|
|
@@ -17983,7 +17999,7 @@
|
|
|
17983
17999
|
this.resources.set(url, cache);
|
|
17984
18000
|
if (typeof image === 'string') {
|
|
17985
18001
|
cache.state = 'loading';
|
|
17986
|
-
if (isValidUrl(image) || isBase64(image)) {
|
|
18002
|
+
if (isValidUrl$1(image) || isBase64$1(image)) {
|
|
17987
18003
|
ResourceLoader.GetImage(image, this);
|
|
17988
18004
|
this.backgroundImg = this.backgroundImg || background;
|
|
17989
18005
|
}
|
|
@@ -20040,7 +20056,7 @@
|
|
|
20040
20056
|
return rotate;
|
|
20041
20057
|
}
|
|
20042
20058
|
function xul(str) {
|
|
20043
|
-
const xmlStr = isArray(str) ? str[0] : str;
|
|
20059
|
+
const xmlStr = isArray$1(str) ? str[0] : str;
|
|
20044
20060
|
const config = [];
|
|
20045
20061
|
if (!xmlStr) {
|
|
20046
20062
|
return config;
|
|
@@ -20740,7 +20756,7 @@
|
|
|
20740
20756
|
}
|
|
20741
20757
|
function runStroke(stroke, lineWidth) {
|
|
20742
20758
|
let s;
|
|
20743
|
-
if (isArray(stroke)) {
|
|
20759
|
+
if (isArray$1(stroke)) {
|
|
20744
20760
|
s = stroke.some(item => item || item === undefined);
|
|
20745
20761
|
}
|
|
20746
20762
|
else {
|
|
@@ -21346,7 +21362,7 @@
|
|
|
21346
21362
|
}
|
|
21347
21363
|
const { outerRadius = arcAttribute.outerRadius, innerRadius = arcAttribute.innerRadius, cap = arcAttribute.cap, forceShowCap = arcAttribute.forceShowCap } = arc.attribute;
|
|
21348
21364
|
let conicalOffset = 0;
|
|
21349
|
-
const tempChangeConicalColor = ((isBoolean(cap) && cap) || cap[0]) && fill.gradient === 'conical';
|
|
21365
|
+
const tempChangeConicalColor = ((isBoolean$1(cap) && cap) || cap[0]) && fill.gradient === 'conical';
|
|
21350
21366
|
if (tempChangeConicalColor) {
|
|
21351
21367
|
const { sc, startAngle, endAngle } = arc.getParsedAngle();
|
|
21352
21368
|
if (abs(endAngle - startAngle) < pi2 - epsilon) {
|
|
@@ -21429,7 +21445,7 @@
|
|
|
21429
21445
|
context.stroke();
|
|
21430
21446
|
}
|
|
21431
21447
|
}
|
|
21432
|
-
if (((isBoolean(cap) && cap) || cap[1]) && forceShowCap) {
|
|
21448
|
+
if (((isBoolean$1(cap) && cap) || cap[1]) && forceShowCap) {
|
|
21433
21449
|
const { startAngle: sa, endAngle: ea } = arc.getParsedAngle();
|
|
21434
21450
|
const deltaAngle = abs(ea - sa);
|
|
21435
21451
|
if (deltaAngle >= pi2 - epsilon) {
|
|
@@ -22215,7 +22231,7 @@
|
|
|
22215
22231
|
class WrapText extends Text {
|
|
22216
22232
|
_isValid() {
|
|
22217
22233
|
const { text } = this.attribute;
|
|
22218
|
-
if (isArray(text)) {
|
|
22234
|
+
if (isArray$1(text)) {
|
|
22219
22235
|
return !text.every((t) => t == null || t === '');
|
|
22220
22236
|
}
|
|
22221
22237
|
return text != null && text !== '';
|
|
@@ -23101,17 +23117,17 @@
|
|
|
23101
23117
|
this.pathStr = 'M-0.5,-0.5h1v1h-1Z';
|
|
23102
23118
|
}
|
|
23103
23119
|
draw(ctx, size, x, y) {
|
|
23104
|
-
const rectSize = isNumber$
|
|
23120
|
+
const rectSize = isNumber$2(size) ? [size, size] : size;
|
|
23105
23121
|
return rect(ctx, rectSize, x, y);
|
|
23106
23122
|
}
|
|
23107
23123
|
drawOffset(ctx, size, x, y, offset) {
|
|
23108
|
-
const rectSize = isNumber$
|
|
23124
|
+
const rectSize = isNumber$2(size)
|
|
23109
23125
|
? [size + 2 * offset, size + 2 * offset]
|
|
23110
23126
|
: [size[0] + 2 * offset, size[1] + 2 * offset];
|
|
23111
23127
|
return rect(ctx, rectSize, x, y);
|
|
23112
23128
|
}
|
|
23113
23129
|
bounds(size, bounds) {
|
|
23114
|
-
const rectSize = isNumber$
|
|
23130
|
+
const rectSize = isNumber$2(size) ? [size, size] : size;
|
|
23115
23131
|
bounds.x1 = -rectSize[0] / 2;
|
|
23116
23132
|
bounds.x2 = rectSize[0] / 2;
|
|
23117
23133
|
bounds.y1 = -rectSize[1] / 2;
|
|
@@ -23125,7 +23141,7 @@
|
|
|
23125
23141
|
constructor(type, path, isSvg = false) {
|
|
23126
23142
|
this.pathStr = '';
|
|
23127
23143
|
this.type = type;
|
|
23128
|
-
if (isArray(path)) {
|
|
23144
|
+
if (isArray$1(path)) {
|
|
23129
23145
|
this.svgCache = path;
|
|
23130
23146
|
}
|
|
23131
23147
|
else {
|
|
@@ -23237,7 +23253,7 @@
|
|
|
23237
23253
|
}
|
|
23238
23254
|
_isValid() {
|
|
23239
23255
|
const { size } = this.attribute;
|
|
23240
|
-
return isArray(size) ? size.length === 2 && size.every(this._validNumber) : this._validNumber(size);
|
|
23256
|
+
return isArray$1(size) ? size.length === 2 && size.every(this._validNumber) : this._validNumber(size);
|
|
23241
23257
|
}
|
|
23242
23258
|
doUpdateParsedPath() {
|
|
23243
23259
|
const symbolTheme = getTheme(this).symbol;
|
|
@@ -23261,7 +23277,7 @@
|
|
|
23261
23277
|
if (!svg) {
|
|
23262
23278
|
return null;
|
|
23263
23279
|
}
|
|
23264
|
-
const path = isArray(svg.path) ? svg.path : [svg.path];
|
|
23280
|
+
const path = isArray$1(svg.path) ? svg.path : [svg.path];
|
|
23265
23281
|
const b = new AABBBounds();
|
|
23266
23282
|
const cacheList = [];
|
|
23267
23283
|
path.forEach((item) => {
|
|
@@ -23342,7 +23358,7 @@
|
|
|
23342
23358
|
const size = this.attribute.size;
|
|
23343
23359
|
const x = 0;
|
|
23344
23360
|
const y = 0;
|
|
23345
|
-
const formattedSize = isArray(size) ? size : [size, size];
|
|
23361
|
+
const formattedSize = isArray$1(size) ? size : [size, size];
|
|
23346
23362
|
return symbolInstance.path
|
|
23347
23363
|
? new CustomPath2D().fromCustomPath2D(symbolInstance.path, x, y, formattedSize[0], formattedSize[1])
|
|
23348
23364
|
: new CustomPath2D().fromString(symbolInstance.pathStr, x, y, formattedSize[0], formattedSize[1]);
|
|
@@ -24312,7 +24328,7 @@
|
|
|
24312
24328
|
}
|
|
24313
24329
|
}
|
|
24314
24330
|
this.onBeforeAttributeUpdate = (val, attributes, key) => {
|
|
24315
|
-
if ((isArray(key) && key.indexOf('margin') !== -1) || key === 'margin') {
|
|
24331
|
+
if ((isArray$1(key) && key.indexOf('margin') !== -1) || key === 'margin') {
|
|
24316
24332
|
if (attributes.margin) {
|
|
24317
24333
|
const marginArray = parsePadding(attributes.margin);
|
|
24318
24334
|
if (typeof marginArray === 'number') {
|
|
@@ -24927,7 +24943,7 @@
|
|
|
24927
24943
|
if (attribute.path instanceof CustomPath2D) {
|
|
24928
24944
|
return attribute.path;
|
|
24929
24945
|
}
|
|
24930
|
-
if (isNil(this.cache)) {
|
|
24946
|
+
if (isNil$1(this.cache)) {
|
|
24931
24947
|
this.doUpdatePathShape();
|
|
24932
24948
|
}
|
|
24933
24949
|
if (this.cache instanceof CustomPath2D) {
|
|
@@ -24951,7 +24967,7 @@
|
|
|
24951
24967
|
}
|
|
24952
24968
|
doUpdatePathShape() {
|
|
24953
24969
|
const attribute = this.attribute;
|
|
24954
|
-
if (isString(attribute.path, true)) {
|
|
24970
|
+
if (isString$1(attribute.path, true)) {
|
|
24955
24971
|
this.cache = new CustomPath2D().fromString(attribute.path);
|
|
24956
24972
|
}
|
|
24957
24973
|
else if (attribute.customPath) {
|
|
@@ -25142,7 +25158,7 @@
|
|
|
25142
25158
|
return 0;
|
|
25143
25159
|
}
|
|
25144
25160
|
const deltaRadius = Math.abs(outerRadius - innerRadius);
|
|
25145
|
-
return Math.min(isNumber$
|
|
25161
|
+
return Math.min(isNumber$2(cornerRadius, true)
|
|
25146
25162
|
? cornerRadius
|
|
25147
25163
|
: (deltaRadius * parseFloat(cornerRadius)) / 100, deltaRadius / 2);
|
|
25148
25164
|
}
|
|
@@ -26545,7 +26561,7 @@
|
|
|
26545
26561
|
}
|
|
26546
26562
|
updateSymbolAABBBoundsImprecise(attribute, symbolTheme, aabbBounds, graphic) {
|
|
26547
26563
|
const { size = symbolTheme.size } = attribute;
|
|
26548
|
-
if (isArray(size)) {
|
|
26564
|
+
if (isArray$1(size)) {
|
|
26549
26565
|
aabbBounds.set(-size[0] / 2, -size[1] / 2, size[0] / 2, size[1] / 2);
|
|
26550
26566
|
}
|
|
26551
26567
|
else {
|
|
@@ -27105,7 +27121,7 @@
|
|
|
27105
27121
|
offsetY,
|
|
27106
27122
|
offsetZ: z
|
|
27107
27123
|
});
|
|
27108
|
-
if (line.cache && !isArray(line.cache) && line.attribute.curveType && line.attribute.curveType.includes('Closed')) {
|
|
27124
|
+
if (line.cache && !isArray$1(line.cache) && line.attribute.curveType && line.attribute.curveType.includes('Closed')) {
|
|
27109
27125
|
context.closePath();
|
|
27110
27126
|
}
|
|
27111
27127
|
context.setShadowStyle && context.setShadowStyle(line, attribute, defaultAttribute);
|
|
@@ -27130,7 +27146,7 @@
|
|
|
27130
27146
|
}
|
|
27131
27147
|
}
|
|
27132
27148
|
let { connectedType, connectedX, connectedY, connectedStyle } = attribute;
|
|
27133
|
-
if (isArray(defaultAttribute)) {
|
|
27149
|
+
if (isArray$1(defaultAttribute)) {
|
|
27134
27150
|
connectedType = (_b = connectedType !== null && connectedType !== void 0 ? connectedType : defaultAttribute[0].connectedType) !== null && _b !== void 0 ? _b : defaultAttribute[1].connectedType;
|
|
27135
27151
|
connectedX = (_c = connectedX !== null && connectedX !== void 0 ? connectedX : defaultAttribute[0].connectedX) !== null && _c !== void 0 ? _c : defaultAttribute[1].connectedX;
|
|
27136
27152
|
connectedY = (_d = connectedY !== null && connectedY !== void 0 ? connectedY : defaultAttribute[0].connectedY) !== null && _d !== void 0 ? _d : defaultAttribute[1].connectedY;
|
|
@@ -27157,7 +27173,7 @@
|
|
|
27157
27173
|
zeroY: connectedY
|
|
27158
27174
|
});
|
|
27159
27175
|
const da = [];
|
|
27160
|
-
if (isArray(defaultAttribute)) {
|
|
27176
|
+
if (isArray$1(defaultAttribute)) {
|
|
27161
27177
|
defaultAttribute.forEach(i => da.push(i));
|
|
27162
27178
|
}
|
|
27163
27179
|
else {
|
|
@@ -27202,12 +27218,28 @@
|
|
|
27202
27218
|
return;
|
|
27203
27219
|
}
|
|
27204
27220
|
if (line.shouldUpdateShape()) {
|
|
27205
|
-
const { points, segments,
|
|
27221
|
+
const { points, segments, closePath } = line.attribute;
|
|
27222
|
+
let { curveType = lineAttribute.curveType } = line.attribute;
|
|
27223
|
+
if (closePath && curveType === 'linear') {
|
|
27224
|
+
curveType = 'linearClosed';
|
|
27225
|
+
}
|
|
27206
27226
|
const _points = points;
|
|
27207
27227
|
if (segments && segments.length) {
|
|
27208
27228
|
let startPoint;
|
|
27209
27229
|
let lastSeg;
|
|
27210
|
-
line.cache = segments
|
|
27230
|
+
line.cache = segments
|
|
27231
|
+
.map((seg, index) => {
|
|
27232
|
+
if (seg.points.length <= 1) {
|
|
27233
|
+
if (index === 0) {
|
|
27234
|
+
seg.points[0] &&
|
|
27235
|
+
(lastSeg = {
|
|
27236
|
+
endX: seg.points[0].x,
|
|
27237
|
+
endY: seg.points[0].y,
|
|
27238
|
+
curves: [{ defined: seg.points[0].defined !== false }]
|
|
27239
|
+
});
|
|
27240
|
+
return null;
|
|
27241
|
+
}
|
|
27242
|
+
}
|
|
27211
27243
|
if (index === 1) {
|
|
27212
27244
|
startPoint = {
|
|
27213
27245
|
x: lastSeg.endX,
|
|
@@ -27220,11 +27252,29 @@
|
|
|
27220
27252
|
startPoint.y = lastSeg.endY;
|
|
27221
27253
|
startPoint.defined = lastSeg.curves[lastSeg.curves.length - 1].defined;
|
|
27222
27254
|
}
|
|
27223
|
-
|
|
27255
|
+
const data = calcLineCache$1(seg.points, curveType, {
|
|
27224
27256
|
startPoint
|
|
27225
27257
|
});
|
|
27226
|
-
|
|
27227
|
-
|
|
27258
|
+
lastSeg = data;
|
|
27259
|
+
return data;
|
|
27260
|
+
})
|
|
27261
|
+
.filter(item => !!item);
|
|
27262
|
+
if (curveType === 'linearClosed') {
|
|
27263
|
+
let startP;
|
|
27264
|
+
for (let i = 0; i < line.cache.length; i++) {
|
|
27265
|
+
const cacheItem = line.cache[i];
|
|
27266
|
+
for (let i = 0; i < cacheItem.curves.length; i++) {
|
|
27267
|
+
if (cacheItem.curves[i].defined) {
|
|
27268
|
+
startP = cacheItem.curves[i].p0;
|
|
27269
|
+
break;
|
|
27270
|
+
}
|
|
27271
|
+
}
|
|
27272
|
+
if (startP) {
|
|
27273
|
+
break;
|
|
27274
|
+
}
|
|
27275
|
+
}
|
|
27276
|
+
line.cache[line.cache.length - 1] && line.cache[line.cache.length - 1].lineTo(startP.x, startP.y, true);
|
|
27277
|
+
}
|
|
27228
27278
|
}
|
|
27229
27279
|
else if (points && points.length) {
|
|
27230
27280
|
line.cache = calcLineCache$1(_points, curveType);
|
|
@@ -27238,13 +27288,17 @@
|
|
|
27238
27288
|
}
|
|
27239
27289
|
const { clipRange = lineAttribute.clipRange, clipRangeByDimension = lineAttribute.clipRangeByDimension } = line.attribute;
|
|
27240
27290
|
if (Array.isArray(line.cache)) {
|
|
27291
|
+
const segments = line.attribute.segments.filter(item => item.points.length);
|
|
27292
|
+
if (segments[0].points.length === 1) {
|
|
27293
|
+
segments.shift();
|
|
27294
|
+
}
|
|
27241
27295
|
if (clipRange === 1) {
|
|
27242
27296
|
let skip = false;
|
|
27243
27297
|
line.cache.forEach((cache, index) => {
|
|
27244
27298
|
if (skip) {
|
|
27245
27299
|
return;
|
|
27246
27300
|
}
|
|
27247
|
-
skip = this.drawSegmentItem(context, cache, !!fill, !!stroke, fillOpacity, strokeOpacity,
|
|
27301
|
+
skip = this.drawSegmentItem(context, cache, !!fill, !!stroke, fillOpacity, strokeOpacity, segments[index], [lineAttribute, line.attribute], clipRange, clipRangeByDimension, x, y, line, fillCb, strokeCb);
|
|
27248
27302
|
});
|
|
27249
27303
|
}
|
|
27250
27304
|
else {
|
|
@@ -27260,7 +27314,7 @@
|
|
|
27260
27314
|
const _cr = (totalDrawLength - drawedLengthUntilLast) / curSegLength;
|
|
27261
27315
|
drawedLengthUntilLast += curSegLength;
|
|
27262
27316
|
if (_cr > 0) {
|
|
27263
|
-
skip = this.drawSegmentItem(context, cache, !!fill, !!stroke, fillOpacity, strokeOpacity,
|
|
27317
|
+
skip = this.drawSegmentItem(context, cache, !!fill, !!stroke, fillOpacity, strokeOpacity, segments[index], [lineAttribute, line.attribute], min(_cr, 1), clipRangeByDimension, x, y, line, fillCb, strokeCb);
|
|
27264
27318
|
}
|
|
27265
27319
|
});
|
|
27266
27320
|
}
|
|
@@ -27629,7 +27683,14 @@
|
|
|
27629
27683
|
if (segments && segments.length) {
|
|
27630
27684
|
let startPoint;
|
|
27631
27685
|
let lastTopSeg;
|
|
27632
|
-
const topCaches = segments
|
|
27686
|
+
const topCaches = segments
|
|
27687
|
+
.map((seg, index) => {
|
|
27688
|
+
if (seg.points.length <= 1) {
|
|
27689
|
+
if (index === 0) {
|
|
27690
|
+
seg.points[0] && (lastTopSeg = { endX: seg.points[0].x, endY: seg.points[0].y });
|
|
27691
|
+
return null;
|
|
27692
|
+
}
|
|
27693
|
+
}
|
|
27633
27694
|
if (index === 1) {
|
|
27634
27695
|
startPoint = { x: lastTopSeg.endX, y: lastTopSeg.endY };
|
|
27635
27696
|
}
|
|
@@ -27637,11 +27698,13 @@
|
|
|
27637
27698
|
startPoint.x = lastTopSeg.endX;
|
|
27638
27699
|
startPoint.y = lastTopSeg.endY;
|
|
27639
27700
|
}
|
|
27640
|
-
|
|
27701
|
+
const data = calcLineCache(seg.points, curveType, {
|
|
27641
27702
|
startPoint
|
|
27642
27703
|
});
|
|
27643
|
-
|
|
27644
|
-
|
|
27704
|
+
lastTopSeg = data;
|
|
27705
|
+
return data;
|
|
27706
|
+
})
|
|
27707
|
+
.filter(item => !!item);
|
|
27645
27708
|
let lastBottomSeg;
|
|
27646
27709
|
const bottomCaches = [];
|
|
27647
27710
|
for (let i = segments.length - 1; i >= 0; i--) {
|
|
@@ -27691,13 +27754,17 @@
|
|
|
27691
27754
|
area.clearUpdateShapeTag();
|
|
27692
27755
|
}
|
|
27693
27756
|
if (Array.isArray(area.cacheArea)) {
|
|
27757
|
+
const segments = area.attribute.segments.filter(item => item.points.length);
|
|
27758
|
+
if (segments[0].points.length === 1) {
|
|
27759
|
+
segments.shift();
|
|
27760
|
+
}
|
|
27694
27761
|
if (clipRange === 1) {
|
|
27695
27762
|
let skip = false;
|
|
27696
27763
|
area.cacheArea.forEach((cache, index) => {
|
|
27697
27764
|
if (skip) {
|
|
27698
27765
|
return;
|
|
27699
27766
|
}
|
|
27700
|
-
skip = this.drawSegmentItem(context, cache, doFill, fillOpacity, doStroke, strokeOpacity,
|
|
27767
|
+
skip = this.drawSegmentItem(context, cache, doFill, fillOpacity, doStroke, strokeOpacity, segments[index], [areaAttribute, area.attribute], clipRange, x, y, z, area, drawContext, fillCb, strokeCb);
|
|
27701
27768
|
});
|
|
27702
27769
|
}
|
|
27703
27770
|
else {
|
|
@@ -27713,7 +27780,7 @@
|
|
|
27713
27780
|
const _cr = (totalDrawLength - drawedLengthUntilLast) / curSegLength;
|
|
27714
27781
|
drawedLengthUntilLast += curSegLength;
|
|
27715
27782
|
if (_cr > 0) {
|
|
27716
|
-
skip = this.drawSegmentItem(context, cache, doFill, fillOpacity, doStroke, strokeOpacity,
|
|
27783
|
+
skip = this.drawSegmentItem(context, cache, doFill, fillOpacity, doStroke, strokeOpacity, segments[index], [areaAttribute, area.attribute], min(_cr, 1), x, y, z, area, drawContext, fillCb, strokeCb);
|
|
27717
27784
|
}
|
|
27718
27785
|
});
|
|
27719
27786
|
}
|
|
@@ -27760,7 +27827,7 @@
|
|
|
27760
27827
|
let { connectedType, connectedX, connectedY, connectedStyle } = attribute;
|
|
27761
27828
|
const da = [];
|
|
27762
27829
|
if (connect) {
|
|
27763
|
-
if (isArray(defaultAttribute)) {
|
|
27830
|
+
if (isArray$1(defaultAttribute)) {
|
|
27764
27831
|
connectedType = (_a = connectedType !== null && connectedType !== void 0 ? connectedType : defaultAttribute[0].connectedType) !== null && _a !== void 0 ? _a : defaultAttribute[1].connectedType;
|
|
27765
27832
|
connectedX = (_b = connectedX !== null && connectedX !== void 0 ? connectedX : defaultAttribute[0].connectedX) !== null && _b !== void 0 ? _b : defaultAttribute[1].connectedX;
|
|
27766
27833
|
connectedY = (_c = connectedY !== null && connectedY !== void 0 ? connectedY : defaultAttribute[0].connectedY) !== null && _c !== void 0 ? _c : defaultAttribute[1].connectedY;
|
|
@@ -27775,7 +27842,7 @@
|
|
|
27775
27842
|
if (connectedType !== 'connect' && connectedType !== 'zero') {
|
|
27776
27843
|
connectedType = 'none';
|
|
27777
27844
|
}
|
|
27778
|
-
if (isArray(defaultAttribute)) {
|
|
27845
|
+
if (isArray$1(defaultAttribute)) {
|
|
27779
27846
|
defaultAttribute.forEach(i => da.push(i));
|
|
27780
27847
|
}
|
|
27781
27848
|
else {
|
|
@@ -27852,7 +27919,7 @@
|
|
|
27852
27919
|
}
|
|
27853
27920
|
else {
|
|
27854
27921
|
const { stroke = defaultAttribute && defaultAttribute[1] && defaultAttribute[1].stroke } = attribute;
|
|
27855
|
-
if (isArray(stroke) && (stroke[0] || stroke[2]) && stroke[1] === false) {
|
|
27922
|
+
if (isArray$1(stroke) && (stroke[0] || stroke[2]) && stroke[1] === false) {
|
|
27856
27923
|
context.beginPath();
|
|
27857
27924
|
drawSegments(context.camera ? context : context.nativeContext, stroke[0] ? cache.top : cache.bottom, clipRange, direction === exports.Direction.ROW ? 'x' : 'y', {
|
|
27858
27925
|
offsetX,
|
|
@@ -27977,7 +28044,7 @@
|
|
|
27977
28044
|
const halfPi = pi / 2;
|
|
27978
28045
|
function createRectPath(path, x, y, width, height, rectCornerRadius) {
|
|
27979
28046
|
let cornerRadius;
|
|
27980
|
-
if (isNumber$
|
|
28047
|
+
if (isNumber$2(rectCornerRadius, true)) {
|
|
27981
28048
|
cornerRadius = [
|
|
27982
28049
|
rectCornerRadius,
|
|
27983
28050
|
rectCornerRadius,
|
|
@@ -28083,7 +28150,7 @@
|
|
|
28083
28150
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) {
|
|
28084
28151
|
return;
|
|
28085
28152
|
}
|
|
28086
|
-
if (cornerRadius === 0 || (isArray(cornerRadius) && cornerRadius.every(num => num === 0))) {
|
|
28153
|
+
if (cornerRadius === 0 || (isArray$1(cornerRadius) && cornerRadius.every(num => num === 0))) {
|
|
28087
28154
|
context.beginPath();
|
|
28088
28155
|
context.rect(x, y, width, height);
|
|
28089
28156
|
}
|
|
@@ -28694,7 +28761,7 @@
|
|
|
28694
28761
|
return;
|
|
28695
28762
|
}
|
|
28696
28763
|
context.beginPath();
|
|
28697
|
-
if (cornerRadius <= 0 || (isArray(cornerRadius) && cornerRadius.every(num => num === 0))) {
|
|
28764
|
+
if (cornerRadius <= 0 || (isArray$1(cornerRadius) && cornerRadius.every(num => num === 0))) {
|
|
28698
28765
|
drawPolygon(context.camera ? context : context.nativeContext, points, x, y);
|
|
28699
28766
|
}
|
|
28700
28767
|
else {
|
|
@@ -28811,7 +28878,7 @@
|
|
|
28811
28878
|
return;
|
|
28812
28879
|
}
|
|
28813
28880
|
let needRestore = false;
|
|
28814
|
-
if (cornerRadius === 0 || (isArray(cornerRadius) && cornerRadius.every(num => num === 0))) ;
|
|
28881
|
+
if (cornerRadius === 0 || (isArray$1(cornerRadius) && cornerRadius.every(num => num === 0))) ;
|
|
28815
28882
|
else {
|
|
28816
28883
|
context.beginPath();
|
|
28817
28884
|
createRectPath(context, x, y, width, height, cornerRadius);
|
|
@@ -28922,7 +28989,7 @@
|
|
|
28922
28989
|
}
|
|
28923
28990
|
let result;
|
|
28924
28991
|
let color;
|
|
28925
|
-
if (isArray(c)) {
|
|
28992
|
+
if (isArray$1(c)) {
|
|
28926
28993
|
for (let i = 0; i < c.length; i++) {
|
|
28927
28994
|
color = c[i];
|
|
28928
28995
|
if (color) {
|
|
@@ -29499,7 +29566,7 @@
|
|
|
29499
29566
|
return;
|
|
29500
29567
|
}
|
|
29501
29568
|
if (!graphic.backgroundImg) {
|
|
29502
|
-
if (isObject(background)) {
|
|
29569
|
+
if (isObject$1(background)) {
|
|
29503
29570
|
const { stroke, fill, lineWidth = 1, cornerRadius = 0, expandX = 0, expandY = 0 } = background;
|
|
29504
29571
|
if (!stroke && !fill) {
|
|
29505
29572
|
return;
|
|
@@ -29563,7 +29630,7 @@
|
|
|
29563
29630
|
let y = bounds.y1;
|
|
29564
29631
|
let width = bounds.width();
|
|
29565
29632
|
let height = bounds.height();
|
|
29566
|
-
if (isNumber$
|
|
29633
|
+
if (isNumber$2(boundsPadding)) {
|
|
29567
29634
|
x += boundsPadding;
|
|
29568
29635
|
y += boundsPadding;
|
|
29569
29636
|
width -= boundsPadding * 2;
|
|
@@ -29605,7 +29672,7 @@
|
|
|
29605
29672
|
const nextX = x - d;
|
|
29606
29673
|
const nextY = y - d;
|
|
29607
29674
|
const dw = d * 2;
|
|
29608
|
-
if (cornerRadius === 0 || (isArray(cornerRadius) && cornerRadius.every(num => num === 0))) {
|
|
29675
|
+
if (cornerRadius === 0 || (isArray$1(cornerRadius) && cornerRadius.every(num => num === 0))) {
|
|
29609
29676
|
context.beginPath();
|
|
29610
29677
|
context.rect(nextX, nextY, width + dw, height + dw);
|
|
29611
29678
|
}
|
|
@@ -29631,7 +29698,7 @@
|
|
|
29631
29698
|
const nextX = x + d;
|
|
29632
29699
|
const nextY = y + d;
|
|
29633
29700
|
const dw = d * 2;
|
|
29634
|
-
if (cornerRadius === 0 || (isArray(cornerRadius) && cornerRadius.every(num => num === 0))) {
|
|
29701
|
+
if (cornerRadius === 0 || (isArray$1(cornerRadius) && cornerRadius.every(num => num === 0))) {
|
|
29635
29702
|
context.beginPath();
|
|
29636
29703
|
context.rect(nextX, nextY, width - dw, height - dw);
|
|
29637
29704
|
}
|
|
@@ -32335,8 +32402,8 @@
|
|
|
32335
32402
|
scaleY = rect.height / nativeCanvas.offsetHeight;
|
|
32336
32403
|
}
|
|
32337
32404
|
return {
|
|
32338
|
-
x: (x - rect.left) / (isValidNumber(scaleX) ? scaleX : 1),
|
|
32339
|
-
y: (y - rect.top) / (isValidNumber(scaleY) ? scaleX : 1)
|
|
32405
|
+
x: (x - rect.left) / (isValidNumber$1(scaleX) ? scaleX : 1),
|
|
32406
|
+
y: (y - rect.top) / (isValidNumber$1(scaleY) ? scaleX : 1)
|
|
32340
32407
|
};
|
|
32341
32408
|
}
|
|
32342
32409
|
return {
|
|
@@ -32363,7 +32430,7 @@
|
|
|
32363
32430
|
const { tagName = 'div', width, height, style, parent } = params;
|
|
32364
32431
|
const element = document.createElement(tagName);
|
|
32365
32432
|
if (style) {
|
|
32366
|
-
if (isString(style)) {
|
|
32433
|
+
if (isString$1(style)) {
|
|
32367
32434
|
element.setAttribute('style', style);
|
|
32368
32435
|
}
|
|
32369
32436
|
else {
|
|
@@ -32379,7 +32446,7 @@
|
|
|
32379
32446
|
element.style.height = `${height}px`;
|
|
32380
32447
|
}
|
|
32381
32448
|
if (parent) {
|
|
32382
|
-
const pd = isString(parent) ? this.getElementById(parent) : parent;
|
|
32449
|
+
const pd = isString$1(parent) ? this.getElementById(parent) : parent;
|
|
32383
32450
|
if (pd && pd.appendChild) {
|
|
32384
32451
|
pd.appendChild(element);
|
|
32385
32452
|
}
|
|
@@ -34736,7 +34803,7 @@
|
|
|
34736
34803
|
throw new Error('暂未实现');
|
|
34737
34804
|
}
|
|
34738
34805
|
release(...params) {
|
|
34739
|
-
if (this._nativeCanvas.release && isFunction(this._nativeCanvas.release)) {
|
|
34806
|
+
if (this._nativeCanvas.release && isFunction$1(this._nativeCanvas.release)) {
|
|
34740
34807
|
this._nativeCanvas.release();
|
|
34741
34808
|
}
|
|
34742
34809
|
}
|
|
@@ -35890,7 +35957,7 @@
|
|
|
35890
35957
|
context.disableStroke = disableStroke;
|
|
35891
35958
|
context.disableBeginPath = disableBeginPath;
|
|
35892
35959
|
}
|
|
35893
|
-
else if (cornerRadius === 0 || (isArray(cornerRadius) && cornerRadius.every(num => num === 0))) {
|
|
35960
|
+
else if (cornerRadius === 0 || (isArray$1(cornerRadius) && cornerRadius.every(num => num === 0))) {
|
|
35894
35961
|
context.beginPath();
|
|
35895
35962
|
context.rect(x, y, width, height);
|
|
35896
35963
|
}
|
|
@@ -37296,8 +37363,8 @@
|
|
|
37296
37363
|
}
|
|
37297
37364
|
let picked = true;
|
|
37298
37365
|
if (!onlyTranslate ||
|
|
37299
|
-
(isNumber$
|
|
37300
|
-
(isArray(cornerRadius) && cornerRadius.some(num => num !== 0))) {
|
|
37366
|
+
(isNumber$2(cornerRadius, true) && cornerRadius !== 0) ||
|
|
37367
|
+
(isArray$1(cornerRadius) && cornerRadius.some(num => num !== 0))) {
|
|
37301
37368
|
picked = false;
|
|
37302
37369
|
this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => {
|
|
37303
37370
|
if (picked) {
|
|
@@ -38194,8 +38261,8 @@
|
|
|
38194
38261
|
}
|
|
38195
38262
|
let picked = true;
|
|
38196
38263
|
if (!onlyTranslate ||
|
|
38197
|
-
(isNumber$
|
|
38198
|
-
(isArray(cornerRadius) && cornerRadius.some(num => num !== 0))) {
|
|
38264
|
+
(isNumber$2(cornerRadius, true) && cornerRadius !== 0) ||
|
|
38265
|
+
(isArray$1(cornerRadius) && cornerRadius.some(num => num !== 0))) {
|
|
38199
38266
|
picked = false;
|
|
38200
38267
|
this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => {
|
|
38201
38268
|
if (picked) {
|
|
@@ -39360,7 +39427,7 @@
|
|
|
39360
39427
|
else if (isNumber(graphic.attribute.boundsPadding)) {
|
|
39361
39428
|
return graphic.attribute.boundsPadding;
|
|
39362
39429
|
}
|
|
39363
|
-
else if (isArray(graphic.attribute.boundsPadding) && graphic.attribute.boundsPadding.length === 1) {
|
|
39430
|
+
else if (isArray$1(graphic.attribute.boundsPadding) && graphic.attribute.boundsPadding.length === 1) {
|
|
39364
39431
|
return graphic.attribute.boundsPadding[0];
|
|
39365
39432
|
}
|
|
39366
39433
|
const paddingArray = parsePadding(graphic.attribute.boundsPadding);
|
|
@@ -39395,7 +39462,7 @@
|
|
|
39395
39462
|
const brightness = min(max((normal[0] * lightDir[0] + normal[1] * lightDir[1] + normal[2] * lightDir[2]) * (1 - this.ambient / 2), 0) +
|
|
39396
39463
|
this.ambient, 1);
|
|
39397
39464
|
let colorArray;
|
|
39398
|
-
if (isString(color)) {
|
|
39465
|
+
if (isString$1(color)) {
|
|
39399
39466
|
const result = colorString.get(color);
|
|
39400
39467
|
colorArray = result.value;
|
|
39401
39468
|
}
|
|
@@ -40139,7 +40206,7 @@
|
|
|
40139
40206
|
};
|
|
40140
40207
|
|
|
40141
40208
|
function flatten(list, out) {
|
|
40142
|
-
if (isArray(list)) {
|
|
40209
|
+
if (isArray$1(list)) {
|
|
40143
40210
|
return list.forEach(i => flatten(i, out));
|
|
40144
40211
|
}
|
|
40145
40212
|
out.push(list);
|
|
@@ -40147,7 +40214,7 @@
|
|
|
40147
40214
|
function jsx(type, config, ...children) {
|
|
40148
40215
|
const _a = config || {}, { key, attribute, stateProxy } = _a, props = __rest(_a, ["key", "attribute", "stateProxy"]);
|
|
40149
40216
|
let c = type;
|
|
40150
|
-
if (isString(type)) {
|
|
40217
|
+
if (isString$1(type)) {
|
|
40151
40218
|
c = graphicCreator[type];
|
|
40152
40219
|
}
|
|
40153
40220
|
const childrenList = [];
|
|
@@ -40195,7 +40262,7 @@
|
|
|
40195
40262
|
}
|
|
40196
40263
|
const Fragment = Group;
|
|
40197
40264
|
|
|
40198
|
-
const version = "0.15.0-alpha.
|
|
40265
|
+
const version = "0.15.0-alpha.17";
|
|
40199
40266
|
|
|
40200
40267
|
exports.ACustomAnimate = ACustomAnimate;
|
|
40201
40268
|
exports.ARC3D_NUMBER_TYPE = ARC3D_NUMBER_TYPE;
|