Provides an interface of the draggableGsap action options support / Readable store to make updating / setting draggableGsap options much easier. When subscribing to the options instance returned by draggableGsap.options the Subscriber handler receives the entire instance.

interface DraggableGsapOptionsStore {
    inertia: boolean;
    inertiaOptions: GsapInertiaOptions;
    tween: boolean;
    tweenOptions: GsapTweenOptions;
    set inertiaDuration(duration: {
        max: number;
        min: number;
    });
    inertiaDurationMax: number;
    inertiaDurationMin: number;
    inertiaEnd: number | Function | any[];
    inertiaResistance: number;
    inertiaVelocityScale: number;
    tweenDuration: number;
    tweenEase: string | Function;
    reset(): void;
    resetInertia(): void;
    resetInertiaOptions(): void;
    resetTween(): void;
    resetTweenOptions(): void;
    subscribe(this: void, run: Subscriber<DraggableGsapOptionsStore>, invalidate?: Invalidator<DraggableGsapOptionsStore>): Unsubscriber;
}
Hierarchy

Accessors

  • set inertiaDuration(duration): void
  • Parameters

    • duration: {
          max: number;
          min: number;
      }

      Set inertia duration min & max.

      • max: number
      • min: number

    Returns void

  • get inertiaDurationMax(): number
  • Returns number

    Get inertia duration max time (seconds)

  • set inertiaDurationMax(max): void
  • Parameters

    • max: number

      Set inertia duration max.

    Returns void

  • get inertiaDurationMin(): number
  • Returns number

    Get inertia duration min time (seconds)

  • set inertiaDurationMin(min): void
  • Parameters

    • min: number

      Set inertia duration min.

    Returns void

  • get inertiaResistance(): number
  • Returns number

    Get inertia resistance (1000 is default).

  • set inertiaResistance(resistance): void
  • Parameters

    • resistance: number

      Set inertia resistance. Default: 1000

    Returns void

  • get inertiaVelocityScale(): number
  • Returns number

    Get inertia velocity scale.

  • set inertiaVelocityScale(velocityScale): void
  • Parameters

    • velocityScale: number

      Set inertia velocity scale.

    Returns void

  • get tweenDuration(): number
  • Returns number

    Get ease duration

  • set tweenDuration(duration): void
  • Parameters

    • duration: number

      Set ease duration.

    Returns void

  • get tweenEase(): string | Function
  • Returns string | Function

    Get easing function value.

  • set tweenEase(value): void
  • Parameters

    • value: string | Function

      Get easing function value.

    Returns void

Methods

  • Resets all options data to initial values.

    Returns void

  • Resets inertia enabled state to initial value.

    Returns void

  • Resets inertia options to initial values.

    Returns void

  • Resets tween enabled state to initial value.

    Returns void

  • Resets tween options to initial values.

    Returns void

Properties

inertia: boolean

Inertia enabled state.

inertiaOptions: GsapInertiaOptions

Inertia options.

tween: boolean

Tweening enabled state.

tweenOptions: GsapTweenOptions

GSAP tween options for easing function and duration.