(animationBuilder: AnimationBuilder, opts: TransitionOptions)
| 124 | }; |
| 125 | |
| 126 | const 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 | |
| 149 | const noAnimation = async (opts: TransitionOptions): Promise<TransitionResult> => { |
| 150 | const enteringEl = opts.enteringEl; |
no test coverage detected