MCPcopy Create free account
hub / github.com/angular/angular / seek

Method seek

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

* Fast-forward or go back at a specific time. * * @param progress Time (in percent) at which the player should render the animation * @returns

(progress: number)

Source from the content-addressed store, hash-verified

172 * @returns
173 */
174 seek(progress: number) {
175 this.pause();
176
177 if (!this.rules.length) {
178 console.warn("Animation: Can't without a definition");
179 return;
180 }
181
182 progress = Math.max(0, Math.min(progress, 1));
183 const time = Math.round(progress * this._duration);
184
185 this.updateFrame(time);
186 this.completed = progress === 1;
187 }
188
189 /**
190 * Go forward in time.

Callers 1

animation.spec.tsFile · 0.45

Calls 5

pauseMethod · 0.95
updateFrameMethod · 0.95
warnMethod · 0.65
maxMethod · 0.45
minMethod · 0.45

Tested by

no test coverage detected