Interface DraggableGsapOptionsStore
interface DraggableGsapOptionsStore {
inertia: boolean;
inertiaOptions: GsapInertiaOptions;
tween: boolean;
tweenOptions: GsapTweenOptions;
set inertiaDuration(duration: { max: number; min: number }): void;
get inertiaDurationMax(): number;
set inertiaDurationMax(max: number): void;
get inertiaDurationMin(): number;
set inertiaDurationMin(min: number): void;
get inertiaEnd(): number | Function | any[];
set inertiaEnd(end: number | Function | any[]): void;
get inertiaResistance(): number;
set inertiaResistance(resistance: number): void;
get inertiaVelocityScale(): number;
set inertiaVelocityScale(velocityScale: number): void;
get tweenDuration(): number;
set tweenDuration(duration: number): void;
get tweenEase(): string | Function;
set tweenEase(value: string | Function): void;
reset(): void;
resetInertia(): void;
resetInertiaOptions(): void;
resetTween(): void;
resetTweenOptions(): void;
subscribe(
this: void,
run: Subscriber<DraggableGsapOptionsStore>,
invalidate?: Invalidator<DraggableGsapOptionsStore>,
): Unsubscriber;
}
inertia: boolean;
inertiaOptions: GsapInertiaOptions;
tween: boolean;
tweenOptions: GsapTweenOptions;
set inertiaDuration(duration: { max: number; min: number }): void;
get inertiaDurationMax(): number;
set inertiaDurationMax(max: number): void;
get inertiaDurationMin(): number;
set inertiaDurationMin(min: number): void;
get inertiaEnd(): number | Function | any[];
set inertiaEnd(end: number | Function | any[]): void;
get inertiaResistance(): number;
set inertiaResistance(resistance: number): void;
get inertiaVelocityScale(): number;
set inertiaVelocityScale(velocityScale: number): void;
get tweenDuration(): number;
set tweenDuration(duration: number): void;
get tweenEase(): string | Function;
set tweenEase(value: string | Function): void;
reset(): void;
resetInertia(): void;
resetInertiaOptions(): void;
resetTween(): void;
resetTweenOptions(): void;
subscribe(
this: void,
run: Subscriber<DraggableGsapOptionsStore>,
invalidate?: Invalidator<DraggableGsapOptionsStore>,
): Unsubscriber;
}
Hierarchy
- Readable<DraggableGsapOptionsStore>
- DraggableGsapOptionsStore (View Summary)
Accessors
inertiaDuration
- set inertiaDuration(duration: { max: number; min: number }): void
Parameters
- duration: { max: number; min: number }
Set inertia duration min & max.
Returns void
- duration: { max: number; min: number }
inertiaDurationMax
- get inertiaDurationMax(): number
Returns number
Get inertia duration max time (seconds)
- set inertiaDurationMax(max: number): void
Parameters
- max: number
Set inertia duration max.
Returns void
- max: number
inertiaDurationMin
- get inertiaDurationMin(): number
Returns number
Get inertia duration min time (seconds)
- set inertiaDurationMin(min: number): void
Parameters
- min: number
Set inertia duration min.
Returns void
- min: number
inertiaEnd
inertiaResistance
- get inertiaResistance(): number
Returns number
Get inertia resistance (1000 is default).
- set inertiaResistance(resistance: number): void
Parameters
- resistance: number
Set inertia resistance. Default: 1000
Returns void
- resistance: number
inertiaVelocityScale
- get inertiaVelocityScale(): number
Returns number
Get inertia velocity scale.
- set inertiaVelocityScale(velocityScale: number): void
Parameters
- velocityScale: number
Set inertia velocity scale.
Returns void
- velocityScale: number
tweenDuration
- get tweenDuration(): number
Returns number
Get ease duration
- set tweenDuration(duration: number): void
Parameters
- duration: number
Set ease duration.
Returns void
- duration: number
tweenEase
Methods
reset
resetInertia
resetInertiaOptions
resetTween
resetTweenOptions
subscribe
- subscribe(
this: void,
run: Subscriber<DraggableGsapOptionsStore>,
invalidate?: Invalidator<DraggableGsapOptionsStore>,
): Unsubscriber Subscribe on value changes.
Parameters
- this: void
- run: Subscriber<DraggableGsapOptionsStore>
subscription callback
Optional
invalidate: Invalidator<DraggableGsapOptionsStore>cleanup callback
Returns Unsubscriber
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.