MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / progressEnd

Function progressEnd

core/src/utils/animation/animation.ts:728–772  ·  view source on GitHub ↗
(playTo: 0 | 1 | undefined, step: number, dur?: number)

Source from the content-addressed store, hash-verified

726 };
727
728 const progressEnd = (playTo: 0 | 1 | undefined, step: number, dur?: number) => {
729 shouldForceLinearEasing = false;
730
731 childAnimations.forEach((animation) => {
732 animation.progressEnd(playTo, step, dur);
733 });
734
735 if (dur !== undefined) {
736 forceDurationValue = dur;
737 }
738
739 finished = false;
740
741 willComplete = true;
742
743 if (playTo === 0) {
744 forceDirectionValue = getDirection() === 'reverse' ? 'normal' : 'reverse';
745
746 if (forceDirectionValue === 'reverse') {
747 willComplete = false;
748 }
749
750 if (supportsWebAnimations) {
751 update();
752 setAnimationStep(1 - step);
753 } else {
754 forceDelayValue = (1 - step) * getDuration() * -1;
755 update(false, false);
756 }
757 } else if (playTo === 1) {
758 if (supportsWebAnimations) {
759 update();
760 setAnimationStep(step);
761 } else {
762 forceDelayValue = step * getDuration() * -1;
763 update(false, false);
764 }
765 }
766
767 if (playTo !== undefined && !parentAnimation) {
768 play();
769 }
770
771 return ani;
772 };
773
774 const pauseAnimation = () => {
775 if (initialized) {

Callers

nothing calls this directly

Calls 6

setAnimationStepFunction · 0.85
getDurationFunction · 0.85
playFunction · 0.85
progressEndMethod · 0.80
getDirectionFunction · 0.70
updateFunction · 0.70

Tested by

no test coverage detected