MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / getAnimationBuilder

Function getAnimationBuilder

core/src/utils/transition/index.ts:109–124  ·  view source on GitHub ↗
(opts: TransitionOptions)

Source from the content-addressed store, hash-verified

107};
108
109const getAnimationBuilder = async (opts: TransitionOptions): Promise<AnimationBuilder | undefined> => {
110 if (!opts.leavingEl || !opts.animated || opts.duration === 0) {
111 return undefined;
112 }
113
114 if (opts.animationBuilder) {
115 return opts.animationBuilder;
116 }
117
118 const getAnimation =
119 opts.mode === 'ios'
120 ? (await iosTransitionAnimation()).iosTransitionAnimation
121 : (await mdTransitionAnimation()).mdTransitionAnimation;
122
123 return getAnimation;
124};
125
126const animation = async (animationBuilder: AnimationBuilder, opts: TransitionOptions): Promise<TransitionResult> => {
127 await waitForReady(opts, true);

Callers 1

runTransitionFunction · 0.85

Calls 2

iosTransitionAnimationFunction · 0.70
mdTransitionAnimationFunction · 0.70

Tested by

no test coverage detected