MCPcopy Index your code
hub / github.com/angular/angular / back

Method back

adev/src/app/features/home/animation/animation.ts:219–236  ·  view source on GitHub ↗

* Go back in time. * * @param timestep Custom timestep different from the config one * @returns

(timestep?: number)

Source from the content-addressed store, hash-verified

217 * @returns
218 */
219 back(timestep?: number) {
220 this.pause();
221
222 if (!this.rules.length) {
223 console.warn("Animation: Can't go back without a definition");
224 return;
225 }
226 timestep = timestep ?? this.config.timestep;
227
228 const time = this.currentTime - timestep;
229
230 if (time >= 0) {
231 this.updateFrame(time);
232
233 // Incomplete the animation, if it was completed.
234 this.completed = false;
235 }
236 }
237
238 /** Reset the animation. */
239 reset() {

Callers 2

animation.spec.tsFile · 0.45

Calls 3

pauseMethod · 0.95
updateFrameMethod · 0.95
warnMethod · 0.65

Tested by

no test coverage detected