Interface AnimationHandler<T>

Handles animation state changes.

interface AnimationHandler<T> {
    onAbort(animation: T): void;
    onEnd(animation: T): void;
    onProgress(animation: T, fraction: number, percent: number): void;
    onStart(animation: T): void;
}

Type Parameters

Methods

  • Triggered if the animation was prematurely aborted.

    Parameters

    • animation: T

      The animation that was aborted.

    Returns void

  • Triggered right after the animation has ended. Not called if animation was prematurely aborted.

    Parameters

    • animation: T

      The animation that has ended.

    Returns void

  • Triggered when an animated value is changed.

    Parameters

    • animation: T

      The pending animation.

    • fraction: number

      The result of Animation.easing applied to percent.

    • percent: number

      The completed animation percentage [0, 1].

    Returns void

  • Triggered right before the animation is started.

    Parameters

    • animation: T

      The animation that has started.

    Returns void