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

Function animation

core/src/utils/transition/index.ts:126–147  ·  view source on GitHub ↗
(animationBuilder: AnimationBuilder, opts: TransitionOptions)

Source from the content-addressed store, hash-verified

124};
125
126const animation = async (animationBuilder: AnimationBuilder, opts: TransitionOptions): Promise<TransitionResult> => {
127 await waitForReady(opts, true);
128
129 const trans = animationBuilder(opts.baseEl, opts);
130
131 fireWillEvents(opts.enteringEl, opts.leavingEl);
132
133 const didComplete = await playTransition(trans, opts);
134
135 if (opts.progressCallback) {
136 opts.progressCallback(undefined);
137 }
138
139 if (didComplete) {
140 fireDidEvents(opts.enteringEl, opts.leavingEl);
141 }
142
143 return {
144 hasCompleted: didComplete,
145 animation: trans,
146 };
147};
148
149const noAnimation = async (opts: TransitionOptions): Promise<TransitionResult> => {
150 const enteringEl = opts.enteringEl;

Callers 1

runTransitionFunction · 0.70

Calls 4

waitForReadyFunction · 0.85
fireWillEventsFunction · 0.85
playTransitionFunction · 0.85
fireDidEventsFunction · 0.85

Tested by

no test coverage detected