@visactor/vrender-components 0.17.0-alpha.2 → 0.17.0-alpha.4
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/data-zoom/config.d.ts +0 -6
- package/cjs/data-zoom/config.js +1 -7
- package/cjs/data-zoom/config.js.map +1 -1
- package/cjs/data-zoom/data-zoom.d.ts +3 -2
- package/cjs/data-zoom/data-zoom.js +19 -15
- package/cjs/data-zoom/data-zoom.js.map +1 -1
- package/cjs/data-zoom/type.d.ts +6 -0
- package/cjs/data-zoom/type.js +6 -1
- package/cjs/data-zoom/type.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/label/animate/animate.d.ts +8 -2
- package/cjs/label/animate/animate.js +37 -3
- package/cjs/label/animate/animate.js.map +1 -1
- package/cjs/label/area.d.ts +15 -0
- package/cjs/label/area.js +41 -0
- package/cjs/label/area.js.map +1 -0
- package/cjs/label/base.d.ts +7 -4
- package/cjs/label/base.js +37 -42
- package/cjs/label/base.js.map +1 -1
- package/cjs/label/dataLabel.js +8 -5
- package/cjs/label/dataLabel.js.map +1 -1
- package/cjs/label/line.d.ts +1 -1
- package/cjs/label/line.js +2 -9
- package/cjs/label/line.js.map +1 -1
- package/cjs/label/type.d.ts +22 -2
- package/cjs/label/type.js +1 -2
- package/cjs/label/type.js.map +1 -1
- package/cjs/label/util.d.ts +4 -0
- package/cjs/label/util.js +14 -2
- package/cjs/label/util.js.map +1 -1
- package/cjs/legend/discrete/discrete.d.ts +3 -0
- package/cjs/legend/discrete/discrete.js +45 -38
- package/cjs/legend/discrete/discrete.js.map +1 -1
- package/cjs/legend/discrete/type.d.ts +1 -0
- package/cjs/legend/discrete/type.js.map +1 -1
- package/cjs/link-path/type.js +1 -1
- package/cjs/scrollbar/scrollbar.js.map +1 -1
- package/dist/index.js +699 -562
- package/dist/index.min.js +1 -1
- package/es/data-zoom/config.d.ts +0 -6
- package/es/data-zoom/config.js +0 -7
- package/es/data-zoom/config.js.map +1 -1
- package/es/data-zoom/data-zoom.d.ts +3 -2
- package/es/data-zoom/data-zoom.js +10 -4
- package/es/data-zoom/data-zoom.js.map +1 -1
- package/es/data-zoom/type.d.ts +6 -0
- package/es/data-zoom/type.js +6 -1
- package/es/data-zoom/type.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/label/animate/animate.d.ts +8 -2
- package/es/label/animate/animate.js +35 -0
- package/es/label/animate/animate.js.map +1 -1
- package/es/label/area.d.ts +15 -0
- package/es/label/area.js +39 -0
- package/es/label/area.js.map +1 -0
- package/es/label/base.d.ts +7 -4
- package/es/label/base.js +39 -44
- package/es/label/base.js.map +1 -1
- package/es/label/dataLabel.js +11 -4
- package/es/label/dataLabel.js.map +1 -1
- package/es/label/line.d.ts +1 -1
- package/es/label/line.js +3 -8
- package/es/label/line.js.map +1 -1
- package/es/label/type.d.ts +22 -2
- package/es/label/type.js +1 -2
- package/es/label/type.js.map +1 -1
- package/es/label/util.d.ts +4 -0
- package/es/label/util.js +13 -1
- package/es/label/util.js.map +1 -1
- package/es/legend/discrete/discrete.d.ts +3 -0
- package/es/legend/discrete/discrete.js +44 -36
- package/es/legend/discrete/discrete.js.map +1 -1
- package/es/legend/discrete/type.d.ts +1 -0
- package/es/legend/discrete/type.js.map +1 -1
- package/es/link-path/type.js +1 -1
- package/es/scrollbar/scrollbar.js.map +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -571,400 +571,393 @@
|
|
|
571
571
|
return Metadata;
|
|
572
572
|
}();
|
|
573
573
|
|
|
574
|
-
var Reflect$1
|
|
575
|
-
|
|
576
|
-
return function (
|
|
577
|
-
var
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
__proto__: []
|
|
596
|
-
} instanceof Array,
|
|
597
|
-
downLevel = !supportsCreate && !supportsProto,
|
|
598
|
-
HashMap = {
|
|
599
|
-
create: supportsCreate ? function () {
|
|
600
|
-
return MakeDictionary(Object.create(null));
|
|
601
|
-
} : supportsProto ? function () {
|
|
602
|
-
return MakeDictionary({
|
|
603
|
-
__proto__: null
|
|
604
|
-
});
|
|
605
|
-
} : function () {
|
|
606
|
-
return MakeDictionary({});
|
|
607
|
-
},
|
|
608
|
-
has: downLevel ? function (map, key) {
|
|
609
|
-
return hasOwn.call(map, key);
|
|
610
|
-
} : function (map, key) {
|
|
611
|
-
return key in map;
|
|
612
|
-
},
|
|
613
|
-
get: downLevel ? function (map, key) {
|
|
614
|
-
return hasOwn.call(map, key) ? map[key] : void 0;
|
|
615
|
-
} : function (map, key) {
|
|
616
|
-
return map[key];
|
|
617
|
-
}
|
|
574
|
+
var Reflect$1 = (function (Reflect) {
|
|
575
|
+
var target;
|
|
576
|
+
return function (exporter) {
|
|
577
|
+
var hasOwn = Object.prototype.hasOwnProperty,
|
|
578
|
+
supportsSymbol = "function" == typeof Symbol,
|
|
579
|
+
toPrimitiveSymbol = supportsSymbol && void 0 !== Symbol.toPrimitive ? Symbol.toPrimitive : "@@toPrimitive",
|
|
580
|
+
iteratorSymbol = supportsSymbol && void 0 !== Symbol.iterator ? Symbol.iterator : "@@iterator",
|
|
581
|
+
supportsCreate = "function" == typeof Object.create,
|
|
582
|
+
supportsProto = {
|
|
583
|
+
__proto__: []
|
|
584
|
+
} instanceof Array,
|
|
585
|
+
downLevel = !supportsCreate && !supportsProto,
|
|
586
|
+
HashMap = {
|
|
587
|
+
create: supportsCreate ? function () {
|
|
588
|
+
return MakeDictionary(Object.create(null));
|
|
589
|
+
} : supportsProto ? function () {
|
|
590
|
+
return MakeDictionary({
|
|
591
|
+
__proto__: null
|
|
592
|
+
});
|
|
593
|
+
} : function () {
|
|
594
|
+
return MakeDictionary({});
|
|
618
595
|
},
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
if (
|
|
654
|
-
|
|
655
|
-
return !IsNull(parent) && OrdinaryHasMetadata(MetadataKey, parent, P);
|
|
596
|
+
has: downLevel ? function (map, key) {
|
|
597
|
+
return hasOwn.call(map, key);
|
|
598
|
+
} : function (map, key) {
|
|
599
|
+
return key in map;
|
|
600
|
+
},
|
|
601
|
+
get: downLevel ? function (map, key) {
|
|
602
|
+
return hasOwn.call(map, key) ? map[key] : void 0;
|
|
603
|
+
} : function (map, key) {
|
|
604
|
+
return map[key];
|
|
605
|
+
}
|
|
606
|
+
},
|
|
607
|
+
functionPrototype = Object.getPrototypeOf(Function),
|
|
608
|
+
usePolyfill = "object" == (typeof process === "undefined" ? "undefined" : _typeof(process)) && process.env && "true" === process.env.REFLECT_METADATA_USE_MAP_POLYFILL,
|
|
609
|
+
_Map = usePolyfill || "function" != typeof Map || "function" != typeof Map.prototype.entries ? CreateMapPolyfill() : Map,
|
|
610
|
+
Metadata = (usePolyfill || "function" != typeof Set || "function" != typeof Set.prototype.entries ? CreateSetPolyfill() : Set, new (usePolyfill || "function" != typeof WeakMap ? CreateWeakMapPolyfill() : WeakMap)());
|
|
611
|
+
function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
|
|
612
|
+
if (!IsObject(target)) throw new TypeError();
|
|
613
|
+
return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
614
|
+
}
|
|
615
|
+
function hasMetadata(metadataKey, target, propertyKey) {
|
|
616
|
+
if (!IsObject(target)) throw new TypeError();
|
|
617
|
+
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryHasMetadata(metadataKey, target, propertyKey);
|
|
618
|
+
}
|
|
619
|
+
function hasOwnMetadata(metadataKey, target, propertyKey) {
|
|
620
|
+
if (!IsObject(target)) throw new TypeError();
|
|
621
|
+
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
|
|
622
|
+
}
|
|
623
|
+
function getMetadata(metadataKey, target, propertyKey) {
|
|
624
|
+
if (!IsObject(target)) throw new TypeError();
|
|
625
|
+
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryGetMetadata(metadataKey, target, propertyKey);
|
|
626
|
+
}
|
|
627
|
+
function GetOrCreateMetadataMap(O, P, Create) {
|
|
628
|
+
var targetMetadata = Metadata.get(O);
|
|
629
|
+
if (IsUndefined(targetMetadata)) {
|
|
630
|
+
if (!Create) return;
|
|
631
|
+
targetMetadata = new _Map(), Metadata.set(O, targetMetadata);
|
|
656
632
|
}
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
633
|
+
var metadataMap = targetMetadata.get(P);
|
|
634
|
+
if (IsUndefined(metadataMap)) {
|
|
635
|
+
if (!Create) return;
|
|
636
|
+
metadataMap = new _Map(), targetMetadata.set(P, metadataMap);
|
|
660
637
|
}
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
638
|
+
return metadataMap;
|
|
639
|
+
}
|
|
640
|
+
function OrdinaryHasMetadata(MetadataKey, O, P) {
|
|
641
|
+
if (OrdinaryHasOwnMetadata(MetadataKey, O, P)) return !0;
|
|
642
|
+
var parent = OrdinaryGetPrototypeOf(O);
|
|
643
|
+
return !IsNull(parent) && OrdinaryHasMetadata(MetadataKey, parent, P);
|
|
644
|
+
}
|
|
645
|
+
function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
|
|
646
|
+
var metadataMap = GetOrCreateMetadataMap(O, P, !1);
|
|
647
|
+
return !IsUndefined(metadataMap) && ToBoolean(metadataMap.has(MetadataKey));
|
|
648
|
+
}
|
|
649
|
+
function OrdinaryGetMetadata(MetadataKey, O, P) {
|
|
650
|
+
if (OrdinaryHasOwnMetadata(MetadataKey, O, P)) return OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
651
|
+
var parent = OrdinaryGetPrototypeOf(O);
|
|
652
|
+
return IsNull(parent) ? void 0 : OrdinaryGetMetadata(MetadataKey, parent, P);
|
|
653
|
+
}
|
|
654
|
+
function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
|
|
655
|
+
var metadataMap = GetOrCreateMetadataMap(O, P, !1);
|
|
656
|
+
if (!IsUndefined(metadataMap)) return metadataMap.get(MetadataKey);
|
|
657
|
+
}
|
|
658
|
+
function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
|
|
659
|
+
GetOrCreateMetadataMap(O, P, !0).set(MetadataKey, MetadataValue);
|
|
660
|
+
}
|
|
661
|
+
function Type(x) {
|
|
662
|
+
if (null === x) return 1;
|
|
663
|
+
switch (_typeof(x)) {
|
|
664
|
+
case "undefined":
|
|
665
|
+
return 0;
|
|
666
|
+
case "boolean":
|
|
667
|
+
return 2;
|
|
668
|
+
case "string":
|
|
669
|
+
return 3;
|
|
670
|
+
case "symbol":
|
|
671
|
+
return 4;
|
|
672
|
+
case "number":
|
|
673
|
+
return 5;
|
|
674
|
+
case "object":
|
|
675
|
+
return null === x ? 1 : 6;
|
|
676
|
+
default:
|
|
677
|
+
return 6;
|
|
665
678
|
}
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
679
|
+
}
|
|
680
|
+
function IsUndefined(x) {
|
|
681
|
+
return void 0 === x;
|
|
682
|
+
}
|
|
683
|
+
function IsNull(x) {
|
|
684
|
+
return null === x;
|
|
685
|
+
}
|
|
686
|
+
function IsSymbol(x) {
|
|
687
|
+
return "symbol" == _typeof(x);
|
|
688
|
+
}
|
|
689
|
+
function IsObject(x) {
|
|
690
|
+
return "object" == _typeof(x) ? null !== x : "function" == typeof x;
|
|
691
|
+
}
|
|
692
|
+
function ToPrimitive(input, PreferredType) {
|
|
693
|
+
switch (Type(input)) {
|
|
694
|
+
case 0:
|
|
695
|
+
case 1:
|
|
696
|
+
case 2:
|
|
697
|
+
case 3:
|
|
698
|
+
case 4:
|
|
699
|
+
case 5:
|
|
700
|
+
return input;
|
|
669
701
|
}
|
|
670
|
-
|
|
671
|
-
|
|
702
|
+
var hint = 3 === PreferredType ? "string" : 5 === PreferredType ? "number" : "default",
|
|
703
|
+
exoticToPrim = GetMethod(input, toPrimitiveSymbol);
|
|
704
|
+
if (void 0 !== exoticToPrim) {
|
|
705
|
+
var result = exoticToPrim.call(input, hint);
|
|
706
|
+
if (IsObject(result)) throw new TypeError();
|
|
707
|
+
return result;
|
|
672
708
|
}
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
709
|
+
return OrdinaryToPrimitive(input, "default" === hint ? "number" : hint);
|
|
710
|
+
}
|
|
711
|
+
function OrdinaryToPrimitive(O, hint) {
|
|
712
|
+
if ("string" === hint) {
|
|
713
|
+
var toString_1 = O.toString;
|
|
714
|
+
if (IsCallable(toString_1)) {
|
|
715
|
+
var result = toString_1.call(O);
|
|
716
|
+
if (!IsObject(result)) return result;
|
|
717
|
+
}
|
|
718
|
+
var _valueOf = O.valueOf;
|
|
719
|
+
if (IsCallable(_valueOf)) {
|
|
720
|
+
var _result = _valueOf.call(O);
|
|
721
|
+
if (!IsObject(_result)) return _result;
|
|
722
|
+
}
|
|
723
|
+
} else {
|
|
724
|
+
var _valueOf2 = O.valueOf;
|
|
725
|
+
if (IsCallable(_valueOf2)) {
|
|
726
|
+
var _result2 = _valueOf2.call(O);
|
|
727
|
+
if (!IsObject(_result2)) return _result2;
|
|
728
|
+
}
|
|
729
|
+
var toString_2 = O.toString;
|
|
730
|
+
if (IsCallable(toString_2)) {
|
|
731
|
+
var _result3 = toString_2.call(O);
|
|
732
|
+
if (!IsObject(_result3)) return _result3;
|
|
690
733
|
}
|
|
691
734
|
}
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
return input;
|
|
713
|
-
}
|
|
714
|
-
var hint = 3 === PreferredType ? "string" : 5 === PreferredType ? "number" : "default",
|
|
715
|
-
exoticToPrim = GetMethod(input, toPrimitiveSymbol);
|
|
716
|
-
if (void 0 !== exoticToPrim) {
|
|
717
|
-
var result = exoticToPrim.call(input, hint);
|
|
718
|
-
if (IsObject(result)) throw new TypeError();
|
|
719
|
-
return result;
|
|
720
|
-
}
|
|
721
|
-
return OrdinaryToPrimitive(input, "default" === hint ? "number" : hint);
|
|
735
|
+
throw new TypeError();
|
|
736
|
+
}
|
|
737
|
+
function ToBoolean(argument) {
|
|
738
|
+
return !!argument;
|
|
739
|
+
}
|
|
740
|
+
function ToString(argument) {
|
|
741
|
+
return "" + argument;
|
|
742
|
+
}
|
|
743
|
+
function ToPropertyKey(argument) {
|
|
744
|
+
var key = ToPrimitive(argument, 3);
|
|
745
|
+
return IsSymbol(key) ? key : ToString(key);
|
|
746
|
+
}
|
|
747
|
+
function IsCallable(argument) {
|
|
748
|
+
return "function" == typeof argument;
|
|
749
|
+
}
|
|
750
|
+
function GetMethod(V, P) {
|
|
751
|
+
var func = V[P];
|
|
752
|
+
if (null != func) {
|
|
753
|
+
if (!IsCallable(func)) throw new TypeError();
|
|
754
|
+
return func;
|
|
722
755
|
}
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
}
|
|
741
|
-
var toString_2 = O.toString;
|
|
742
|
-
if (IsCallable(toString_2)) {
|
|
743
|
-
var _result3 = toString_2.call(O);
|
|
744
|
-
if (!IsObject(_result3)) return _result3;
|
|
756
|
+
}
|
|
757
|
+
function OrdinaryGetPrototypeOf(O) {
|
|
758
|
+
var proto = Object.getPrototypeOf(O);
|
|
759
|
+
if ("function" != typeof O || O === functionPrototype) return proto;
|
|
760
|
+
if (proto !== functionPrototype) return proto;
|
|
761
|
+
var prototype = O.prototype,
|
|
762
|
+
prototypeProto = prototype && Object.getPrototypeOf(prototype);
|
|
763
|
+
if (null == prototypeProto || prototypeProto === Object.prototype) return proto;
|
|
764
|
+
var constructor = prototypeProto.constructor;
|
|
765
|
+
return "function" != typeof constructor || constructor === O ? proto : constructor;
|
|
766
|
+
}
|
|
767
|
+
function CreateMapPolyfill() {
|
|
768
|
+
var cacheSentinel = {},
|
|
769
|
+
arraySentinel = [],
|
|
770
|
+
MapIterator = function () {
|
|
771
|
+
function MapIterator(keys, values, selector) {
|
|
772
|
+
this._index = 0, this._keys = keys, this._values = values, this._selector = selector;
|
|
745
773
|
}
|
|
774
|
+
return MapIterator.prototype["@@iterator"] = function () {
|
|
775
|
+
return this;
|
|
776
|
+
}, MapIterator.prototype[iteratorSymbol] = function () {
|
|
777
|
+
return this;
|
|
778
|
+
}, MapIterator.prototype.next = function () {
|
|
779
|
+
var index = this._index;
|
|
780
|
+
if (index >= 0 && index < this._keys.length) {
|
|
781
|
+
var result = this._selector(this._keys[index], this._values[index]);
|
|
782
|
+
return index + 1 >= this._keys.length ? (this._index = -1, this._keys = arraySentinel, this._values = arraySentinel) : this._index++, {
|
|
783
|
+
value: result,
|
|
784
|
+
done: !1
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
return {
|
|
788
|
+
value: void 0,
|
|
789
|
+
done: !0
|
|
790
|
+
};
|
|
791
|
+
}, MapIterator.prototype["throw"] = function (error) {
|
|
792
|
+
throw this._index >= 0 && (this._index = -1, this._keys = arraySentinel, this._values = arraySentinel), error;
|
|
793
|
+
}, MapIterator.prototype["return"] = function (value) {
|
|
794
|
+
return this._index >= 0 && (this._index = -1, this._keys = arraySentinel, this._values = arraySentinel), {
|
|
795
|
+
value: value,
|
|
796
|
+
done: !0
|
|
797
|
+
};
|
|
798
|
+
}, MapIterator;
|
|
799
|
+
}();
|
|
800
|
+
return function () {
|
|
801
|
+
function Map() {
|
|
802
|
+
this._keys = [], this._values = [], this._cacheKey = cacheSentinel, this._cacheIndex = -2;
|
|
746
803
|
}
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
804
|
+
return Object.defineProperty(Map.prototype, "size", {
|
|
805
|
+
get: function get() {
|
|
806
|
+
return this._keys.length;
|
|
807
|
+
},
|
|
808
|
+
enumerable: !0,
|
|
809
|
+
configurable: !0
|
|
810
|
+
}), Map.prototype.has = function (key) {
|
|
811
|
+
return this._find(key, !1) >= 0;
|
|
812
|
+
}, Map.prototype.get = function (key) {
|
|
813
|
+
var index = this._find(key, !1);
|
|
814
|
+
return index >= 0 ? this._values[index] : void 0;
|
|
815
|
+
}, Map.prototype.set = function (key, value) {
|
|
816
|
+
var index = this._find(key, !0);
|
|
817
|
+
return this._values[index] = value, this;
|
|
818
|
+
}, Map.prototype["delete"] = function (key) {
|
|
819
|
+
var index = this._find(key, !1);
|
|
820
|
+
if (index >= 0) {
|
|
821
|
+
var size = this._keys.length;
|
|
822
|
+
for (var i = index + 1; i < size; i++) this._keys[i - 1] = this._keys[i], this._values[i - 1] = this._values[i];
|
|
823
|
+
return this._keys.length--, this._values.length--, key === this._cacheKey && (this._cacheKey = cacheSentinel, this._cacheIndex = -2), !0;
|
|
824
|
+
}
|
|
825
|
+
return !1;
|
|
826
|
+
}, Map.prototype.clear = function () {
|
|
827
|
+
this._keys.length = 0, this._values.length = 0, this._cacheKey = cacheSentinel, this._cacheIndex = -2;
|
|
828
|
+
}, Map.prototype.keys = function () {
|
|
829
|
+
return new MapIterator(this._keys, this._values, getKey);
|
|
830
|
+
}, Map.prototype.values = function () {
|
|
831
|
+
return new MapIterator(this._keys, this._values, getValue);
|
|
832
|
+
}, Map.prototype.entries = function () {
|
|
833
|
+
return new MapIterator(this._keys, this._values, getEntry);
|
|
834
|
+
}, Map.prototype["@@iterator"] = function () {
|
|
835
|
+
return this.entries();
|
|
836
|
+
}, Map.prototype[iteratorSymbol] = function () {
|
|
837
|
+
return this.entries();
|
|
838
|
+
}, Map.prototype._find = function (key, insert) {
|
|
839
|
+
return this._cacheKey !== key && (this._cacheIndex = this._keys.indexOf(this._cacheKey = key)), this._cacheIndex < 0 && insert && (this._cacheIndex = this._keys.length, this._keys.push(key), this._values.push(void 0)), this._cacheIndex;
|
|
840
|
+
}, Map;
|
|
841
|
+
}();
|
|
842
|
+
function getKey(key, _) {
|
|
843
|
+
return key;
|
|
754
844
|
}
|
|
755
|
-
function
|
|
756
|
-
|
|
757
|
-
return IsSymbol(key) ? key : ToString(key);
|
|
845
|
+
function getValue(_, value) {
|
|
846
|
+
return value;
|
|
758
847
|
}
|
|
759
|
-
function
|
|
760
|
-
return
|
|
848
|
+
function getEntry(key, value) {
|
|
849
|
+
return [key, value];
|
|
761
850
|
}
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
851
|
+
}
|
|
852
|
+
function CreateSetPolyfill() {
|
|
853
|
+
return function () {
|
|
854
|
+
function Set() {
|
|
855
|
+
this._map = new _Map();
|
|
767
856
|
}
|
|
857
|
+
return Object.defineProperty(Set.prototype, "size", {
|
|
858
|
+
get: function get() {
|
|
859
|
+
return this._map.size;
|
|
860
|
+
},
|
|
861
|
+
enumerable: !0,
|
|
862
|
+
configurable: !0
|
|
863
|
+
}), Set.prototype.has = function (value) {
|
|
864
|
+
return this._map.has(value);
|
|
865
|
+
}, Set.prototype.add = function (value) {
|
|
866
|
+
return this._map.set(value, value), this;
|
|
867
|
+
}, Set.prototype["delete"] = function (value) {
|
|
868
|
+
return this._map["delete"](value);
|
|
869
|
+
}, Set.prototype.clear = function () {
|
|
870
|
+
this._map.clear();
|
|
871
|
+
}, Set.prototype.keys = function () {
|
|
872
|
+
return this._map.keys();
|
|
873
|
+
}, Set.prototype.values = function () {
|
|
874
|
+
return this._map.values();
|
|
875
|
+
}, Set.prototype.entries = function () {
|
|
876
|
+
return this._map.entries();
|
|
877
|
+
}, Set.prototype["@@iterator"] = function () {
|
|
878
|
+
return this.keys();
|
|
879
|
+
}, Set.prototype[iteratorSymbol] = function () {
|
|
880
|
+
return this.keys();
|
|
881
|
+
}, Set;
|
|
882
|
+
}();
|
|
883
|
+
}
|
|
884
|
+
function CreateWeakMapPolyfill() {
|
|
885
|
+
var UUID_SIZE = 16,
|
|
886
|
+
keys = HashMap.create(),
|
|
887
|
+
rootKey = CreateUniqueKey();
|
|
888
|
+
return function () {
|
|
889
|
+
function WeakMap() {
|
|
890
|
+
this._key = CreateUniqueKey();
|
|
891
|
+
}
|
|
892
|
+
return WeakMap.prototype.has = function (target) {
|
|
893
|
+
var table = GetOrCreateWeakMapTable(target, !1);
|
|
894
|
+
return void 0 !== table && HashMap.has(table, this._key);
|
|
895
|
+
}, WeakMap.prototype.get = function (target) {
|
|
896
|
+
var table = GetOrCreateWeakMapTable(target, !1);
|
|
897
|
+
return void 0 !== table ? HashMap.get(table, this._key) : void 0;
|
|
898
|
+
}, WeakMap.prototype.set = function (target, value) {
|
|
899
|
+
return GetOrCreateWeakMapTable(target, !0)[this._key] = value, this;
|
|
900
|
+
}, WeakMap.prototype["delete"] = function (target) {
|
|
901
|
+
var table = GetOrCreateWeakMapTable(target, !1);
|
|
902
|
+
return void 0 !== table && delete table[this._key];
|
|
903
|
+
}, WeakMap.prototype.clear = function () {
|
|
904
|
+
this._key = CreateUniqueKey();
|
|
905
|
+
}, WeakMap;
|
|
906
|
+
}();
|
|
907
|
+
function CreateUniqueKey() {
|
|
908
|
+
var key;
|
|
909
|
+
do {
|
|
910
|
+
key = "@@WeakMap@@" + CreateUUID();
|
|
911
|
+
} while (HashMap.has(keys, key));
|
|
912
|
+
return keys[key] = !0, key;
|
|
768
913
|
}
|
|
769
|
-
function
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
if (null == prototypeProto || prototypeProto === Object.prototype) return proto;
|
|
776
|
-
var constructor = prototypeProto.constructor;
|
|
777
|
-
return "function" != typeof constructor || constructor === O ? proto : constructor;
|
|
778
|
-
}
|
|
779
|
-
function CreateMapPolyfill() {
|
|
780
|
-
var cacheSentinel = {},
|
|
781
|
-
arraySentinel = [],
|
|
782
|
-
MapIterator = function () {
|
|
783
|
-
function MapIterator(keys, values, selector) {
|
|
784
|
-
this._index = 0, this._keys = keys, this._values = values, this._selector = selector;
|
|
785
|
-
}
|
|
786
|
-
return MapIterator.prototype["@@iterator"] = function () {
|
|
787
|
-
return this;
|
|
788
|
-
}, MapIterator.prototype[iteratorSymbol] = function () {
|
|
789
|
-
return this;
|
|
790
|
-
}, MapIterator.prototype.next = function () {
|
|
791
|
-
var index = this._index;
|
|
792
|
-
if (index >= 0 && index < this._keys.length) {
|
|
793
|
-
var result = this._selector(this._keys[index], this._values[index]);
|
|
794
|
-
return index + 1 >= this._keys.length ? (this._index = -1, this._keys = arraySentinel, this._values = arraySentinel) : this._index++, {
|
|
795
|
-
value: result,
|
|
796
|
-
done: !1
|
|
797
|
-
};
|
|
798
|
-
}
|
|
799
|
-
return {
|
|
800
|
-
value: void 0,
|
|
801
|
-
done: !0
|
|
802
|
-
};
|
|
803
|
-
}, MapIterator.prototype["throw"] = function (error) {
|
|
804
|
-
throw this._index >= 0 && (this._index = -1, this._keys = arraySentinel, this._values = arraySentinel), error;
|
|
805
|
-
}, MapIterator.prototype["return"] = function (value) {
|
|
806
|
-
return this._index >= 0 && (this._index = -1, this._keys = arraySentinel, this._values = arraySentinel), {
|
|
807
|
-
value: value,
|
|
808
|
-
done: !0
|
|
809
|
-
};
|
|
810
|
-
}, MapIterator;
|
|
811
|
-
}();
|
|
812
|
-
return function () {
|
|
813
|
-
function Map() {
|
|
814
|
-
this._keys = [], this._values = [], this._cacheKey = cacheSentinel, this._cacheIndex = -2;
|
|
815
|
-
}
|
|
816
|
-
return Object.defineProperty(Map.prototype, "size", {
|
|
817
|
-
get: function get() {
|
|
818
|
-
return this._keys.length;
|
|
819
|
-
},
|
|
820
|
-
enumerable: !0,
|
|
821
|
-
configurable: !0
|
|
822
|
-
}), Map.prototype.has = function (key) {
|
|
823
|
-
return this._find(key, !1) >= 0;
|
|
824
|
-
}, Map.prototype.get = function (key) {
|
|
825
|
-
var index = this._find(key, !1);
|
|
826
|
-
return index >= 0 ? this._values[index] : void 0;
|
|
827
|
-
}, Map.prototype.set = function (key, value) {
|
|
828
|
-
var index = this._find(key, !0);
|
|
829
|
-
return this._values[index] = value, this;
|
|
830
|
-
}, Map.prototype["delete"] = function (key) {
|
|
831
|
-
var index = this._find(key, !1);
|
|
832
|
-
if (index >= 0) {
|
|
833
|
-
var size = this._keys.length;
|
|
834
|
-
for (var i = index + 1; i < size; i++) this._keys[i - 1] = this._keys[i], this._values[i - 1] = this._values[i];
|
|
835
|
-
return this._keys.length--, this._values.length--, key === this._cacheKey && (this._cacheKey = cacheSentinel, this._cacheIndex = -2), !0;
|
|
836
|
-
}
|
|
837
|
-
return !1;
|
|
838
|
-
}, Map.prototype.clear = function () {
|
|
839
|
-
this._keys.length = 0, this._values.length = 0, this._cacheKey = cacheSentinel, this._cacheIndex = -2;
|
|
840
|
-
}, Map.prototype.keys = function () {
|
|
841
|
-
return new MapIterator(this._keys, this._values, getKey);
|
|
842
|
-
}, Map.prototype.values = function () {
|
|
843
|
-
return new MapIterator(this._keys, this._values, getValue);
|
|
844
|
-
}, Map.prototype.entries = function () {
|
|
845
|
-
return new MapIterator(this._keys, this._values, getEntry);
|
|
846
|
-
}, Map.prototype["@@iterator"] = function () {
|
|
847
|
-
return this.entries();
|
|
848
|
-
}, Map.prototype[iteratorSymbol] = function () {
|
|
849
|
-
return this.entries();
|
|
850
|
-
}, Map.prototype._find = function (key, insert) {
|
|
851
|
-
return this._cacheKey !== key && (this._cacheIndex = this._keys.indexOf(this._cacheKey = key)), this._cacheIndex < 0 && insert && (this._cacheIndex = this._keys.length, this._keys.push(key), this._values.push(void 0)), this._cacheIndex;
|
|
852
|
-
}, Map;
|
|
853
|
-
}();
|
|
854
|
-
function getKey(key, _) {
|
|
855
|
-
return key;
|
|
856
|
-
}
|
|
857
|
-
function getValue(_, value) {
|
|
858
|
-
return value;
|
|
859
|
-
}
|
|
860
|
-
function getEntry(key, value) {
|
|
861
|
-
return [key, value];
|
|
914
|
+
function GetOrCreateWeakMapTable(target, create) {
|
|
915
|
+
if (!hasOwn.call(target, rootKey)) {
|
|
916
|
+
if (!create) return;
|
|
917
|
+
Object.defineProperty(target, rootKey, {
|
|
918
|
+
value: HashMap.create()
|
|
919
|
+
});
|
|
862
920
|
}
|
|
921
|
+
return target[rootKey];
|
|
863
922
|
}
|
|
864
|
-
function
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
this._map = new _Map();
|
|
868
|
-
}
|
|
869
|
-
return Object.defineProperty(Set.prototype, "size", {
|
|
870
|
-
get: function get() {
|
|
871
|
-
return this._map.size;
|
|
872
|
-
},
|
|
873
|
-
enumerable: !0,
|
|
874
|
-
configurable: !0
|
|
875
|
-
}), Set.prototype.has = function (value) {
|
|
876
|
-
return this._map.has(value);
|
|
877
|
-
}, Set.prototype.add = function (value) {
|
|
878
|
-
return this._map.set(value, value), this;
|
|
879
|
-
}, Set.prototype["delete"] = function (value) {
|
|
880
|
-
return this._map["delete"](value);
|
|
881
|
-
}, Set.prototype.clear = function () {
|
|
882
|
-
this._map.clear();
|
|
883
|
-
}, Set.prototype.keys = function () {
|
|
884
|
-
return this._map.keys();
|
|
885
|
-
}, Set.prototype.values = function () {
|
|
886
|
-
return this._map.values();
|
|
887
|
-
}, Set.prototype.entries = function () {
|
|
888
|
-
return this._map.entries();
|
|
889
|
-
}, Set.prototype["@@iterator"] = function () {
|
|
890
|
-
return this.keys();
|
|
891
|
-
}, Set.prototype[iteratorSymbol] = function () {
|
|
892
|
-
return this.keys();
|
|
893
|
-
}, Set;
|
|
894
|
-
}();
|
|
923
|
+
function FillRandomBytes(buffer, size) {
|
|
924
|
+
for (var i = 0; i < size; ++i) buffer[i] = 255 * Math.random() | 0;
|
|
925
|
+
return buffer;
|
|
895
926
|
}
|
|
896
|
-
function
|
|
897
|
-
|
|
898
|
-
keys = HashMap.create(),
|
|
899
|
-
rootKey = CreateUniqueKey();
|
|
900
|
-
return function () {
|
|
901
|
-
function WeakMap() {
|
|
902
|
-
this._key = CreateUniqueKey();
|
|
903
|
-
}
|
|
904
|
-
return WeakMap.prototype.has = function (target) {
|
|
905
|
-
var table = GetOrCreateWeakMapTable(target, !1);
|
|
906
|
-
return void 0 !== table && HashMap.has(table, this._key);
|
|
907
|
-
}, WeakMap.prototype.get = function (target) {
|
|
908
|
-
var table = GetOrCreateWeakMapTable(target, !1);
|
|
909
|
-
return void 0 !== table ? HashMap.get(table, this._key) : void 0;
|
|
910
|
-
}, WeakMap.prototype.set = function (target, value) {
|
|
911
|
-
return GetOrCreateWeakMapTable(target, !0)[this._key] = value, this;
|
|
912
|
-
}, WeakMap.prototype["delete"] = function (target) {
|
|
913
|
-
var table = GetOrCreateWeakMapTable(target, !1);
|
|
914
|
-
return void 0 !== table && delete table[this._key];
|
|
915
|
-
}, WeakMap.prototype.clear = function () {
|
|
916
|
-
this._key = CreateUniqueKey();
|
|
917
|
-
}, WeakMap;
|
|
918
|
-
}();
|
|
919
|
-
function CreateUniqueKey() {
|
|
920
|
-
var key;
|
|
921
|
-
do {
|
|
922
|
-
key = "@@WeakMap@@" + CreateUUID();
|
|
923
|
-
} while (HashMap.has(keys, key));
|
|
924
|
-
return keys[key] = !0, key;
|
|
925
|
-
}
|
|
926
|
-
function GetOrCreateWeakMapTable(target, create) {
|
|
927
|
-
if (!hasOwn.call(target, rootKey)) {
|
|
928
|
-
if (!create) return;
|
|
929
|
-
Object.defineProperty(target, rootKey, {
|
|
930
|
-
value: HashMap.create()
|
|
931
|
-
});
|
|
932
|
-
}
|
|
933
|
-
return target[rootKey];
|
|
934
|
-
}
|
|
935
|
-
function FillRandomBytes(buffer, size) {
|
|
936
|
-
for (var i = 0; i < size; ++i) buffer[i] = 255 * Math.random() | 0;
|
|
937
|
-
return buffer;
|
|
938
|
-
}
|
|
939
|
-
function GenRandomBytes(size) {
|
|
940
|
-
return "function" == typeof Uint8Array ? "undefined" != typeof crypto ? crypto.getRandomValues(new Uint8Array(size)) : FillRandomBytes(new Uint8Array(size), size) : FillRandomBytes(new Array(size), size);
|
|
941
|
-
}
|
|
942
|
-
function CreateUUID() {
|
|
943
|
-
var data = GenRandomBytes(UUID_SIZE);
|
|
944
|
-
data[6] = 79 & data[6] | 64, data[8] = 191 & data[8] | 128;
|
|
945
|
-
var result = "";
|
|
946
|
-
for (var offset = 0; offset < UUID_SIZE; ++offset) {
|
|
947
|
-
var _byte = data[offset];
|
|
948
|
-
4 !== offset && 6 !== offset && 8 !== offset || (result += "-"), _byte < 16 && (result += "0"), result += _byte.toString(16).toLowerCase();
|
|
949
|
-
}
|
|
950
|
-
return result;
|
|
951
|
-
}
|
|
927
|
+
function GenRandomBytes(size) {
|
|
928
|
+
return "function" == typeof Uint8Array ? "undefined" != typeof crypto ? crypto.getRandomValues(new Uint8Array(size)) : FillRandomBytes(new Uint8Array(size), size) : FillRandomBytes(new Array(size), size);
|
|
952
929
|
}
|
|
953
|
-
function
|
|
954
|
-
|
|
930
|
+
function CreateUUID() {
|
|
931
|
+
var data = GenRandomBytes(UUID_SIZE);
|
|
932
|
+
data[6] = 79 & data[6] | 64, data[8] = 191 & data[8] | 128;
|
|
933
|
+
var result = "";
|
|
934
|
+
for (var offset = 0; offset < UUID_SIZE; ++offset) {
|
|
935
|
+
var _byte = data[offset];
|
|
936
|
+
4 !== offset && 6 !== offset && 8 !== offset || (result += "-"), _byte < 16 && (result += "0"), result += _byte.toString(16).toLowerCase();
|
|
937
|
+
}
|
|
938
|
+
return result;
|
|
955
939
|
}
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
940
|
+
}
|
|
941
|
+
function MakeDictionary(obj) {
|
|
942
|
+
return obj.__ = void 0, delete obj.__, obj;
|
|
943
|
+
}
|
|
944
|
+
exporter("defineMetadata", defineMetadata), exporter("hasMetadata", hasMetadata), exporter("hasOwnMetadata", hasOwnMetadata), exporter("getMetadata", getMetadata);
|
|
945
|
+
}((target = Reflect, function (key, value) {
|
|
946
|
+
"function" != typeof target[key] && Object.defineProperty(target, key, {
|
|
947
|
+
configurable: !0,
|
|
948
|
+
writable: !0,
|
|
949
|
+
value: value
|
|
950
|
+
});
|
|
951
|
+
})), Reflect;
|
|
952
|
+
})({});
|
|
960
953
|
|
|
961
954
|
function _tagParameterOrProperty(metadataKey, annotationTarget, key, metadata) {
|
|
962
955
|
var _paramOrPropertyMetad;
|
|
963
956
|
var metadatas = [metadata];
|
|
964
957
|
var paramsOrPropertiesMetadata = {};
|
|
965
|
-
Reflect$
|
|
958
|
+
Reflect$1.hasOwnMetadata(metadataKey, annotationTarget) && (paramsOrPropertiesMetadata = Reflect$1.getMetadata(metadataKey, annotationTarget));
|
|
966
959
|
var paramOrPropertyMetadata = paramsOrPropertiesMetadata[key];
|
|
967
|
-
void 0 === paramOrPropertyMetadata && (paramOrPropertyMetadata = []), (_paramOrPropertyMetad = paramOrPropertyMetadata).push.apply(_paramOrPropertyMetad, metadatas), paramsOrPropertiesMetadata[key] = paramOrPropertyMetadata, Reflect$
|
|
960
|
+
void 0 === paramOrPropertyMetadata && (paramOrPropertyMetadata = []), (_paramOrPropertyMetad = paramOrPropertyMetadata).push.apply(_paramOrPropertyMetad, metadatas), paramsOrPropertiesMetadata[key] = paramOrPropertyMetadata, Reflect$1.defineMetadata(metadataKey, paramsOrPropertiesMetadata, annotationTarget);
|
|
968
961
|
}
|
|
969
962
|
function tagParameter(annotationTarget, parameterName, parameterIndex, metadata) {
|
|
970
963
|
_tagParameterOrProperty(TAGGED, annotationTarget, parameterIndex.toString(), metadata);
|
|
@@ -988,7 +981,7 @@
|
|
|
988
981
|
|
|
989
982
|
function injectable() {
|
|
990
983
|
return function (target) {
|
|
991
|
-
return Reflect$
|
|
984
|
+
return Reflect$1.defineMetadata(PARAM_TYPES, null, target), target;
|
|
992
985
|
};
|
|
993
986
|
}
|
|
994
987
|
|
|
@@ -1036,8 +1029,8 @@
|
|
|
1036
1029
|
key: "getConstructorMetadata",
|
|
1037
1030
|
value: function getConstructorMetadata(constructorFunc) {
|
|
1038
1031
|
return {
|
|
1039
|
-
compilerGeneratedMetadata: Reflect$
|
|
1040
|
-
userGeneratedMetadata: Reflect$
|
|
1032
|
+
compilerGeneratedMetadata: Reflect$1.getMetadata(PARAM_TYPES, constructorFunc),
|
|
1033
|
+
userGeneratedMetadata: Reflect$1.getMetadata(TAGGED, constructorFunc) || {}
|
|
1041
1034
|
};
|
|
1042
1035
|
}
|
|
1043
1036
|
}, {
|
|
@@ -1479,7 +1472,7 @@
|
|
|
1479
1472
|
var EnvContribution = Symbol["for"]("EnvContribution");
|
|
1480
1473
|
var VGlobal = Symbol["for"]("VGlobal");
|
|
1481
1474
|
|
|
1482
|
-
var __decorate$
|
|
1475
|
+
var __decorate$G = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
1483
1476
|
var d,
|
|
1484
1477
|
c = arguments.length,
|
|
1485
1478
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -1729,7 +1722,7 @@
|
|
|
1729
1722
|
}]);
|
|
1730
1723
|
return DefaultGlobal;
|
|
1731
1724
|
}();
|
|
1732
|
-
DefaultGlobal = __decorate$
|
|
1725
|
+
DefaultGlobal = __decorate$G([injectable(), __param$i(0, inject(ContributionProvider)), __param$i(0, named(EnvContribution)), __metadata$r("design:paramtypes", [Object])], DefaultGlobal);
|
|
1733
1726
|
|
|
1734
1727
|
var circleThreshold = vutils.tau - 1e-8;
|
|
1735
1728
|
var BoundsContext = /*#__PURE__*/function () {
|
|
@@ -3452,7 +3445,7 @@
|
|
|
3452
3445
|
return "number" != typeof measurement.actualBoundingBoxAscent || "number" != typeof measurement.actualBoundingBoxDescent ? (result.width = Math.floor(measurement.width), result.height = character.fontSize || 0, result.ascent = result.height, result.descent = 0) : (result.width = Math.floor(measurement.width), result.height = Math.floor(measurement.actualBoundingBoxAscent + measurement.actualBoundingBoxDescent), result.ascent = Math.floor(measurement.actualBoundingBoxAscent), result.descent = result.height - result.ascent), result;
|
|
3453
3446
|
}
|
|
3454
3447
|
|
|
3455
|
-
var __decorate$
|
|
3448
|
+
var __decorate$F = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
3456
3449
|
var d,
|
|
3457
3450
|
c = arguments.length,
|
|
3458
3451
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -3658,9 +3651,9 @@
|
|
|
3658
3651
|
}]);
|
|
3659
3652
|
return ATextMeasure;
|
|
3660
3653
|
}();
|
|
3661
|
-
ATextMeasure = __decorate$
|
|
3654
|
+
ATextMeasure = __decorate$F([injectable()], ATextMeasure);
|
|
3662
3655
|
|
|
3663
|
-
var __decorate$
|
|
3656
|
+
var __decorate$E = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
3664
3657
|
var d,
|
|
3665
3658
|
c = arguments.length,
|
|
3666
3659
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -3677,7 +3670,7 @@
|
|
|
3677
3670
|
}
|
|
3678
3671
|
return _createClass(DefaultTextMeasureContribution);
|
|
3679
3672
|
}(ATextMeasure);
|
|
3680
|
-
DefaultTextMeasureContribution = __decorate$
|
|
3673
|
+
DefaultTextMeasureContribution = __decorate$E([injectable()], DefaultTextMeasureContribution);
|
|
3681
3674
|
|
|
3682
3675
|
var container = new Container();
|
|
3683
3676
|
|
|
@@ -4113,7 +4106,7 @@
|
|
|
4113
4106
|
}();
|
|
4114
4107
|
var canvasAllocate = new DefaultCanvasAllocate();
|
|
4115
4108
|
|
|
4116
|
-
var __decorate$
|
|
4109
|
+
var __decorate$D = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
4117
4110
|
var d,
|
|
4118
4111
|
c = arguments.length,
|
|
4119
4112
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -4205,7 +4198,7 @@
|
|
|
4205
4198
|
}]);
|
|
4206
4199
|
return DefaultGraphicUtil;
|
|
4207
4200
|
}();
|
|
4208
|
-
DefaultGraphicUtil = __decorate$
|
|
4201
|
+
DefaultGraphicUtil = __decorate$D([injectable(), __param$h(0, inject(ContributionProvider)), __param$h(0, named(TextMeasureContribution)), __metadata$q("design:paramtypes", [Object])], DefaultGraphicUtil);
|
|
4209
4202
|
var TransformMode;
|
|
4210
4203
|
!function (TransformMode) {
|
|
4211
4204
|
TransformMode[TransformMode.transform = 0] = "transform", TransformMode[TransformMode.matrix = 1] = "matrix";
|
|
@@ -4282,7 +4275,7 @@
|
|
|
4282
4275
|
}]);
|
|
4283
4276
|
return DefaultTransformUtil;
|
|
4284
4277
|
}();
|
|
4285
|
-
DefaultTransformUtil = __decorate$
|
|
4278
|
+
DefaultTransformUtil = __decorate$D([injectable(), __metadata$q("design:paramtypes", [])], DefaultTransformUtil);
|
|
4286
4279
|
|
|
4287
4280
|
var defaultThemeObj = {
|
|
4288
4281
|
arc: DefaultArcAttribute,
|
|
@@ -8088,7 +8081,7 @@
|
|
|
8088
8081
|
var DynamicLayerHandlerContribution = Symbol["for"]("DynamicLayerHandlerContribution");
|
|
8089
8082
|
var VirtualLayerHandlerContribution = Symbol["for"]("VirtualLayerHandlerContribution");
|
|
8090
8083
|
|
|
8091
|
-
var __decorate$
|
|
8084
|
+
var __decorate$C = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
8092
8085
|
var d,
|
|
8093
8086
|
c = arguments.length,
|
|
8094
8087
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -8175,9 +8168,9 @@
|
|
|
8175
8168
|
}]);
|
|
8176
8169
|
return DefaultLayerService;
|
|
8177
8170
|
}();
|
|
8178
|
-
DefaultLayerService = __decorate$
|
|
8171
|
+
DefaultLayerService = __decorate$C([injectable(), __metadata$p("design:paramtypes", [])], DefaultLayerService);
|
|
8179
8172
|
|
|
8180
|
-
var __decorate$
|
|
8173
|
+
var __decorate$B = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
8181
8174
|
var d,
|
|
8182
8175
|
c = arguments.length,
|
|
8183
8176
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -8337,7 +8330,7 @@
|
|
|
8337
8330
|
}]);
|
|
8338
8331
|
return DefaultWindow;
|
|
8339
8332
|
}();
|
|
8340
|
-
DefaultWindow = __decorate$
|
|
8333
|
+
DefaultWindow = __decorate$B([injectable(), __metadata$o("design:paramtypes", [])], DefaultWindow);
|
|
8341
8334
|
|
|
8342
8335
|
var coreModule = new ContainerModule(function (bind) {
|
|
8343
8336
|
bind(VGlobal).to(DefaultGlobal).inSingletonScope(), bind(VWindow).to(DefaultWindow), bind(GraphicUtil).to(DefaultGraphicUtil).inSingletonScope(), bind(TransformUtil).to(DefaultTransformUtil).inSingletonScope(), bind(LayerService).to(DefaultLayerService).inSingletonScope();
|
|
@@ -10108,32 +10101,37 @@
|
|
|
10108
10101
|
}(BaseSymbol);
|
|
10109
10102
|
var close$1 = new CloseSymbol();
|
|
10110
10103
|
|
|
10111
|
-
function
|
|
10104
|
+
function rectSizeArray(ctx, size, x, y) {
|
|
10112
10105
|
return ctx.rect(x - size[0] / 2, y - size[1] / 2, size[0], size[1]), !1;
|
|
10113
10106
|
}
|
|
10107
|
+
function rectSize(ctx, size, x, y) {
|
|
10108
|
+
var w = size,
|
|
10109
|
+
h = size / 2;
|
|
10110
|
+
return ctx.rect(x - w / 2, y - h / 2, w, h), !1;
|
|
10111
|
+
}
|
|
10114
10112
|
var RectSymbol = /*#__PURE__*/function (_BaseSymbol) {
|
|
10115
10113
|
_inherits(RectSymbol, _BaseSymbol);
|
|
10116
10114
|
var _super = _createSuper(RectSymbol);
|
|
10117
10115
|
function RectSymbol() {
|
|
10118
10116
|
var _this;
|
|
10119
10117
|
_classCallCheck(this, RectSymbol);
|
|
10120
|
-
_this = _super.apply(this, arguments), _this.type = "rect", _this.pathStr = "M-0.5,-0.
|
|
10118
|
+
_this = _super.apply(this, arguments), _this.type = "rect", _this.pathStr = "M -0.5,0.25 L 0.5,0.25 L 0.5,-0.25,L -0.5,-0.25 Z";
|
|
10121
10119
|
return _this;
|
|
10122
10120
|
}
|
|
10123
10121
|
_createClass(RectSymbol, [{
|
|
10124
10122
|
key: "draw",
|
|
10125
10123
|
value: function draw(ctx, size, x, y) {
|
|
10126
|
-
return
|
|
10124
|
+
return vutils.isNumber(size) ? rectSize(ctx, size, x, y) : rectSizeArray(ctx, size, x, y);
|
|
10127
10125
|
}
|
|
10128
10126
|
}, {
|
|
10129
10127
|
key: "drawOffset",
|
|
10130
10128
|
value: function drawOffset(ctx, size, x, y, offset) {
|
|
10131
|
-
return
|
|
10129
|
+
return vutils.isNumber(size) ? rectSize(ctx, size + 2 * offset, x, y) : rectSizeArray(ctx, [size[0] + 2 * offset, size[1] + 2 * offset], x, y);
|
|
10132
10130
|
}
|
|
10133
10131
|
}]);
|
|
10134
10132
|
return RectSymbol;
|
|
10135
10133
|
}(BaseSymbol);
|
|
10136
|
-
var rect
|
|
10134
|
+
var rect = new RectSymbol();
|
|
10137
10135
|
|
|
10138
10136
|
var tempBounds = new vutils.AABBBounds();
|
|
10139
10137
|
var CustomSymbolClass = /*#__PURE__*/function () {
|
|
@@ -10172,7 +10170,7 @@
|
|
|
10172
10170
|
return CustomSymbolClass;
|
|
10173
10171
|
}();
|
|
10174
10172
|
|
|
10175
|
-
var builtinSymbols = [circle$1, cross$1, diamond$1, square$1, thinTriangle$1, triangle, star$1, arrow$1, wedge$1, stroke$1, wye$1, triangleLeft, triangleRight, triangleUp, triangleDown, arrow2Left$1, arrow2Right$1, arrow2Up$1, arrow2Down$1, rect
|
|
10173
|
+
var builtinSymbols = [circle$1, cross$1, diamond$1, square$1, thinTriangle$1, triangle, star$1, arrow$1, wedge$1, stroke$1, wye$1, triangleLeft, triangleRight, triangleUp, triangleDown, arrow2Left$1, arrow2Right$1, arrow2Up$1, arrow2Down$1, rect, lineV$1, lineH$1, close$1];
|
|
10176
10174
|
var builtinSymbolsMap = {};
|
|
10177
10175
|
builtinSymbols.forEach(function (symbol) {
|
|
10178
10176
|
builtinSymbolsMap[symbol.type] = symbol;
|
|
@@ -10180,7 +10178,6 @@
|
|
|
10180
10178
|
var builtInSymbolStrMap = {
|
|
10181
10179
|
arrowLeft: "M 0.25 -0.5 L -0.25 0 l 0.5 0.5",
|
|
10182
10180
|
arrowRight: "M -0.25 -0.5 l 0.5 0.5 l -0.5 0.5",
|
|
10183
|
-
rect: "M -0.5,0.25 L 0.5,0.25 L 0.5,-0.25,L -0.5,-0.25 Z",
|
|
10184
10181
|
rectRound: "M 0.3 -0.5 C 0.41 -0.5 0.5 -0.41 0.5 -0.3 C 0.5 -0.3 0.5 0.3 0.5 0.3 C 0.5 0.41 0.41 0.5 0.3 0.5 C 0.3 0.5 -0.3 0.5 -0.3 0.5 C -0.41 0.5 -0.5 0.41 -0.5 0.3 C -0.5 0.3 -0.5 -0.3 -0.5 -0.3 C -0.5 -0.41 -0.41 -0.5 -0.3 -0.5 C -0.3 -0.5 0.3 -0.5 0.3 -0.5 Z",
|
|
10185
10182
|
roundLine: "M 1.2392 -0.258 L -1.3432 -0.258 C -1.4784 -0.258 -1.588 -0.1436 -1.588 -0.002 c 0 0.1416 0.1096 0.256 0.2448 0.256 l 2.5824 0 c 0.1352 0 0.2448 -0.1144 0.2448 -0.256 C 1.484 -0.1436 1.3744 -0.258 1.2392 -0.258 z"
|
|
10186
10183
|
};
|
|
@@ -11251,7 +11248,8 @@
|
|
|
11251
11248
|
var _this2 = this;
|
|
11252
11249
|
var _a;
|
|
11253
11250
|
var _this$attribute = this.attribute,
|
|
11254
|
-
|
|
11251
|
+
_this$attribute$textC = _this$attribute.textConfig,
|
|
11252
|
+
textConfig = _this$attribute$textC === void 0 ? [] : _this$attribute$textC,
|
|
11255
11253
|
maxWidth = _this$attribute.maxWidth,
|
|
11256
11254
|
maxHeight = _this$attribute.maxHeight,
|
|
11257
11255
|
width = _this$attribute.width,
|
|
@@ -11972,7 +11970,7 @@
|
|
|
11972
11970
|
var matrixAllocate = new DefaultMatrixAllocate();
|
|
11973
11971
|
var mat4Allocate = new DefaultMat4Allocate();
|
|
11974
11972
|
|
|
11975
|
-
var __decorate$
|
|
11973
|
+
var __decorate$A = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
11976
11974
|
var d,
|
|
11977
11975
|
c = arguments.length,
|
|
11978
11976
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -12609,7 +12607,7 @@
|
|
|
12609
12607
|
}]);
|
|
12610
12608
|
return DefaultGraphicService;
|
|
12611
12609
|
}();
|
|
12612
|
-
DefaultGraphicService = __decorate$
|
|
12610
|
+
DefaultGraphicService = __decorate$A([injectable(), __param$g(0, inject(GraphicCreator)), __metadata$n("design:paramtypes", [Object])], DefaultGraphicService);
|
|
12613
12611
|
|
|
12614
12612
|
var ShadowRoot = /*#__PURE__*/function (_Group) {
|
|
12615
12613
|
_inherits(ShadowRoot, _Group);
|
|
@@ -12731,13 +12729,6 @@
|
|
|
12731
12729
|
}
|
|
12732
12730
|
createRichText({});
|
|
12733
12731
|
|
|
12734
|
-
var __decorate$A = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
12735
|
-
var d,
|
|
12736
|
-
c = arguments.length,
|
|
12737
|
-
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
12738
|
-
if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
12739
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12740
|
-
};
|
|
12741
12732
|
var BaseRender = /*#__PURE__*/function () {
|
|
12742
12733
|
function BaseRender() {
|
|
12743
12734
|
_classCallCheck(this, BaseRender);
|
|
@@ -12904,7 +12895,6 @@
|
|
|
12904
12895
|
}]);
|
|
12905
12896
|
return BaseRender;
|
|
12906
12897
|
}();
|
|
12907
|
-
BaseRender = __decorate$A([injectable()], BaseRender);
|
|
12908
12898
|
|
|
12909
12899
|
function getScaledStroke(context, width, dpr) {
|
|
12910
12900
|
var strokeWidth = width;
|
|
@@ -14478,32 +14468,82 @@
|
|
|
14478
14468
|
return _this;
|
|
14479
14469
|
}
|
|
14480
14470
|
_createClass(DefaultCanvasAreaRender, [{
|
|
14471
|
+
key: "drawLinearAreaHighPerformance",
|
|
14472
|
+
value: function drawLinearAreaHighPerformance(area, context, fill, stroke, fillOpacity, strokeOpacity, offsetX, offsetY, areaAttribute, drawContext, params, fillCb, strokeCb) {
|
|
14473
|
+
var _a, _b, _c, _d, _e;
|
|
14474
|
+
context.beginPath();
|
|
14475
|
+
var z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
|
|
14476
|
+
points = area.attribute.points,
|
|
14477
|
+
startP = points[0];
|
|
14478
|
+
context.moveTo(startP.x, startP.y, z);
|
|
14479
|
+
for (var i = 1; i < points.length; i++) {
|
|
14480
|
+
var p = points[i];
|
|
14481
|
+
context.lineTo(p.x, p.y, z);
|
|
14482
|
+
}
|
|
14483
|
+
for (var _i = points.length - 1; _i >= 0; _i--) {
|
|
14484
|
+
var _p = points[_i];
|
|
14485
|
+
context.lineTo(null !== (_b = _p.x1) && void 0 !== _b ? _b : _p.x, null !== (_c = _p.y1) && void 0 !== _c ? _c : _p.y, z);
|
|
14486
|
+
}
|
|
14487
|
+
context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(area, area.attribute, areaAttribute);
|
|
14488
|
+
var _area$attribute = area.attribute,
|
|
14489
|
+
_area$attribute$x = _area$attribute.x,
|
|
14490
|
+
originX = _area$attribute$x === void 0 ? 0 : _area$attribute$x,
|
|
14491
|
+
_area$attribute$x2 = _area$attribute.x,
|
|
14492
|
+
originY = _area$attribute$x2 === void 0 ? 0 : _area$attribute$x2;
|
|
14493
|
+
if (!1 !== fill && (fillCb ? fillCb(context, area.attribute, areaAttribute) : fillOpacity && (context.setCommonStyle(area, area.attribute, originX - offsetX, originY - offsetY, areaAttribute), context.fill())), stroke) {
|
|
14494
|
+
var _area$attribute$strok = area.attribute.stroke,
|
|
14495
|
+
_stroke = _area$attribute$strok === void 0 ? areaAttribute && areaAttribute.stroke : _area$attribute$strok;
|
|
14496
|
+
if (vutils.isArray(_stroke) && (_stroke[0] || _stroke[2]) && !1 === _stroke[1]) if (context.beginPath(), _stroke[0]) {
|
|
14497
|
+
context.moveTo(startP.x, startP.y, z);
|
|
14498
|
+
for (var _i2 = 1; _i2 < points.length; _i2++) {
|
|
14499
|
+
var _p2 = points[_i2];
|
|
14500
|
+
context.lineTo(_p2.x, _p2.y, z);
|
|
14501
|
+
}
|
|
14502
|
+
} else if (_stroke[2]) {
|
|
14503
|
+
var endP = points[points.length - 1];
|
|
14504
|
+
context.moveTo(endP.x, endP.y, z);
|
|
14505
|
+
for (var _i3 = points.length - 2; _i3 >= 0; _i3--) {
|
|
14506
|
+
var _p3 = points[_i3];
|
|
14507
|
+
context.lineTo(null !== (_d = _p3.x1) && void 0 !== _d ? _d : _p3.x, null !== (_e = _p3.y1) && void 0 !== _e ? _e : _p3.y, z);
|
|
14508
|
+
}
|
|
14509
|
+
}
|
|
14510
|
+
context.setStrokeStyle(area, area.attribute, originX - offsetX, originY - offsetY, areaAttribute), context.stroke();
|
|
14511
|
+
}
|
|
14512
|
+
}
|
|
14513
|
+
}, {
|
|
14481
14514
|
key: "drawShape",
|
|
14482
14515
|
value: function drawShape(area, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
14483
14516
|
var _this2 = this;
|
|
14484
14517
|
var _a, _b, _c, _d, _e, _f;
|
|
14485
14518
|
var areaAttribute = getTheme(area, null == params ? void 0 : params.theme).area,
|
|
14486
|
-
_area$
|
|
14487
|
-
_area$
|
|
14488
|
-
|
|
14489
|
-
_area$
|
|
14490
|
-
|
|
14491
|
-
_area$
|
|
14492
|
-
|
|
14519
|
+
_area$attribute2 = area.attribute,
|
|
14520
|
+
_area$attribute2$fill = _area$attribute2.fill,
|
|
14521
|
+
fill = _area$attribute2$fill === void 0 ? areaAttribute.fill : _area$attribute2$fill,
|
|
14522
|
+
_area$attribute2$stro = _area$attribute2.stroke;
|
|
14523
|
+
_area$attribute2$stro === void 0 ? areaAttribute.stroke : _area$attribute2$stro;
|
|
14524
|
+
var _area$attribute2$fill2 = _area$attribute2.fillOpacity,
|
|
14525
|
+
fillOpacity = _area$attribute2$fill2 === void 0 ? areaAttribute.fillOpacity : _area$attribute2$fill2,
|
|
14526
|
+
_area$attribute2$z = _area$attribute2.z,
|
|
14527
|
+
z = _area$attribute2$z === void 0 ? areaAttribute.z : _area$attribute2$z,
|
|
14528
|
+
_area$attribute2$stro2 = _area$attribute2.strokeOpacity,
|
|
14529
|
+
strokeOpacity = _area$attribute2$stro2 === void 0 ? areaAttribute.strokeOpacity : _area$attribute2$stro2,
|
|
14493
14530
|
data = this.valid(area, areaAttribute, fillCb, strokeCb);
|
|
14494
14531
|
if (!data) return;
|
|
14495
14532
|
var doFill = data.doFill,
|
|
14496
14533
|
doStroke = data.doStroke,
|
|
14497
|
-
_area$
|
|
14498
|
-
|
|
14534
|
+
_area$attribute3 = area.attribute,
|
|
14535
|
+
_area$attribute3$clip = _area$attribute3.clipRange,
|
|
14536
|
+
clipRange = _area$attribute3$clip === void 0 ? areaAttribute.clipRange : _area$attribute3$clip,
|
|
14537
|
+
closePath = _area$attribute3.closePath,
|
|
14538
|
+
points = _area$attribute3.points,
|
|
14539
|
+
segments = _area$attribute3.segments;
|
|
14540
|
+
var _area$attribute$curve = area.attribute.curveType,
|
|
14541
|
+
curveType = _area$attribute$curve === void 0 ? areaAttribute.curveType : _area$attribute$curve;
|
|
14542
|
+
if (closePath && "linear" === curveType && (curveType = "linearClosed"), 1 === clipRange && !segments && !points.some(function (p) {
|
|
14543
|
+
return !1 === p.defined;
|
|
14544
|
+
}) && "linear" === curveType) return this.drawLinearAreaHighPerformance(area, context, !!fill, doStroke, fillOpacity, strokeOpacity, x, y, areaAttribute, drawContext, params, fillCb, strokeCb);
|
|
14499
14545
|
if (area.shouldUpdateShape()) {
|
|
14500
|
-
|
|
14501
|
-
points = _area$attribute2.points,
|
|
14502
|
-
segments = _area$attribute2.segments,
|
|
14503
|
-
closePath = _area$attribute2.closePath;
|
|
14504
|
-
var _area$attribute$curve = area.attribute.curveType,
|
|
14505
|
-
curveType = _area$attribute$curve === void 0 ? areaAttribute.curveType : _area$attribute$curve;
|
|
14506
|
-
if (closePath && "linear" === curveType && (curveType = "linearClosed"), segments && segments.length) {
|
|
14546
|
+
if (segments && segments.length) {
|
|
14507
14547
|
var startPoint, lastTopSeg;
|
|
14508
14548
|
var topCaches = segments.map(function (seg, index) {
|
|
14509
14549
|
if (seg.points.length <= 1 && 0 === index) return seg.points[0] && (lastTopSeg = {
|
|
@@ -14526,9 +14566,9 @@
|
|
|
14526
14566
|
for (var i = segments.length - 1; i >= 0; i--) {
|
|
14527
14567
|
var _points = segments[i].points,
|
|
14528
14568
|
bottomPoints = [];
|
|
14529
|
-
for (var
|
|
14530
|
-
x: null !== (_a = _points[
|
|
14531
|
-
y: null !== (_b = _points[
|
|
14569
|
+
for (var _i4 = _points.length - 1; _i4 >= 0; _i4--) bottomPoints.push({
|
|
14570
|
+
x: null !== (_a = _points[_i4].x1) && void 0 !== _a ? _a : _points[_i4].x,
|
|
14571
|
+
y: null !== (_b = _points[_i4].y1) && void 0 !== _b ? _b : _points[_i4].y
|
|
14532
14572
|
});
|
|
14533
14573
|
if (0 !== i) {
|
|
14534
14574
|
var lastSegmentPoints = segments[i - 1].points,
|
|
@@ -14551,9 +14591,9 @@
|
|
|
14551
14591
|
{
|
|
14552
14592
|
var topPoints = points,
|
|
14553
14593
|
_bottomPoints = [];
|
|
14554
|
-
for (var
|
|
14555
|
-
x: null !== (_e = points[
|
|
14556
|
-
y: null !== (_f = points[
|
|
14594
|
+
for (var _i5 = points.length - 1; _i5 >= 0; _i5--) _bottomPoints.push({
|
|
14595
|
+
x: null !== (_e = points[_i5].x1) && void 0 !== _e ? _e : points[_i5].x,
|
|
14596
|
+
y: null !== (_f = points[_i5].y1) && void 0 !== _f ? _f : points[_i5].y
|
|
14557
14597
|
});
|
|
14558
14598
|
var topCache = calcLineCache(topPoints, curveType),
|
|
14559
14599
|
bottomCache = calcLineCache(_bottomPoints, "stepBefore" === curveType ? "stepAfter" : "stepAfter" === curveType ? "stepBefore" : curveType);
|
|
@@ -14616,9 +14656,9 @@
|
|
|
14616
14656
|
}) : da.push(defaultAttribute), da.push(attribute)), connect && "none" === connectedType) return !1;
|
|
14617
14657
|
if (!cache) return;
|
|
14618
14658
|
context.beginPath();
|
|
14619
|
-
var _area$
|
|
14620
|
-
points = _area$
|
|
14621
|
-
segments = _area$
|
|
14659
|
+
var _area$attribute4 = area.attribute,
|
|
14660
|
+
points = _area$attribute4.points,
|
|
14661
|
+
segments = _area$attribute4.segments;
|
|
14622
14662
|
var endP,
|
|
14623
14663
|
startP,
|
|
14624
14664
|
direction = Direction$1.ROW;
|
|
@@ -14646,8 +14686,8 @@
|
|
|
14646
14686
|
attribute: attribute
|
|
14647
14687
|
}), !1 !== stroke) if (strokeCb) strokeCb(context, attribute, defaultAttribute);else {
|
|
14648
14688
|
var _attribute$stroke = attribute.stroke,
|
|
14649
|
-
|
|
14650
|
-
vutils.isArray(
|
|
14689
|
+
_stroke2 = _attribute$stroke === void 0 ? defaultAttribute && defaultAttribute[1] && defaultAttribute[1].stroke : _attribute$stroke;
|
|
14690
|
+
vutils.isArray(_stroke2) && (_stroke2[0] || _stroke2[2]) && !1 === _stroke2[1] && (context.beginPath(), drawSegments(context.camera ? context : context.nativeContext, _stroke2[0] ? cache.top : cache.bottom, clipRange, direction === Direction$1.ROW ? "x" : "y", {
|
|
14651
14691
|
offsetX: offsetX,
|
|
14652
14692
|
offsetY: offsetY,
|
|
14653
14693
|
offsetZ: offsetZ,
|
|
@@ -17649,7 +17689,7 @@
|
|
|
17649
17689
|
DefaultCanvasPyramid3dRender = __decorate$7([injectable()], DefaultCanvasPyramid3dRender);
|
|
17650
17690
|
|
|
17651
17691
|
var renderModule = new ContainerModule(function (bind) {
|
|
17652
|
-
bind(DefaultBaseBackgroundRenderContribution).toSelf().inSingletonScope(), bind(DefaultBaseTextureRenderContribution).toSelf().inSingletonScope(), bind(DrawContribution).to(DefaultDrawContribution), bind(IncrementalDrawContribution).to(DefaultIncrementalDrawContribution), bind(CircleRender).to(DefaultCanvasCircleRender).inSingletonScope(), bind(GraphicRender).toService(CircleRender), bindContributionProvider(bind, CircleRenderContribution), bind(RectRender).to(DefaultCanvasRectRender).inSingletonScope(), bind(GraphicRender).toService(RectRender), bind(Rect3DRender).to(DefaultCanvasRect3dRender).inSingletonScope(), bind(GraphicRender).toService(Rect3DRender), bindContributionProvider(bind, RectRenderContribution), bind(TextRender).to(DefaultCanvasTextRender).inSingletonScope(), bind(GraphicRender).toService(TextRender), bindContributionProvider(bind, TextRenderContribution), bind(PathRender).to(DefaultCanvasPathRender).inSingletonScope(), bind(GraphicRender).toService(PathRender), bindContributionProvider(bind, PathRenderContribution), bind(SymbolRender).to(DefaultCanvasSymbolRender).inSingletonScope(), bind(GraphicRender).toService(SymbolRender), bindContributionProvider(bind, SymbolRenderContribution), bind(ArcRender).to(DefaultCanvasArcRender).inSingletonScope(), bind(GraphicRender).toService(ArcRender), bind(Arc3dRender).to(DefaultCanvasArc3DRender).inSingletonScope(), bind(GraphicRender).toService(Arc3dRender), bindContributionProvider(bind, ArcRenderContribution), bind(LineRender).to(DefaultCanvasLineRender).inSingletonScope(), bind(GraphicRender).toService(LineRender), bind(DefaultIncrementalCanvasLineRender).toSelf().inSingletonScope(), bind(DefaultIncrementalCanvasAreaRender).toSelf().inSingletonScope(), bind(AreaRender).to(DefaultCanvasAreaRender).inSingletonScope(), bind(GraphicRender).toService(AreaRender), bindContributionProvider(bind, AreaRenderContribution), bind(GroupRender).to(DefaultCanvasGroupRender).inSingletonScope(), bind(GraphicRender).toService(GroupRender), bindContributionProvider(bind, GroupRenderContribution), bind(PolygonRender).to(DefaultCanvasPolygonRender).inSingletonScope(), bind(GraphicRender).toService(PolygonRender), bindContributionProvider(bind, PolygonRenderContribution), bind(GlyphRender).to(DefaultCanvasGlyphRender).inSingletonScope(), bind(GraphicRender).toService(GlyphRender), bind(ImageRender).to(DefaultCanvasImageRender).inSingletonScope(), bind(GraphicRender).toService(ImageRender), bindContributionProvider(bind, ImageRenderContribution), bind(RichTextRender).to(DefaultCanvasRichTextRender).inSingletonScope(), bind(GraphicRender).toService(RichTextRender), bind(Pyramid3dRender).to(DefaultCanvasPyramid3dRender).inSingletonScope(), bind(GraphicRender).toService(Pyramid3dRender), bind(DefaultBaseInteractiveRenderContribution).toSelf().inSingletonScope(), bind(TextRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bind(ArcRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bind(PathRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bind(SymbolRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bind(RectRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bind(ImageRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bind(CircleRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bind(AreaRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bind(PolygonRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bindContributionProvider(bind, InteractiveSubRenderContribution), bindContributionProvider(bind, GraphicRender), bind(ShadowRootDrawItemInterceptorContribution).toSelf().inSingletonScope(), bind(DrawItemInterceptor).toService(ShadowRootDrawItemInterceptorContribution), bind(CommonDrawItemInterceptorContribution).toSelf().inSingletonScope(), bind(DrawItemInterceptor).toService(CommonDrawItemInterceptorContribution), bind(Canvas3DDrawItemInterceptor).toSelf().inSingletonScope(), bind(DrawItemInterceptor).toService(Canvas3DDrawItemInterceptor), bind(InteractiveDrawItemInterceptorContribution).toSelf().inSingletonScope(), bind(DrawItemInterceptor).toService(InteractiveDrawItemInterceptorContribution), bindContributionProvider(bind, DrawItemInterceptor);
|
|
17692
|
+
bind(DefaultBaseBackgroundRenderContribution).toSelf().inSingletonScope(), bind(DefaultBaseTextureRenderContribution).toSelf().inSingletonScope(), bind(DrawContribution).to(DefaultDrawContribution), bind(IncrementalDrawContribution).to(DefaultIncrementalDrawContribution), bind(DefaultCanvasCircleRender).toSelf().inSingletonScope(), bind(CircleRender).to(DefaultCanvasCircleRender).inSingletonScope(), bind(GraphicRender).toService(CircleRender), bindContributionProvider(bind, CircleRenderContribution), bind(DefaultCanvasRectRender).toSelf().inSingletonScope(), bind(RectRender).to(DefaultCanvasRectRender).inSingletonScope(), bind(GraphicRender).toService(RectRender), bind(Rect3DRender).to(DefaultCanvasRect3dRender).inSingletonScope(), bind(GraphicRender).toService(Rect3DRender), bindContributionProvider(bind, RectRenderContribution), bind(TextRender).to(DefaultCanvasTextRender).inSingletonScope(), bind(GraphicRender).toService(TextRender), bindContributionProvider(bind, TextRenderContribution), bind(DefaultCanvasPathRender).toSelf().inSingletonScope(), bind(PathRender).to(DefaultCanvasPathRender).inSingletonScope(), bind(GraphicRender).toService(PathRender), bindContributionProvider(bind, PathRenderContribution), bind(DefaultCanvasSymbolRender).toSelf().inSingletonScope(), bind(SymbolRender).to(DefaultCanvasSymbolRender).inSingletonScope(), bind(GraphicRender).toService(SymbolRender), bindContributionProvider(bind, SymbolRenderContribution), bind(DefaultCanvasArcRender).toSelf().inSingletonScope(), bind(ArcRender).to(DefaultCanvasArcRender).inSingletonScope(), bind(GraphicRender).toService(ArcRender), bind(Arc3dRender).to(DefaultCanvasArc3DRender).inSingletonScope(), bind(GraphicRender).toService(Arc3dRender), bindContributionProvider(bind, ArcRenderContribution), bind(DefaultCanvasLineRender).toSelf().inSingletonScope(), bind(LineRender).to(DefaultCanvasLineRender).inSingletonScope(), bind(GraphicRender).toService(LineRender), bind(DefaultIncrementalCanvasLineRender).toSelf().inSingletonScope(), bind(DefaultIncrementalCanvasAreaRender).toSelf().inSingletonScope(), bind(DefaultCanvasAreaRender).toSelf().inSingletonScope(), bind(AreaRender).to(DefaultCanvasAreaRender).inSingletonScope(), bind(GraphicRender).toService(AreaRender), bindContributionProvider(bind, AreaRenderContribution), bind(GroupRender).to(DefaultCanvasGroupRender).inSingletonScope(), bind(GraphicRender).toService(GroupRender), bindContributionProvider(bind, GroupRenderContribution), bind(PolygonRender).to(DefaultCanvasPolygonRender).inSingletonScope(), bind(GraphicRender).toService(PolygonRender), bindContributionProvider(bind, PolygonRenderContribution), bind(GlyphRender).to(DefaultCanvasGlyphRender).inSingletonScope(), bind(GraphicRender).toService(GlyphRender), bind(ImageRender).to(DefaultCanvasImageRender).inSingletonScope(), bind(GraphicRender).toService(ImageRender), bindContributionProvider(bind, ImageRenderContribution), bind(RichTextRender).to(DefaultCanvasRichTextRender).inSingletonScope(), bind(GraphicRender).toService(RichTextRender), bind(Pyramid3dRender).to(DefaultCanvasPyramid3dRender).inSingletonScope(), bind(GraphicRender).toService(Pyramid3dRender), bind(DefaultBaseInteractiveRenderContribution).toSelf().inSingletonScope(), bind(TextRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bind(ArcRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bind(PathRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bind(SymbolRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bind(RectRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bind(ImageRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bind(CircleRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bind(AreaRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bind(PolygonRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bindContributionProvider(bind, InteractiveSubRenderContribution), bindContributionProvider(bind, GraphicRender), bind(ShadowRootDrawItemInterceptorContribution).toSelf().inSingletonScope(), bind(DrawItemInterceptor).toService(ShadowRootDrawItemInterceptorContribution), bind(CommonDrawItemInterceptorContribution).toSelf().inSingletonScope(), bind(DrawItemInterceptor).toService(CommonDrawItemInterceptorContribution), bind(Canvas3DDrawItemInterceptor).toSelf().inSingletonScope(), bind(DrawItemInterceptor).toService(Canvas3DDrawItemInterceptor), bind(InteractiveDrawItemInterceptorContribution).toSelf().inSingletonScope(), bind(DrawItemInterceptor).toService(InteractiveDrawItemInterceptorContribution), bindContributionProvider(bind, DrawItemInterceptor);
|
|
17653
17693
|
});
|
|
17654
17694
|
|
|
17655
17695
|
function load(container) {
|
|
@@ -20656,6 +20696,45 @@
|
|
|
20656
20696
|
var _a, _b;
|
|
20657
20697
|
return (_b = (_a = animationEffects[type]) === null || _a === void 0 ? void 0 : _a.call(animationEffects, textAttribute)) !== null && _b !== void 0 ? _b : { from: {}, to: {} };
|
|
20658
20698
|
}
|
|
20699
|
+
function updateAnimation(prev, next, animationConfig) {
|
|
20700
|
+
if (!vutils.isArray(animationConfig)) {
|
|
20701
|
+
const { duration, easing, increaseEffect = true } = animationConfig;
|
|
20702
|
+
prev.animate().to(next.attribute, duration, easing);
|
|
20703
|
+
increaseEffect && playIncreaseCount(prev, next, duration, easing);
|
|
20704
|
+
return;
|
|
20705
|
+
}
|
|
20706
|
+
animationConfig.forEach((cfg, i) => {
|
|
20707
|
+
const { duration, easing, increaseEffect = true, channel } = cfg;
|
|
20708
|
+
const { from, to } = update(prev, next, channel, cfg.options);
|
|
20709
|
+
if (!vutils.isEmpty(to)) {
|
|
20710
|
+
prev.animate().to(to, duration, easing);
|
|
20711
|
+
}
|
|
20712
|
+
if ('text' in from && 'text' in to && increaseEffect) {
|
|
20713
|
+
playIncreaseCount(prev, next, duration, easing);
|
|
20714
|
+
}
|
|
20715
|
+
});
|
|
20716
|
+
}
|
|
20717
|
+
const update = (prev, next, channel, options) => {
|
|
20718
|
+
const from = Object.assign({}, prev.attribute);
|
|
20719
|
+
const to = Object.assign({}, next.attribute);
|
|
20720
|
+
vutils.array(options === null || options === void 0 ? void 0 : options.excludeChannels).forEach(key => {
|
|
20721
|
+
delete to[key];
|
|
20722
|
+
});
|
|
20723
|
+
Object.keys(to).forEach(key => {
|
|
20724
|
+
if (channel && !channel.includes(key)) {
|
|
20725
|
+
delete to[key];
|
|
20726
|
+
}
|
|
20727
|
+
});
|
|
20728
|
+
return { from, to };
|
|
20729
|
+
};
|
|
20730
|
+
function playIncreaseCount(prev, next, duration, easing) {
|
|
20731
|
+
if (prev.attribute.text !== next.attribute.text &&
|
|
20732
|
+
vutils.isValidNumber(Number(prev.attribute.text) * Number(next.attribute.text))) {
|
|
20733
|
+
prev
|
|
20734
|
+
.animate()
|
|
20735
|
+
.play(new IncreaseCount({ text: prev.attribute.text }, { text: next.attribute.text }, duration, easing));
|
|
20736
|
+
}
|
|
20737
|
+
}
|
|
20659
20738
|
const DefaultLabelAnimation = {
|
|
20660
20739
|
mode: 'same-time',
|
|
20661
20740
|
duration: 300,
|
|
@@ -20849,6 +20928,24 @@
|
|
|
20849
20928
|
}
|
|
20850
20929
|
return points;
|
|
20851
20930
|
};
|
|
20931
|
+
function labelingLineOrArea(textBounds, graphicBounds, position = 'end', offset = 0) {
|
|
20932
|
+
if (!textBounds || !graphicBounds) {
|
|
20933
|
+
return;
|
|
20934
|
+
}
|
|
20935
|
+
const { x1, x2 } = textBounds;
|
|
20936
|
+
const width = Math.abs(x2 - x1);
|
|
20937
|
+
const anchorX = graphicBounds.x1;
|
|
20938
|
+
const anchorY = graphicBounds.y1;
|
|
20939
|
+
let x = anchorX;
|
|
20940
|
+
const y = anchorY;
|
|
20941
|
+
if (position === 'end') {
|
|
20942
|
+
x = anchorX + width / 2 + offset;
|
|
20943
|
+
}
|
|
20944
|
+
else if (position === 'start') {
|
|
20945
|
+
x = anchorX - width / 2 - offset;
|
|
20946
|
+
}
|
|
20947
|
+
return { x, y };
|
|
20948
|
+
}
|
|
20852
20949
|
|
|
20853
20950
|
class LabelBase extends AbstractComponent {
|
|
20854
20951
|
setBitmap(bitmap) {
|
|
@@ -21002,7 +21099,7 @@
|
|
|
21002
21099
|
return text;
|
|
21003
21100
|
}
|
|
21004
21101
|
_prepare() {
|
|
21005
|
-
var _a, _b, _c, _d;
|
|
21102
|
+
var _a, _b, _c, _d, _e;
|
|
21006
21103
|
const currentBaseMarks = [];
|
|
21007
21104
|
let baseMarks;
|
|
21008
21105
|
if (vutils.isFunction(this.attribute.getBaseMarks)) {
|
|
@@ -21019,7 +21116,7 @@
|
|
|
21019
21116
|
(_a = this._idToGraphic) === null || _a === void 0 ? void 0 : _a.clear();
|
|
21020
21117
|
(_b = this._idToPoint) === null || _b === void 0 ? void 0 : _b.clear();
|
|
21021
21118
|
this._baseMarks = currentBaseMarks;
|
|
21022
|
-
this._isCollectionBase =
|
|
21119
|
+
this._isCollectionBase = this.attribute.type === 'line-data';
|
|
21023
21120
|
if (!currentBaseMarks || currentBaseMarks.length === 0) {
|
|
21024
21121
|
return;
|
|
21025
21122
|
}
|
|
@@ -21065,6 +21162,15 @@
|
|
|
21065
21162
|
}
|
|
21066
21163
|
}
|
|
21067
21164
|
}
|
|
21165
|
+
if (this.attribute.animation !== false) {
|
|
21166
|
+
this._animationConfig = {
|
|
21167
|
+
enter: vutils.merge({}, DefaultLabelAnimation, this.attribute.animation, (_c = this.attribute.animationEnter) !== null && _c !== void 0 ? _c : {}),
|
|
21168
|
+
exit: vutils.merge({}, DefaultLabelAnimation, this.attribute.animation, (_d = this.attribute.animationExit) !== null && _d !== void 0 ? _d : {}),
|
|
21169
|
+
update: vutils.isArray(this.attribute.animationUpdate)
|
|
21170
|
+
? this.attribute.animationUpdate
|
|
21171
|
+
: vutils.merge({}, DefaultLabelAnimation, this.attribute.animation, (_e = this.attribute.animationUpdate) !== null && _e !== void 0 ? _e : {})
|
|
21172
|
+
};
|
|
21173
|
+
}
|
|
21068
21174
|
}
|
|
21069
21175
|
getRelatedGrphic(item) {
|
|
21070
21176
|
return this._idToGraphic.get(item.id);
|
|
@@ -21212,12 +21318,6 @@
|
|
|
21212
21318
|
}
|
|
21213
21319
|
}
|
|
21214
21320
|
_renderWithAnimation(labels) {
|
|
21215
|
-
var _a, _b, _c, _d, _e;
|
|
21216
|
-
const animationConfig = ((_a = this.attribute.animation) !== null && _a !== void 0 ? _a : {});
|
|
21217
|
-
const mode = (_b = animationConfig.mode) !== null && _b !== void 0 ? _b : DefaultLabelAnimation.mode;
|
|
21218
|
-
const duration = (_c = animationConfig.duration) !== null && _c !== void 0 ? _c : DefaultLabelAnimation.duration;
|
|
21219
|
-
const easing = (_d = animationConfig.easing) !== null && _d !== void 0 ? _d : DefaultLabelAnimation.easing;
|
|
21220
|
-
const delay = (_e = animationConfig.delay) !== null && _e !== void 0 ? _e : 0;
|
|
21221
21321
|
const currentTextMap = new Map();
|
|
21222
21322
|
const prevTextMap = this._graphicToText || new Map();
|
|
21223
21323
|
const texts = [];
|
|
@@ -21241,13 +21341,7 @@
|
|
|
21241
21341
|
this._syncStateWithRelatedGraphic(relatedGraphic);
|
|
21242
21342
|
relatedGraphic.once('animate-bind', a => {
|
|
21243
21343
|
text.setAttributes(from);
|
|
21244
|
-
const listener = this._afterRelatedGraphicAttributeUpdate(text, texts, index, relatedGraphic,
|
|
21245
|
-
mode,
|
|
21246
|
-
duration,
|
|
21247
|
-
easing,
|
|
21248
|
-
to,
|
|
21249
|
-
delay
|
|
21250
|
-
});
|
|
21344
|
+
const listener = this._afterRelatedGraphicAttributeUpdate(text, texts, index, relatedGraphic, to, this._animationConfig.enter);
|
|
21251
21345
|
relatedGraphic.on('afterAttributeUpdate', listener);
|
|
21252
21346
|
});
|
|
21253
21347
|
}
|
|
@@ -21257,25 +21351,19 @@
|
|
|
21257
21351
|
prevTextMap.delete(textKey);
|
|
21258
21352
|
currentTextMap.set(textKey, prevLabel);
|
|
21259
21353
|
const prevText = prevLabel.text;
|
|
21260
|
-
|
|
21354
|
+
const { duration, easing } = this._animationConfig.update;
|
|
21355
|
+
updateAnimation(prevText, text, this._animationConfig.update);
|
|
21261
21356
|
if (prevLabel.labelLine) {
|
|
21262
21357
|
prevLabel.labelLine.animate().to(vutils.merge({}, prevLabel.labelLine.attribute, {
|
|
21263
21358
|
visible: (_f = (_d = (((_b = (_a = text.attribute) === null || _a === void 0 ? void 0 : _a.line) === null || _b === void 0 ? void 0 : _b.visible) && ((_c = text.attribute) === null || _c === void 0 ? void 0 : _c.visible))) !== null && _d !== void 0 ? _d : (_e = text.attribute) === null || _e === void 0 ? void 0 : _e.visible) !== null && _f !== void 0 ? _f : true,
|
|
21264
21359
|
points: (_g = text.attribute) === null || _g === void 0 ? void 0 : _g.points
|
|
21265
21360
|
}), duration, easing);
|
|
21266
21361
|
}
|
|
21267
|
-
if (animationConfig.increaseEffect !== false &&
|
|
21268
|
-
prevText.attribute.text !== text.attribute.text &&
|
|
21269
|
-
vutils.isValidNumber(Number(prevText.attribute.text) * Number(text.attribute.text))) {
|
|
21270
|
-
prevText
|
|
21271
|
-
.animate()
|
|
21272
|
-
.play(new IncreaseCount({ text: prevText.attribute.text }, { text: text.attribute.text }, duration, easing));
|
|
21273
|
-
}
|
|
21274
21362
|
}
|
|
21275
21363
|
});
|
|
21276
21364
|
prevTextMap.forEach(label => {
|
|
21277
21365
|
var _a;
|
|
21278
|
-
(_a = label.text) === null || _a === void 0 ? void 0 : _a.animate().to(getAnimationAttributes(label.text.attribute, 'fadeOut').to, duration, easing).onEnd(() => {
|
|
21366
|
+
(_a = label.text) === null || _a === void 0 ? void 0 : _a.animate().to(getAnimationAttributes(label.text.attribute, 'fadeOut').to, this._animationConfig.exit.duration, this._animationConfig.exit.easing).onEnd(() => {
|
|
21279
21367
|
this.removeChild(label.text);
|
|
21280
21368
|
if (label === null || label === void 0 ? void 0 : label.labelLine) {
|
|
21281
21369
|
this.removeChild(label.labelLine);
|
|
@@ -21324,7 +21412,7 @@
|
|
|
21324
21412
|
relatedGraphic.on('afterAttributeUpdate', this._handleRelatedGraphicSetState);
|
|
21325
21413
|
}
|
|
21326
21414
|
}
|
|
21327
|
-
_afterRelatedGraphicAttributeUpdate(text, texts, index, relatedGraphic, { mode, duration, easing,
|
|
21415
|
+
_afterRelatedGraphicAttributeUpdate(text, texts, index, relatedGraphic, to, { mode, duration, easing, delay }) {
|
|
21328
21416
|
const listener = (event) => {
|
|
21329
21417
|
var _a, _b;
|
|
21330
21418
|
const { detail } = event;
|
|
@@ -21342,7 +21430,7 @@
|
|
|
21342
21430
|
text.setAttributes(to);
|
|
21343
21431
|
return;
|
|
21344
21432
|
}
|
|
21345
|
-
const
|
|
21433
|
+
const onStart = () => {
|
|
21346
21434
|
if (relatedGraphic) {
|
|
21347
21435
|
relatedGraphic.onAnimateBind = undefined;
|
|
21348
21436
|
relatedGraphic.removeEventListener('afterAttributeUpdate', listener);
|
|
@@ -21351,14 +21439,14 @@
|
|
|
21351
21439
|
switch (mode) {
|
|
21352
21440
|
case 'after':
|
|
21353
21441
|
if (detail.animationState.end) {
|
|
21354
|
-
text.animate({
|
|
21442
|
+
text.animate({ onStart }).wait(delay).to(to, duration, easing);
|
|
21355
21443
|
}
|
|
21356
21444
|
break;
|
|
21357
21445
|
case 'after-all':
|
|
21358
21446
|
if (index === texts.length - 1) {
|
|
21359
21447
|
if (detail.animationState.end) {
|
|
21360
21448
|
texts.forEach(t => {
|
|
21361
|
-
t.animate({
|
|
21449
|
+
t.animate({ onStart }).wait(delay).to(to, duration, easing);
|
|
21362
21450
|
});
|
|
21363
21451
|
}
|
|
21364
21452
|
}
|
|
@@ -21369,12 +21457,12 @@
|
|
|
21369
21457
|
const point = this._idToPoint.get(text.attribute.id);
|
|
21370
21458
|
if (point &&
|
|
21371
21459
|
(!text.animates || !text.animates.has('label-animate')) &&
|
|
21372
|
-
|
|
21373
|
-
text.animate({
|
|
21460
|
+
relatedGraphic.containsPoint(point.x, point.y, IContainPointMode.LOCAL, (_b = this.stage) === null || _b === void 0 ? void 0 : _b.pickerService)) {
|
|
21461
|
+
text.animate({ onStart }).wait(delay).to(to, duration, easing);
|
|
21374
21462
|
}
|
|
21375
21463
|
}
|
|
21376
21464
|
else if (detail.animationState.isFirstFrameOfStep) {
|
|
21377
|
-
text.animate({
|
|
21465
|
+
text.animate({ onStart }).wait(delay).to(to, duration, easing);
|
|
21378
21466
|
}
|
|
21379
21467
|
break;
|
|
21380
21468
|
}
|
|
@@ -21608,22 +21696,7 @@
|
|
|
21608
21696
|
};
|
|
21609
21697
|
}
|
|
21610
21698
|
labeling(textBounds, graphicBounds, position = 'end', offset = 0) {
|
|
21611
|
-
|
|
21612
|
-
return;
|
|
21613
|
-
}
|
|
21614
|
-
const { x1, x2 } = textBounds;
|
|
21615
|
-
const width = Math.abs(x2 - x1);
|
|
21616
|
-
const anchorX = graphicBounds.x1;
|
|
21617
|
-
const anchorY = graphicBounds.y1;
|
|
21618
|
-
let x = anchorX;
|
|
21619
|
-
const y = anchorY;
|
|
21620
|
-
if (position === 'end') {
|
|
21621
|
-
x = anchorX + width / 2 + offset;
|
|
21622
|
-
}
|
|
21623
|
-
else if (position === 'start') {
|
|
21624
|
-
x = anchorX - width / 2 - offset;
|
|
21625
|
-
}
|
|
21626
|
-
return { x, y };
|
|
21699
|
+
return labelingLineOrArea(textBounds, graphicBounds, position, offset);
|
|
21627
21700
|
}
|
|
21628
21701
|
}
|
|
21629
21702
|
LineLabel.defaultAttributes = {
|
|
@@ -22385,10 +22458,49 @@
|
|
|
22385
22458
|
pickable: false
|
|
22386
22459
|
};
|
|
22387
22460
|
|
|
22461
|
+
class AreaLabel extends LabelBase {
|
|
22462
|
+
constructor(attributes) {
|
|
22463
|
+
super(vutils.merge({}, AreaLabel.defaultAttributes, attributes));
|
|
22464
|
+
this.name = 'line-label';
|
|
22465
|
+
}
|
|
22466
|
+
getGraphicBounds(graphic, point = {}) {
|
|
22467
|
+
var _a;
|
|
22468
|
+
if (graphic.type !== 'area') {
|
|
22469
|
+
return super.getGraphicBounds(graphic, point);
|
|
22470
|
+
}
|
|
22471
|
+
const { position = 'end' } = this.attribute;
|
|
22472
|
+
const points = ((_a = graphic === null || graphic === void 0 ? void 0 : graphic.attribute) === null || _a === void 0 ? void 0 : _a.points) || [point];
|
|
22473
|
+
const index = position === 'start' ? 0 : points.length - 1;
|
|
22474
|
+
return {
|
|
22475
|
+
x1: points[index].x,
|
|
22476
|
+
x2: points[index].x,
|
|
22477
|
+
y1: points[index].y,
|
|
22478
|
+
y2: points[index].y
|
|
22479
|
+
};
|
|
22480
|
+
}
|
|
22481
|
+
labeling(textBounds, graphicBounds, position = 'end', offset = 0) {
|
|
22482
|
+
return labelingLineOrArea(textBounds, graphicBounds, position, offset);
|
|
22483
|
+
}
|
|
22484
|
+
}
|
|
22485
|
+
AreaLabel.defaultAttributes = {
|
|
22486
|
+
textStyle: {
|
|
22487
|
+
fontSize: 12,
|
|
22488
|
+
fill: '#000',
|
|
22489
|
+
textAlign: 'center',
|
|
22490
|
+
textBaseline: 'middle',
|
|
22491
|
+
boundsPadding: [-1, 0, -1, 0]
|
|
22492
|
+
},
|
|
22493
|
+
position: 'end',
|
|
22494
|
+
offset: 6,
|
|
22495
|
+
pickable: false
|
|
22496
|
+
};
|
|
22497
|
+
|
|
22388
22498
|
const labelComponentMap = {
|
|
22389
22499
|
rect: RectLabel,
|
|
22390
22500
|
symbol: SymbolLabel,
|
|
22391
22501
|
arc: ArcLabel,
|
|
22502
|
+
line: LineLabel,
|
|
22503
|
+
area: AreaLabel,
|
|
22392
22504
|
'line-data': LineDataLabel
|
|
22393
22505
|
};
|
|
22394
22506
|
class DataLabel extends AbstractComponent {
|
|
@@ -22397,6 +22509,7 @@
|
|
|
22397
22509
|
this.name = 'data-label';
|
|
22398
22510
|
}
|
|
22399
22511
|
render() {
|
|
22512
|
+
var _a;
|
|
22400
22513
|
const { dataLabels, size } = this.attribute;
|
|
22401
22514
|
if (!dataLabels || dataLabels.length === 0) {
|
|
22402
22515
|
return;
|
|
@@ -22416,20 +22529,21 @@
|
|
|
22416
22529
|
const dataLabel = dataLabels[i];
|
|
22417
22530
|
const labelComponent = labelComponentMap[dataLabel.type] || LabelBase;
|
|
22418
22531
|
if (labelComponent) {
|
|
22419
|
-
const { baseMarkGroupName } = dataLabel;
|
|
22420
|
-
|
|
22532
|
+
const { baseMarkGroupName, type } = dataLabel;
|
|
22533
|
+
const id = (_a = dataLabel.id) !== null && _a !== void 0 ? _a : `${baseMarkGroupName}-${type}-${i}`;
|
|
22534
|
+
let component = this._componentMap.get(id);
|
|
22421
22535
|
if (component) {
|
|
22422
22536
|
component.setBitmapTool(tool);
|
|
22423
22537
|
component.setBitmap(bitmap);
|
|
22424
22538
|
component.setAttributes(dataLabel);
|
|
22425
|
-
currentComponentMap.set(
|
|
22539
|
+
currentComponentMap.set(id, component);
|
|
22426
22540
|
}
|
|
22427
22541
|
else {
|
|
22428
22542
|
component = new labelComponent(dataLabel);
|
|
22429
22543
|
component.setBitmap(bitmap);
|
|
22430
22544
|
component.setBitmapTool(tool);
|
|
22431
22545
|
this.add(component);
|
|
22432
|
-
currentComponentMap.set(
|
|
22546
|
+
currentComponentMap.set(id, component);
|
|
22433
22547
|
}
|
|
22434
22548
|
}
|
|
22435
22549
|
}
|
|
@@ -24675,13 +24789,6 @@
|
|
|
24675
24789
|
}
|
|
24676
24790
|
vutils.mixin(CircleAxisGrid, CircleAxisMixin);
|
|
24677
24791
|
|
|
24678
|
-
var DataZoomActiveTag;
|
|
24679
|
-
(function (DataZoomActiveTag) {
|
|
24680
|
-
DataZoomActiveTag["startHandler"] = "startHandler";
|
|
24681
|
-
DataZoomActiveTag["endHandler"] = "endHandler";
|
|
24682
|
-
DataZoomActiveTag["middleHandler"] = "middleHandler";
|
|
24683
|
-
DataZoomActiveTag["background"] = "background";
|
|
24684
|
-
})(DataZoomActiveTag || (DataZoomActiveTag = {}));
|
|
24685
24792
|
const DEFAULT_DATA_ZOOM_ATTRIBUTES = {
|
|
24686
24793
|
orient: 'bottom',
|
|
24687
24794
|
showDetail: 'auto',
|
|
@@ -24780,6 +24887,14 @@
|
|
|
24780
24887
|
}
|
|
24781
24888
|
};
|
|
24782
24889
|
|
|
24890
|
+
exports.DataZoomActiveTag = void 0;
|
|
24891
|
+
(function (DataZoomActiveTag) {
|
|
24892
|
+
DataZoomActiveTag["startHandler"] = "startHandler";
|
|
24893
|
+
DataZoomActiveTag["endHandler"] = "endHandler";
|
|
24894
|
+
DataZoomActiveTag["middleHandler"] = "middleHandler";
|
|
24895
|
+
DataZoomActiveTag["background"] = "background";
|
|
24896
|
+
})(exports.DataZoomActiveTag || (exports.DataZoomActiveTag = {}));
|
|
24897
|
+
|
|
24783
24898
|
const delayMap$1 = {
|
|
24784
24899
|
debounce: vutils.debounce,
|
|
24785
24900
|
throttle: vutils.throttle
|
|
@@ -24807,23 +24922,23 @@
|
|
|
24807
24922
|
this._onHandlerPointerDown = (e, tag) => {
|
|
24808
24923
|
e.stopPropagation();
|
|
24809
24924
|
if (tag === 'start') {
|
|
24810
|
-
this._activeTag = DataZoomActiveTag.startHandler;
|
|
24925
|
+
this._activeTag = exports.DataZoomActiveTag.startHandler;
|
|
24811
24926
|
this._activeItem = this._startHandler;
|
|
24812
24927
|
}
|
|
24813
24928
|
else if (tag === 'end') {
|
|
24814
|
-
this._activeTag = DataZoomActiveTag.endHandler;
|
|
24929
|
+
this._activeTag = exports.DataZoomActiveTag.endHandler;
|
|
24815
24930
|
this._activeItem = this._endHandler;
|
|
24816
24931
|
}
|
|
24817
24932
|
else if (tag === 'middleRect') {
|
|
24818
|
-
this._activeTag = DataZoomActiveTag.middleHandler;
|
|
24933
|
+
this._activeTag = exports.DataZoomActiveTag.middleHandler;
|
|
24819
24934
|
this._activeItem = this._middleHandlerRect;
|
|
24820
24935
|
}
|
|
24821
24936
|
else if (tag === 'middleSymbol') {
|
|
24822
|
-
this._activeTag = DataZoomActiveTag.middleHandler;
|
|
24937
|
+
this._activeTag = exports.DataZoomActiveTag.middleHandler;
|
|
24823
24938
|
this._activeItem = this._middleHandlerSymbol;
|
|
24824
24939
|
}
|
|
24825
24940
|
else if (tag === 'background') {
|
|
24826
|
-
this._activeTag = DataZoomActiveTag.background;
|
|
24941
|
+
this._activeTag = exports.DataZoomActiveTag.background;
|
|
24827
24942
|
this._activeItem = this._background;
|
|
24828
24943
|
}
|
|
24829
24944
|
this._activeState = true;
|
|
@@ -24831,6 +24946,7 @@
|
|
|
24831
24946
|
this._activeCache.lastPos = this.eventPosToStagePos(e);
|
|
24832
24947
|
};
|
|
24833
24948
|
this._onHandlerPointerMove = (e) => {
|
|
24949
|
+
var _a;
|
|
24834
24950
|
e.stopPropagation();
|
|
24835
24951
|
const { start: startAttr, end: endAttr, brushSelect, realTime = true } = this.attribute;
|
|
24836
24952
|
const pos = this.eventPosToStagePos(e);
|
|
@@ -24838,24 +24954,24 @@
|
|
|
24838
24954
|
const dis = (pos[attPos] - this._activeCache.lastPos[attPos]) / max;
|
|
24839
24955
|
let { start, end } = this.state;
|
|
24840
24956
|
if (this._activeState) {
|
|
24841
|
-
if (this._activeTag === DataZoomActiveTag.middleHandler) {
|
|
24957
|
+
if (this._activeTag === exports.DataZoomActiveTag.middleHandler) {
|
|
24842
24958
|
this.moveZoomWithMiddle((this.state.start + this.state.end) / 2 + dis);
|
|
24843
24959
|
}
|
|
24844
|
-
else if (this._activeTag === DataZoomActiveTag.startHandler) {
|
|
24960
|
+
else if (this._activeTag === exports.DataZoomActiveTag.startHandler) {
|
|
24845
24961
|
if (start + dis > end) {
|
|
24846
24962
|
start = end;
|
|
24847
24963
|
end = start + dis;
|
|
24848
|
-
this._activeTag = DataZoomActiveTag.endHandler;
|
|
24964
|
+
this._activeTag = exports.DataZoomActiveTag.endHandler;
|
|
24849
24965
|
}
|
|
24850
24966
|
else {
|
|
24851
24967
|
start = start + dis;
|
|
24852
24968
|
}
|
|
24853
24969
|
}
|
|
24854
|
-
else if (this._activeTag === DataZoomActiveTag.endHandler) {
|
|
24970
|
+
else if (this._activeTag === exports.DataZoomActiveTag.endHandler) {
|
|
24855
24971
|
if (end + dis < start) {
|
|
24856
24972
|
end = start;
|
|
24857
24973
|
start = end + dis;
|
|
24858
|
-
this._activeTag = DataZoomActiveTag.startHandler;
|
|
24974
|
+
this._activeTag = exports.DataZoomActiveTag.startHandler;
|
|
24859
24975
|
}
|
|
24860
24976
|
else {
|
|
24861
24977
|
end = end + dis;
|
|
@@ -24868,7 +24984,7 @@
|
|
|
24868
24984
|
end = Math.min(Math.max(end, 0), 1);
|
|
24869
24985
|
if (startAttr !== start || endAttr !== end) {
|
|
24870
24986
|
this.setStateAttr(start, end, true);
|
|
24871
|
-
realTime && this._updateStateCallback
|
|
24987
|
+
realTime && ((_a = this._updateStateCallback) === null || _a === void 0 ? void 0 : _a.call(this, start, end, this._activeTag));
|
|
24872
24988
|
this._dispatchChangeEvent(start, end);
|
|
24873
24989
|
}
|
|
24874
24990
|
};
|
|
@@ -24973,10 +25089,11 @@
|
|
|
24973
25089
|
};
|
|
24974
25090
|
}
|
|
24975
25091
|
_onHandlerPointerUp(e) {
|
|
25092
|
+
var _a;
|
|
24976
25093
|
e.preventDefault();
|
|
24977
25094
|
const { start, end, brushSelect, realTime = true } = this.attribute;
|
|
24978
25095
|
if (this._activeState) {
|
|
24979
|
-
if (this._activeTag === DataZoomActiveTag.background) {
|
|
25096
|
+
if (this._activeTag === exports.DataZoomActiveTag.background) {
|
|
24980
25097
|
const pos = this.eventPosToStagePos(e);
|
|
24981
25098
|
this.backgroundDragZoom(this._activeCache.startPos, pos);
|
|
24982
25099
|
}
|
|
@@ -24985,7 +25102,7 @@
|
|
|
24985
25102
|
brushSelect && this.renderDragMask();
|
|
24986
25103
|
if (!realTime || start !== this.state.start || end !== this.state.end) {
|
|
24987
25104
|
this.setStateAttr(this.state.start, this.state.end, true);
|
|
24988
|
-
this._updateStateCallback
|
|
25105
|
+
(_a = this._updateStateCallback) === null || _a === void 0 ? void 0 : _a.call(this, this.state.start, this.state.end, this._activeTag);
|
|
24989
25106
|
this._dispatchChangeEvent(this.state.start, this.state.end);
|
|
24990
25107
|
}
|
|
24991
25108
|
}
|
|
@@ -25035,11 +25152,11 @@
|
|
|
25035
25152
|
const { dragMaskStyle } = this.attribute;
|
|
25036
25153
|
const { position, width, height } = this.getLayoutAttrFromConfig();
|
|
25037
25154
|
if (this._isHorizontal) {
|
|
25038
|
-
this._dragMask = this._container.createOrUpdateChild('dragMask', Object.assign({ x: vutils.clamp(this.dragMaskSize() < 0 ? this._activeCache.lastPos.x : this._activeCache.startPos.x, position.x, position.x + width), y: position.y, width: (this._activeState && this._activeTag === DataZoomActiveTag.background && Math.abs(this.dragMaskSize())) ||
|
|
25155
|
+
this._dragMask = this._container.createOrUpdateChild('dragMask', Object.assign({ x: vutils.clamp(this.dragMaskSize() < 0 ? this._activeCache.lastPos.x : this._activeCache.startPos.x, position.x, position.x + width), y: position.y, width: (this._activeState && this._activeTag === exports.DataZoomActiveTag.background && Math.abs(this.dragMaskSize())) ||
|
|
25039
25156
|
0, height }, dragMaskStyle), 'rect');
|
|
25040
25157
|
}
|
|
25041
25158
|
else {
|
|
25042
|
-
this._dragMask = this._container.createOrUpdateChild('dragMask', Object.assign({ x: position.x, y: vutils.clamp(this.dragMaskSize() < 0 ? this._activeCache.lastPos.y : this._activeCache.startPos.y, position.y, position.y + height), width, height: (this._activeState && this._activeTag === DataZoomActiveTag.background && Math.abs(this.dragMaskSize())) ||
|
|
25159
|
+
this._dragMask = this._container.createOrUpdateChild('dragMask', Object.assign({ x: position.x, y: vutils.clamp(this.dragMaskSize() < 0 ? this._activeCache.lastPos.y : this._activeCache.startPos.y, position.y, position.y + height), width, height: (this._activeState && this._activeTag === exports.DataZoomActiveTag.background && Math.abs(this.dragMaskSize())) ||
|
|
25043
25160
|
0 }, dragMaskStyle), 'rect');
|
|
25044
25161
|
}
|
|
25045
25162
|
}
|
|
@@ -25358,13 +25475,14 @@
|
|
|
25358
25475
|
this.dispatchEvent(changeEvent);
|
|
25359
25476
|
}
|
|
25360
25477
|
setStartAndEnd(start, end) {
|
|
25478
|
+
var _a;
|
|
25361
25479
|
const { start: startAttr, end: endAttr } = this.attribute;
|
|
25362
25480
|
if (vutils.isValid(start) && vutils.isValid(end) && (start !== this.state.start || end !== this.state.end)) {
|
|
25363
25481
|
this.state.start = start;
|
|
25364
25482
|
this.state.end = end;
|
|
25365
25483
|
if (startAttr !== this.state.start || endAttr !== this.state.end) {
|
|
25366
25484
|
this.setStateAttr(start, end, true);
|
|
25367
|
-
this._updateStateCallback
|
|
25485
|
+
(_a = this._updateStateCallback) === null || _a === void 0 ? void 0 : _a.call(this, start, end, this._activeTag);
|
|
25368
25486
|
this._dispatchChangeEvent(start, end);
|
|
25369
25487
|
}
|
|
25370
25488
|
}
|
|
@@ -26451,51 +26569,23 @@
|
|
|
26451
26569
|
const target = e.target;
|
|
26452
26570
|
if ((_a = target === null || target === void 0 ? void 0 : target.name) === null || _a === void 0 ? void 0 : _a.startsWith(exports.LEGEND_ELEMENT_NAME.item)) {
|
|
26453
26571
|
const legendItem = target.delegate;
|
|
26454
|
-
|
|
26455
|
-
|
|
26456
|
-
|
|
26457
|
-
|
|
26458
|
-
|
|
26459
|
-
this._setLegendItemState(legendItem, exports.LegendStateValue.unSelectedHover, e);
|
|
26460
|
-
}
|
|
26461
|
-
const focusButton = legendItem.getChildren()[0].find(node => node.name === exports.LEGEND_ELEMENT_NAME.focus, false);
|
|
26462
|
-
if (focusButton) {
|
|
26463
|
-
focusButton.setAttribute('visible', true);
|
|
26572
|
+
if (this._lastActiveItem) {
|
|
26573
|
+
if (this._lastActiveItem.id === legendItem.id) {
|
|
26574
|
+
return;
|
|
26575
|
+
}
|
|
26576
|
+
this._unHover(this._lastActiveItem, e);
|
|
26464
26577
|
}
|
|
26465
|
-
this.
|
|
26578
|
+
this._hover(legendItem, e);
|
|
26579
|
+
}
|
|
26580
|
+
else if (this._lastActiveItem) {
|
|
26581
|
+
this._unHover(this._lastActiveItem, e);
|
|
26582
|
+
this._lastActiveItem = null;
|
|
26466
26583
|
}
|
|
26467
26584
|
};
|
|
26468
26585
|
this._onUnHover = (e) => {
|
|
26469
|
-
|
|
26470
|
-
|
|
26471
|
-
|
|
26472
|
-
const legendItem = target.delegate;
|
|
26473
|
-
let attributeUpdate = false;
|
|
26474
|
-
if (legendItem.hasState(exports.LegendStateValue.unSelectedHover) ||
|
|
26475
|
-
legendItem.hasState(exports.LegendStateValue.selectedHover)) {
|
|
26476
|
-
attributeUpdate = true;
|
|
26477
|
-
}
|
|
26478
|
-
legendItem.removeState(exports.LegendStateValue.unSelectedHover);
|
|
26479
|
-
legendItem.removeState(exports.LegendStateValue.selectedHover);
|
|
26480
|
-
legendItem
|
|
26481
|
-
.getChildren()[0]
|
|
26482
|
-
.getChildren()
|
|
26483
|
-
.forEach((child) => {
|
|
26484
|
-
if (!attributeUpdate &&
|
|
26485
|
-
(child.hasState(exports.LegendStateValue.unSelectedHover) || child.hasState(exports.LegendStateValue.selectedHover))) {
|
|
26486
|
-
attributeUpdate = true;
|
|
26487
|
-
}
|
|
26488
|
-
child.removeState(exports.LegendStateValue.unSelectedHover);
|
|
26489
|
-
child.removeState(exports.LegendStateValue.selectedHover);
|
|
26490
|
-
});
|
|
26491
|
-
const focusButton = legendItem.getChildren()[0].find(node => node.name === exports.LEGEND_ELEMENT_NAME.focus, false);
|
|
26492
|
-
if (focusButton) {
|
|
26493
|
-
focusButton.setAttribute('visible', false);
|
|
26494
|
-
}
|
|
26495
|
-
if (attributeUpdate) {
|
|
26496
|
-
this._dispatchEvent(exports.LegendEvent.legendItemAttributeUpdate, legendItem, e);
|
|
26497
|
-
}
|
|
26498
|
-
this._dispatchEvent(exports.LegendEvent.legendItemUnHover, legendItem, e);
|
|
26586
|
+
if (this._lastActiveItem) {
|
|
26587
|
+
this._unHover(this._lastActiveItem, e);
|
|
26588
|
+
this._lastActiveItem = null;
|
|
26499
26589
|
}
|
|
26500
26590
|
};
|
|
26501
26591
|
this._onClick = (e) => {
|
|
@@ -26685,7 +26775,7 @@
|
|
|
26685
26775
|
const { hover = true, select = true } = this.attribute;
|
|
26686
26776
|
if (hover) {
|
|
26687
26777
|
this._itemsContainer.addEventListener('pointermove', this._onHover);
|
|
26688
|
-
this._itemsContainer.addEventListener('
|
|
26778
|
+
this._itemsContainer.addEventListener('pointerleave', this._onUnHover);
|
|
26689
26779
|
}
|
|
26690
26780
|
if (select) {
|
|
26691
26781
|
this._itemsContainer.addEventListener('pointerdown', this._onClick);
|
|
@@ -26713,6 +26803,7 @@
|
|
|
26713
26803
|
itemGroup = createGroup(Object.assign({ x: 0, y: 0 }, background === null || background === void 0 ? void 0 : background.style));
|
|
26714
26804
|
this._appendDataToShape(itemGroup, exports.LEGEND_ELEMENT_NAME.item, item, itemGroup, background === null || background === void 0 ? void 0 : background.state);
|
|
26715
26805
|
}
|
|
26806
|
+
itemGroup.id = `${id !== null && id !== void 0 ? id : label}-${index}`;
|
|
26716
26807
|
itemGroup.addState(isSelected ? exports.LegendStateValue.selected : exports.LegendStateValue.unSelected);
|
|
26717
26808
|
const innerGroup = createGroup({
|
|
26718
26809
|
x: 0,
|
|
@@ -26721,22 +26812,26 @@
|
|
|
26721
26812
|
});
|
|
26722
26813
|
itemGroup.add(innerGroup);
|
|
26723
26814
|
let focusStartX = 0;
|
|
26724
|
-
|
|
26725
|
-
|
|
26726
|
-
|
|
26727
|
-
|
|
26728
|
-
|
|
26729
|
-
|
|
26730
|
-
|
|
26731
|
-
shapeAttr.state[key].fill
|
|
26732
|
-
|
|
26733
|
-
|
|
26734
|
-
|
|
26735
|
-
|
|
26736
|
-
|
|
26737
|
-
|
|
26738
|
-
|
|
26739
|
-
|
|
26815
|
+
let shapeSize = 0;
|
|
26816
|
+
let shapeSpace = 0;
|
|
26817
|
+
if ((shapeAttr === null || shapeAttr === void 0 ? void 0 : shapeAttr.visible) !== false) {
|
|
26818
|
+
shapeSize = vutils.get(shapeAttr, 'style.size', DEFAULT_SHAPE_SIZE);
|
|
26819
|
+
shapeSpace = vutils.get(shapeAttr, 'space', DEFAULT_SHAPE_SPACE);
|
|
26820
|
+
const itemShape = createSymbol(Object.assign(Object.assign({ x: 0, y: 0, symbolType: 'circle', strokeBoundsBuffer: 0 }, shape), shapeAttr.style));
|
|
26821
|
+
Object.keys(shapeAttr.state || {}).forEach(key => {
|
|
26822
|
+
const color = shapeAttr.state[key].fill ||
|
|
26823
|
+
shapeAttr.state[key].stroke;
|
|
26824
|
+
if (shape.fill && vutils.isNil(shapeAttr.state[key].fill) && color) {
|
|
26825
|
+
shapeAttr.state[key].fill = color;
|
|
26826
|
+
}
|
|
26827
|
+
if (shape.stroke && vutils.isNil(shapeAttr.state[key].stroke) && color) {
|
|
26828
|
+
shapeAttr.state[key].stroke = color;
|
|
26829
|
+
}
|
|
26830
|
+
});
|
|
26831
|
+
this._appendDataToShape(itemShape, exports.LEGEND_ELEMENT_NAME.itemShape, item, itemGroup, shapeAttr === null || shapeAttr === void 0 ? void 0 : shapeAttr.state);
|
|
26832
|
+
itemShape.addState(isSelected ? exports.LegendStateValue.selected : exports.LegendStateValue.unSelected);
|
|
26833
|
+
innerGroup.add(itemShape);
|
|
26834
|
+
}
|
|
26740
26835
|
let focusShape;
|
|
26741
26836
|
let focusSpace = 0;
|
|
26742
26837
|
if (focus) {
|
|
@@ -26938,6 +27033,48 @@
|
|
|
26938
27033
|
this._pager.addEventListener('toNext', onPaging);
|
|
26939
27034
|
return true;
|
|
26940
27035
|
}
|
|
27036
|
+
_hover(legendItem, e) {
|
|
27037
|
+
this._lastActiveItem = legendItem;
|
|
27038
|
+
const selected = legendItem.hasState(exports.LegendStateValue.selected);
|
|
27039
|
+
if (selected) {
|
|
27040
|
+
this._setLegendItemState(legendItem, exports.LegendStateValue.selectedHover, e);
|
|
27041
|
+
}
|
|
27042
|
+
else {
|
|
27043
|
+
this._setLegendItemState(legendItem, exports.LegendStateValue.unSelectedHover, e);
|
|
27044
|
+
}
|
|
27045
|
+
const focusButton = legendItem.getChildren()[0].find(node => node.name === exports.LEGEND_ELEMENT_NAME.focus, false);
|
|
27046
|
+
if (focusButton) {
|
|
27047
|
+
focusButton.setAttribute('visible', true);
|
|
27048
|
+
}
|
|
27049
|
+
this._dispatchEvent(exports.LegendEvent.legendItemHover, legendItem, e);
|
|
27050
|
+
}
|
|
27051
|
+
_unHover(legendItem, e) {
|
|
27052
|
+
let attributeUpdate = false;
|
|
27053
|
+
if (legendItem.hasState(exports.LegendStateValue.unSelectedHover) || legendItem.hasState(exports.LegendStateValue.selectedHover)) {
|
|
27054
|
+
attributeUpdate = true;
|
|
27055
|
+
}
|
|
27056
|
+
legendItem.removeState(exports.LegendStateValue.unSelectedHover);
|
|
27057
|
+
legendItem.removeState(exports.LegendStateValue.selectedHover);
|
|
27058
|
+
legendItem
|
|
27059
|
+
.getChildren()[0]
|
|
27060
|
+
.getChildren()
|
|
27061
|
+
.forEach((child) => {
|
|
27062
|
+
if (!attributeUpdate &&
|
|
27063
|
+
(child.hasState(exports.LegendStateValue.unSelectedHover) || child.hasState(exports.LegendStateValue.selectedHover))) {
|
|
27064
|
+
attributeUpdate = true;
|
|
27065
|
+
}
|
|
27066
|
+
child.removeState(exports.LegendStateValue.unSelectedHover);
|
|
27067
|
+
child.removeState(exports.LegendStateValue.selectedHover);
|
|
27068
|
+
});
|
|
27069
|
+
const focusButton = legendItem.getChildren()[0].find(node => node.name === exports.LEGEND_ELEMENT_NAME.focus, false);
|
|
27070
|
+
if (focusButton) {
|
|
27071
|
+
focusButton.setAttribute('visible', false);
|
|
27072
|
+
}
|
|
27073
|
+
if (attributeUpdate) {
|
|
27074
|
+
this._dispatchEvent(exports.LegendEvent.legendItemAttributeUpdate, legendItem, e);
|
|
27075
|
+
}
|
|
27076
|
+
this._dispatchEvent(exports.LegendEvent.legendItemUnHover, legendItem, e);
|
|
27077
|
+
}
|
|
26941
27078
|
_setLegendItemState(legendItem, stateName, e) {
|
|
26942
27079
|
const keepCurrentStates = true;
|
|
26943
27080
|
let attributeUpdate = false;
|
|
@@ -30125,7 +30262,7 @@
|
|
|
30125
30262
|
}
|
|
30126
30263
|
};
|
|
30127
30264
|
|
|
30128
|
-
const version = "0.17.0-alpha.
|
|
30265
|
+
const version = "0.17.0-alpha.4";
|
|
30129
30266
|
|
|
30130
30267
|
exports.AbstractComponent = AbstractComponent;
|
|
30131
30268
|
exports.ArcInfo = ArcInfo;
|