Interface DraggableGsapOptionsStore
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;
}
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
- Readable<DraggableGsapOptionsStore>
- DraggableGsapOptionsStore (view full)
Accessors
inertiaDuration
- set inertiaDuration(duration): void
Parameters
- duration: {
max: number;
min: number;
}Set inertia duration min & max.
max: number
min: number
Returns void
- duration: {
inertiaDurationMax
- get inertiaDurationMax(): number
Returns number
Get inertia duration max time (seconds)
- set inertiaDurationMax(max): 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): 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): 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): void
Parameters
- velocityScale: number
Set inertia velocity scale.
Returns void
- velocityScale: number
tweenDuration
- get tweenDuration(): number
Returns number
Get ease duration
- set tweenDuration(duration): void
Parameters
- duration: number
Set ease duration.
Returns void
- duration: number
tweenEase
Methods
reset
resetInertia
resetInertiaOptions
resetTween
resetTweenOptions
subscribe
- subscribe(this, run, invalidate?): 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.