Skip to the end of the current animation.
()
| 425 | |
| 426 | /** Skip to the end of the current animation. */ |
| 427 | finish() { |
| 428 | if (isAnimating(this)) { |
| 429 | const { to, config } = this.animation |
| 430 | raf.batchedUpdates(() => { |
| 431 | // Ensure the "onStart" and "onRest" props are called. |
| 432 | this._onStart() |
| 433 | |
| 434 | // Jump to the goal value, except for decay animations |
| 435 | // which have an undefined goal value. |
| 436 | if (!config.decay) { |
| 437 | this._set(to, false) |
| 438 | } |
| 439 | |
| 440 | this._stop() |
| 441 | }) |
| 442 | } |
| 443 | return this |
| 444 | } |
| 445 | |
| 446 | /** Push props into the pending queue. */ |
| 447 | update(props: SpringUpdate<T>) { |