targetj 1.0.238 → 1.0.239
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/Export.js +5 -1
- package/build/AnimationManager.js +340 -298
- package/build/AnimationUtil.js +556 -8
- package/build/BaseModel.js +176 -88
- package/build/Bracket.js +0 -3
- package/build/LocationManager.js +34 -136
- package/build/PageManager.js +29 -7
- package/build/RunScheduler.js +1 -3
- package/build/ScheduleUtil.js +181 -0
- package/build/TModel.js +12 -7
- package/build/TModelManager.js +72 -18
- package/build/TUtil.js +141 -52
- package/build/TargetExecutor.js +50 -10
- package/build/TargetManager.js +160 -132
- package/build/TargetUtil.js +86 -13
- package/build/VisibilityUtil.js +1 -1
- package/build/index.js +11 -0
- package/dist/targetjs.js +1 -1
- package/dist/targetjs.js.gz +0 -0
- package/package.json +1 -1
package/build/BaseModel.js
CHANGED
|
@@ -183,6 +183,24 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
183
183
|
var _this$state16, _this$state16$visible;
|
|
184
184
|
return (_this$state16$visible = (_this$state16 = this.state()).visibleChildren) !== null && _this$state16$visible !== void 0 ? _this$state16$visible : _this$state16.visibleChildren = [];
|
|
185
185
|
}
|
|
186
|
+
}, {
|
|
187
|
+
key: "passiveTargetList",
|
|
188
|
+
get: function get() {
|
|
189
|
+
var _this$state17, _this$state17$passive;
|
|
190
|
+
return (_this$state17$passive = (_this$state17 = this.state()).passiveTargetList) !== null && _this$state17$passive !== void 0 ? _this$state17$passive : _this$state17.passiveTargetList = [];
|
|
191
|
+
},
|
|
192
|
+
set: function set(val) {
|
|
193
|
+
this.state().passiveTargetList = val;
|
|
194
|
+
}
|
|
195
|
+
}, {
|
|
196
|
+
key: "passiveTargetMap",
|
|
197
|
+
get: function get() {
|
|
198
|
+
var _this$state18, _this$state18$passive;
|
|
199
|
+
return (_this$state18$passive = (_this$state18 = this.state()).passiveTargetMap) !== null && _this$state18$passive !== void 0 ? _this$state18$passive : _this$state18.passiveTargetMap = {};
|
|
200
|
+
},
|
|
201
|
+
set: function set(val) {
|
|
202
|
+
this.state().passiveTargetMap = val;
|
|
203
|
+
}
|
|
186
204
|
}, {
|
|
187
205
|
key: "getParent",
|
|
188
206
|
value: function getParent() {
|
|
@@ -260,6 +278,12 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
260
278
|
this.delVal(key);
|
|
261
279
|
return;
|
|
262
280
|
}
|
|
281
|
+
if (target.loop === 'passive' || typeof target.loop === 'function') {
|
|
282
|
+
if (!this.passiveTargetMap[key]) {
|
|
283
|
+
this.passiveTargetMap[key] = true;
|
|
284
|
+
this.passiveTargetList.push(key);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
263
287
|
var targetType = _typeof(target);
|
|
264
288
|
var isInactiveKey = key.startsWith('_') || key.endsWith('$');
|
|
265
289
|
var needsTargetExecution = _TargetData.TargetData.mustExecuteTargets[cleanKey] || isInactiveKey || targetType !== 'string' && targetType !== 'number' && targetType !== 'boolean';
|
|
@@ -474,14 +498,6 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
474
498
|
}
|
|
475
499
|
return this;
|
|
476
500
|
}
|
|
477
|
-
}, {
|
|
478
|
-
key: "resetScheduleTimeStamp",
|
|
479
|
-
value: function resetScheduleTimeStamp(key) {
|
|
480
|
-
if (this.targetValues[key]) {
|
|
481
|
-
this.targetValues[key].scheduleTimeStamp = undefined;
|
|
482
|
-
}
|
|
483
|
-
return this;
|
|
484
|
-
}
|
|
485
501
|
}, {
|
|
486
502
|
key: "resetTargetInitialValue",
|
|
487
503
|
value: function resetTargetInitialValue(key) {
|
|
@@ -490,6 +506,33 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
490
506
|
}
|
|
491
507
|
return this;
|
|
492
508
|
}
|
|
509
|
+
}, {
|
|
510
|
+
key: "addTargetToStatusList",
|
|
511
|
+
value: function addTargetToStatusList(key) {
|
|
512
|
+
var targetValue = this.targetValues[key];
|
|
513
|
+
if (!targetValue) {
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
if (targetValue.status === 'fetching') {
|
|
517
|
+
var _this$getParent;
|
|
518
|
+
this.removeFromActiveTargets(key);
|
|
519
|
+
this.removeFromUpdatingTargets(key);
|
|
520
|
+
(_this$getParent = this.getParent()) === null || _this$getParent === void 0 || _this$getParent.addToActiveChildren(this);
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
if (this.isTargetUpdating(key)) {
|
|
524
|
+
this.addToUpdatingTargets(key);
|
|
525
|
+
this.removeFromActiveTargets(key);
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
if (this.isTargetActive(key)) {
|
|
529
|
+
this.addToActiveTargets(key);
|
|
530
|
+
this.removeFromUpdatingTargets(key);
|
|
531
|
+
return;
|
|
532
|
+
}
|
|
533
|
+
this.removeFromActiveTargets(key);
|
|
534
|
+
this.removeFromUpdatingTargets(key);
|
|
535
|
+
}
|
|
493
536
|
}, {
|
|
494
537
|
key: "setTargetStatus",
|
|
495
538
|
value: function setTargetStatus(key, status) {
|
|
@@ -504,20 +547,7 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
504
547
|
}
|
|
505
548
|
targetValue.resetFlag = false;
|
|
506
549
|
targetValue.status = status;
|
|
507
|
-
|
|
508
|
-
this.removeFromActiveTargets(key);
|
|
509
|
-
this.removeFromUpdatingTargets(key);
|
|
510
|
-
this.getParent().addToActiveChildren(this);
|
|
511
|
-
} else if (this.isTargetUpdating(key)) {
|
|
512
|
-
this.addToUpdatingTargets(key);
|
|
513
|
-
this.removeFromActiveTargets(key);
|
|
514
|
-
} else if (this.isTargetActive(key)) {
|
|
515
|
-
this.addToActiveTargets(key);
|
|
516
|
-
this.removeFromUpdatingTargets(key);
|
|
517
|
-
} else {
|
|
518
|
-
this.removeFromActiveTargets(key);
|
|
519
|
-
this.removeFromUpdatingTargets(key);
|
|
520
|
-
}
|
|
550
|
+
this.addTargetToStatusList(key);
|
|
521
551
|
}
|
|
522
552
|
}, {
|
|
523
553
|
key: "getTargetStatus",
|
|
@@ -551,8 +581,13 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
551
581
|
}
|
|
552
582
|
}, {
|
|
553
583
|
key: "isTargetTreeComplete",
|
|
554
|
-
value: function isTargetTreeComplete(key) {
|
|
555
|
-
return _TargetUtil.TargetUtil.isTargetTreeComplete(this, key) === true;
|
|
584
|
+
value: function isTargetTreeComplete(key, completionScope) {
|
|
585
|
+
return _TargetUtil.TargetUtil.isTargetTreeComplete(this, key, completionScope) === true;
|
|
586
|
+
}
|
|
587
|
+
}, {
|
|
588
|
+
key: "isTargetVisibleTreeComplete",
|
|
589
|
+
value: function isTargetVisibleTreeComplete(key) {
|
|
590
|
+
return this.isTargetTreeComplete(key, 'visible');
|
|
556
591
|
}
|
|
557
592
|
}, {
|
|
558
593
|
key: "isTargetFullyCompleted",
|
|
@@ -665,12 +700,12 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
665
700
|
}
|
|
666
701
|
}, {
|
|
667
702
|
key: "setScheduleRemainingTime",
|
|
668
|
-
value: function setScheduleRemainingTime(key,
|
|
703
|
+
value: function setScheduleRemainingTime(key, value) {
|
|
669
704
|
var targetValue = this.targetValues[key];
|
|
670
705
|
if (!targetValue) {
|
|
671
706
|
return;
|
|
672
707
|
}
|
|
673
|
-
targetValue.scheduleRemainingTime =
|
|
708
|
+
targetValue.scheduleRemainingTime = value;
|
|
674
709
|
}
|
|
675
710
|
}, {
|
|
676
711
|
key: "resetScheduleRemainingTime",
|
|
@@ -679,7 +714,25 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
679
714
|
if (!targetValue) {
|
|
680
715
|
return;
|
|
681
716
|
}
|
|
682
|
-
|
|
717
|
+
targetValue.scheduleRemainingTime = undefined;
|
|
718
|
+
}
|
|
719
|
+
}, {
|
|
720
|
+
key: "setScheduleTimeStamp",
|
|
721
|
+
value: function setScheduleTimeStamp(key, value) {
|
|
722
|
+
var targetValue = this.targetValues[key];
|
|
723
|
+
if (!targetValue) {
|
|
724
|
+
return;
|
|
725
|
+
}
|
|
726
|
+
targetValue.scheduleTimeStamp = value;
|
|
727
|
+
}
|
|
728
|
+
}, {
|
|
729
|
+
key: "resetScheduleTimeStamp",
|
|
730
|
+
value: function resetScheduleTimeStamp(key) {
|
|
731
|
+
var targetValue = this.targetValues[key];
|
|
732
|
+
if (!targetValue) {
|
|
733
|
+
return;
|
|
734
|
+
}
|
|
735
|
+
targetValue.scheduleTimeStamp = undefined;
|
|
683
736
|
}
|
|
684
737
|
}, {
|
|
685
738
|
key: "isTargetInLoop",
|
|
@@ -689,7 +742,17 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
689
742
|
return false;
|
|
690
743
|
}
|
|
691
744
|
var loop = typeof t.loop === 'function' ? t.loop.call(this, key) : t.loop;
|
|
692
|
-
return loop === true
|
|
745
|
+
return loop === true;
|
|
746
|
+
}
|
|
747
|
+
}, {
|
|
748
|
+
key: "isTargetPassiveLoop",
|
|
749
|
+
value: function isTargetPassiveLoop(key) {
|
|
750
|
+
var t = this.targets[key];
|
|
751
|
+
if (!t) {
|
|
752
|
+
return false;
|
|
753
|
+
}
|
|
754
|
+
var loop = typeof t.loop === 'function' ? t.loop.call(this, key) : t.loop;
|
|
755
|
+
return loop === 'passive';
|
|
693
756
|
}
|
|
694
757
|
}, {
|
|
695
758
|
key: "shouldScheduleRun",
|
|
@@ -701,15 +764,49 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
701
764
|
if (t.triggerRerun !== undefined) {
|
|
702
765
|
return !!t.triggerRerun;
|
|
703
766
|
}
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
767
|
+
var loop = typeof t.loop === 'function' ? t.loop.call(this, key) : t.loop;
|
|
768
|
+
if (loop === 'passive') {
|
|
769
|
+
var _t$deepEquality;
|
|
770
|
+
var values = _TargetParser.TargetParser.getValueStepsCycles(this, key);
|
|
771
|
+
var nextValue = values[0];
|
|
772
|
+
var currentTargetValue = this.getTargetValue(key);
|
|
773
|
+
return !_TUtil.TUtil.areEqual(nextValue, currentTargetValue, (_t$deepEquality = t.deepEquality) !== null && _t$deepEquality !== void 0 ? _t$deepEquality : false);
|
|
710
774
|
}
|
|
711
775
|
return true;
|
|
712
776
|
}
|
|
777
|
+
}, {
|
|
778
|
+
key: "activateChangedPassiveTargets",
|
|
779
|
+
value: function activateChangedPassiveTargets() {
|
|
780
|
+
var _this$passiveTargetLi;
|
|
781
|
+
if (!((_this$passiveTargetLi = this.passiveTargetList) !== null && _this$passiveTargetLi !== void 0 && _this$passiveTargetLi.length)) {
|
|
782
|
+
return false;
|
|
783
|
+
}
|
|
784
|
+
var activated = false;
|
|
785
|
+
var _iterator = _createForOfIteratorHelper(this.passiveTargetList),
|
|
786
|
+
_step;
|
|
787
|
+
try {
|
|
788
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
789
|
+
var _this$animatingMap;
|
|
790
|
+
var key = _step.value;
|
|
791
|
+
if (!this.isTargetPassiveLoop(key)) {
|
|
792
|
+
continue;
|
|
793
|
+
}
|
|
794
|
+
if (this.isTargetUpdating(key) || (_this$animatingMap = this.animatingMap) !== null && _this$animatingMap !== void 0 && _this$animatingMap.has(key)) {
|
|
795
|
+
continue;
|
|
796
|
+
}
|
|
797
|
+
if (!this.shouldScheduleRun(key)) {
|
|
798
|
+
continue;
|
|
799
|
+
}
|
|
800
|
+
this.addToActiveTargets(key);
|
|
801
|
+
activated = true;
|
|
802
|
+
}
|
|
803
|
+
} catch (err) {
|
|
804
|
+
_iterator.e(err);
|
|
805
|
+
} finally {
|
|
806
|
+
_iterator.f();
|
|
807
|
+
}
|
|
808
|
+
return activated;
|
|
809
|
+
}
|
|
713
810
|
}, {
|
|
714
811
|
key: "getTargetInitialValue",
|
|
715
812
|
value: function getTargetInitialValue(key) {
|
|
@@ -806,7 +903,7 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
806
903
|
key: "getValueListPointer",
|
|
807
904
|
value: function getValueListPointer(key) {
|
|
808
905
|
var _this$targetValues$ke22, _this$targetValues$ke23;
|
|
809
|
-
return (_this$targetValues$ke22 = (_this$targetValues$ke23 = this.targetValues[key]) === null || _this$targetValues$ke23 === void 0 ? void 0 : _this$targetValues$ke23.valuePointer) !== null && _this$targetValues$ke22 !== void 0 ? _this$targetValues$ke22 :
|
|
906
|
+
return (_this$targetValues$ke22 = (_this$targetValues$ke23 = this.targetValues[key]) === null || _this$targetValues$ke23 === void 0 ? void 0 : _this$targetValues$ke23.valuePointer) !== null && _this$targetValues$ke22 !== void 0 ? _this$targetValues$ke22 : 1;
|
|
810
907
|
}
|
|
811
908
|
}, {
|
|
812
909
|
key: "incrementTargetCycle",
|
|
@@ -830,13 +927,6 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
830
927
|
}
|
|
831
928
|
return this.targetValues[key].interval;
|
|
832
929
|
}
|
|
833
|
-
}, {
|
|
834
|
-
key: "setScheduleTimeStamp",
|
|
835
|
-
value: function setScheduleTimeStamp(key, value) {
|
|
836
|
-
if (this.targetValues[key]) {
|
|
837
|
-
this.targetValues[key].scheduleTimeStamp = value;
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
930
|
}, {
|
|
841
931
|
key: "setTargetInitialValue",
|
|
842
932
|
value: function setTargetInitialValue(key, value) {
|
|
@@ -881,12 +971,12 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
881
971
|
if (!this.hasAnimatingTargets()) {
|
|
882
972
|
return;
|
|
883
973
|
}
|
|
884
|
-
var
|
|
885
|
-
|
|
974
|
+
var _iterator2 = _createForOfIteratorHelper(this.animatingMap),
|
|
975
|
+
_step2;
|
|
886
976
|
try {
|
|
887
|
-
for (
|
|
888
|
-
var
|
|
889
|
-
key =
|
|
977
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
978
|
+
var _step2$value = _slicedToArray(_step2.value, 1),
|
|
979
|
+
key = _step2$value[0];
|
|
890
980
|
if (this.targetValues[key]) {
|
|
891
981
|
this.targetValues[key].status = 'done';
|
|
892
982
|
this.removeFromUpdatingTargets(key);
|
|
@@ -894,28 +984,27 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
894
984
|
}
|
|
895
985
|
}
|
|
896
986
|
} catch (err) {
|
|
897
|
-
|
|
987
|
+
_iterator2.e(err);
|
|
898
988
|
} finally {
|
|
899
|
-
|
|
989
|
+
_iterator2.f();
|
|
900
990
|
}
|
|
901
991
|
(0, _App.getAnimationManager)().deleteAnimation(this);
|
|
902
|
-
this.pausedBatch = undefined;
|
|
903
992
|
}
|
|
904
993
|
}, {
|
|
905
994
|
key: "hasTargetUpdates",
|
|
906
995
|
value: function hasTargetUpdates(key) {
|
|
907
|
-
var _this$
|
|
908
|
-
return key ? this.updatingTargetMap[key] === true || ((_this$
|
|
996
|
+
var _this$animatingMap2;
|
|
997
|
+
return key ? this.updatingTargetMap[key] === true || ((_this$animatingMap2 = this.animatingMap) === null || _this$animatingMap2 === void 0 ? void 0 : _this$animatingMap2.has(key)) : this.updatingTargetList.length > 0;
|
|
909
998
|
}
|
|
910
999
|
}, {
|
|
911
1000
|
key: "addToActiveTargets",
|
|
912
1001
|
value: function addToActiveTargets(key) {
|
|
913
1002
|
if (!this.activeTargetMap[key] && this.canTargetBeActivated(key)) {
|
|
914
|
-
var _this$
|
|
1003
|
+
var _this$getParent2;
|
|
915
1004
|
this.markLayoutDirty(key);
|
|
916
1005
|
this.activeTargetMap[key] = true;
|
|
917
1006
|
this.activeTargetList.push(key);
|
|
918
|
-
(_this$
|
|
1007
|
+
(_this$getParent2 = this.getParent()) === null || _this$getParent2 === void 0 || _this$getParent2.addToActiveChildren(this);
|
|
919
1008
|
}
|
|
920
1009
|
}
|
|
921
1010
|
}, {
|
|
@@ -929,19 +1018,19 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
929
1018
|
}
|
|
930
1019
|
}
|
|
931
1020
|
if (this.activeTargetList.length === 0) {
|
|
932
|
-
var _this$
|
|
933
|
-
(_this$
|
|
1021
|
+
var _this$getParent3;
|
|
1022
|
+
(_this$getParent3 = this.getParent()) === null || _this$getParent3 === void 0 || _this$getParent3.removeFromActiveChildren(this);
|
|
934
1023
|
}
|
|
935
1024
|
}
|
|
936
1025
|
}, {
|
|
937
1026
|
key: "addToUpdatingTargets",
|
|
938
1027
|
value: function addToUpdatingTargets(key) {
|
|
939
1028
|
if (!this.updatingTargetMap[key]) {
|
|
940
|
-
var _this$
|
|
1029
|
+
var _this$getParent4;
|
|
941
1030
|
this.markLayoutDirty(key);
|
|
942
1031
|
this.updatingTargetMap[key] = true;
|
|
943
1032
|
this.updatingTargetList.push(key);
|
|
944
|
-
(_this$
|
|
1033
|
+
(_this$getParent4 = this.getParent()) === null || _this$getParent4 === void 0 || _this$getParent4.addToUpdatingChildren(this);
|
|
945
1034
|
}
|
|
946
1035
|
}
|
|
947
1036
|
}, {
|
|
@@ -955,8 +1044,8 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
955
1044
|
}
|
|
956
1045
|
}
|
|
957
1046
|
if (this.updatingTargetList.length === 0) {
|
|
958
|
-
var _this$
|
|
959
|
-
(_this$
|
|
1047
|
+
var _this$getParent5;
|
|
1048
|
+
(_this$getParent5 = this.getParent()) === null || _this$getParent5 === void 0 || _this$getParent5.removeFromUpdatingChildren(this);
|
|
960
1049
|
}
|
|
961
1050
|
}
|
|
962
1051
|
}, {
|
|
@@ -964,19 +1053,19 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
964
1053
|
value: function hasUpdatingImperativeTargets(originalTargetName) {
|
|
965
1054
|
var _this$updatingTargetL;
|
|
966
1055
|
var updatingList = [].concat(_toConsumableArray((_this$updatingTargetL = this.updatingTargetList) !== null && _this$updatingTargetL !== void 0 ? _this$updatingTargetL : []), _toConsumableArray(this.hasAnimatingTargets() ? _toConsumableArray(this.animatingMap.keys()) : []));
|
|
967
|
-
var
|
|
968
|
-
|
|
1056
|
+
var _iterator3 = _createForOfIteratorHelper(updatingList),
|
|
1057
|
+
_step3;
|
|
969
1058
|
try {
|
|
970
|
-
for (
|
|
971
|
-
var target =
|
|
972
|
-
if (this.isTargetImperative(target) && this.targetValues[target].originalTargetName === originalTargetName) {
|
|
1059
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
1060
|
+
var target = _step3.value;
|
|
1061
|
+
if (this.isTargetImperative(target) && (this.targetValues[target].originalTargetName === originalTargetName || _TargetUtil.TargetUtil.getTargetName(target) === originalTargetName)) {
|
|
973
1062
|
return true;
|
|
974
1063
|
}
|
|
975
1064
|
}
|
|
976
1065
|
} catch (err) {
|
|
977
|
-
|
|
1066
|
+
_iterator3.e(err);
|
|
978
1067
|
} finally {
|
|
979
|
-
|
|
1068
|
+
_iterator3.f();
|
|
980
1069
|
}
|
|
981
1070
|
return false;
|
|
982
1071
|
}
|
|
@@ -984,58 +1073,57 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
984
1073
|
key: "getUpdatingImperativeTargets",
|
|
985
1074
|
value: function getUpdatingImperativeTargets(originalTargetName) {
|
|
986
1075
|
var targets = [];
|
|
987
|
-
var
|
|
988
|
-
|
|
1076
|
+
var _iterator4 = _createForOfIteratorHelper(this.updatingTargetList),
|
|
1077
|
+
_step4;
|
|
989
1078
|
try {
|
|
990
|
-
for (
|
|
991
|
-
var target =
|
|
1079
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
1080
|
+
var target = _step4.value;
|
|
992
1081
|
if (this.isTargetImperative(target) && this.targetValues[target].originalTargetName === originalTargetName) {
|
|
993
1082
|
targets.push(target);
|
|
994
1083
|
}
|
|
995
1084
|
}
|
|
996
1085
|
} catch (err) {
|
|
997
|
-
|
|
1086
|
+
_iterator4.e(err);
|
|
998
1087
|
} finally {
|
|
999
|
-
|
|
1088
|
+
_iterator4.f();
|
|
1000
1089
|
}
|
|
1001
1090
|
return targets;
|
|
1002
1091
|
}
|
|
1003
1092
|
}, {
|
|
1004
1093
|
key: "hasAnyUpdates",
|
|
1005
1094
|
value: function hasAnyUpdates() {
|
|
1006
|
-
var _this$animatingMap$si, _this$
|
|
1007
|
-
return this.updatingTargetList.length !== 0 || this.activeTargetList.length !== 0 || ((_this$animatingMap$si = (_this$
|
|
1095
|
+
var _this$animatingMap$si, _this$animatingMap3;
|
|
1096
|
+
return this.updatingTargetList.length !== 0 || this.activeTargetList.length !== 0 || ((_this$animatingMap$si = (_this$animatingMap3 = this.animatingMap) === null || _this$animatingMap3 === void 0 ? void 0 : _this$animatingMap3.size) !== null && _this$animatingMap$si !== void 0 ? _this$animatingMap$si : 0) !== 0;
|
|
1008
1097
|
}
|
|
1009
1098
|
}, {
|
|
1010
1099
|
key: "removeFromAnimatingMap",
|
|
1011
1100
|
value: function removeFromAnimatingMap(key) {
|
|
1012
|
-
var _this$
|
|
1013
|
-
if ((_this$
|
|
1101
|
+
var _this$animatingMap4;
|
|
1102
|
+
if ((_this$animatingMap4 = this.animatingMap) !== null && _this$animatingMap4 !== void 0 && _this$animatingMap4.has(key)) {
|
|
1014
1103
|
this.animatingMap.delete(key);
|
|
1015
1104
|
if (this.animatingMap.size === 0) {
|
|
1016
|
-
var _this$
|
|
1017
|
-
(_this$
|
|
1105
|
+
var _this$getParent6;
|
|
1106
|
+
(_this$getParent6 = this.getParent()) === null || _this$getParent6 === void 0 || _this$getParent6.removeFromAnimatingChildren(this);
|
|
1018
1107
|
}
|
|
1019
1108
|
}
|
|
1020
1109
|
}
|
|
1021
1110
|
}, {
|
|
1022
1111
|
key: "clearAnimatingMap",
|
|
1023
1112
|
value: function clearAnimatingMap() {
|
|
1024
|
-
var _this$
|
|
1025
|
-
(_this$
|
|
1026
|
-
(_this$
|
|
1113
|
+
var _this$animatingMap5, _this$getParent7;
|
|
1114
|
+
(_this$animatingMap5 = this.animatingMap) === null || _this$animatingMap5 === void 0 || _this$animatingMap5.clear();
|
|
1115
|
+
(_this$getParent7 = this.getParent()) === null || _this$getParent7 === void 0 || _this$getParent7.removeFromAnimatingChildren(this);
|
|
1027
1116
|
}
|
|
1028
1117
|
}, {
|
|
1029
1118
|
key: "addToAnimatingMap",
|
|
1030
1119
|
value: function addToAnimatingMap(key) {
|
|
1031
|
-
var _this$targetValues$ke24, _this$
|
|
1032
|
-
var record = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
1120
|
+
var _this$targetValues$ke24, _this$getParent8;
|
|
1033
1121
|
if ((_this$targetValues$ke24 = this.targetValues[key]) !== null && _this$targetValues$ke24 !== void 0 && _this$targetValues$ke24.snapAnimation) {
|
|
1034
1122
|
return;
|
|
1035
1123
|
}
|
|
1036
1124
|
this.animatingMap || (this.animatingMap = new Map());
|
|
1037
|
-
this.animatingMap.set(key,
|
|
1038
|
-
(_this$
|
|
1125
|
+
this.animatingMap.set(key, true);
|
|
1126
|
+
(_this$getParent8 = this.getParent()) === null || _this$getParent8 === void 0 || _this$getParent8.addToAnimatingChildren(this);
|
|
1039
1127
|
}
|
|
1040
1128
|
}, {
|
|
1041
1129
|
key: "isKeyAnimating",
|
|
@@ -1104,8 +1192,8 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
1104
1192
|
}, {
|
|
1105
1193
|
key: "hasAnimatingTargets",
|
|
1106
1194
|
value: function hasAnimatingTargets() {
|
|
1107
|
-
var _this$
|
|
1108
|
-
return !!((_this$
|
|
1195
|
+
var _this$animatingMap6;
|
|
1196
|
+
return !!((_this$animatingMap6 = this.animatingMap) !== null && _this$animatingMap6 !== void 0 && _this$animatingMap6.size);
|
|
1109
1197
|
}
|
|
1110
1198
|
}, {
|
|
1111
1199
|
key: "hasValidAnimation",
|
package/build/Bracket.js
CHANGED
|
@@ -108,9 +108,6 @@ var Bracket = exports.Bracket = /*#__PURE__*/function (_TModel) {
|
|
|
108
108
|
value: function getBracketThreshold() {
|
|
109
109
|
return this.getRealParent().getBracketSize();
|
|
110
110
|
}
|
|
111
|
-
}, {
|
|
112
|
-
key: "addToParentVisibleChildren",
|
|
113
|
-
value: function addToParentVisibleChildren() {}
|
|
114
111
|
}, {
|
|
115
112
|
key: "createViewport",
|
|
116
113
|
value: function createViewport() {
|