material-motion
Version:
Makes it easy to add rich, interactive motion to your application.
29 lines (28 loc) • 1.53 kB
TypeScript
import { Axis, GestureRecognitionState, State } from '../enums';
import { MemorylessMotionSubject, MotionProperty } from '../observables';
import { ObservableWithMotionOperators, PartialPointerEvent, Point2D, PointerEventStreams } from '../types';
export declare class Draggable {
readonly state$: MotionProperty<State>;
readonly state: State;
readonly recognitionState$: MotionProperty<GestureRecognitionState>;
readonly recognitionState: GestureRecognitionState;
readonly recognitionThreshold$: MotionProperty<number>;
recognitionThreshold: number;
readonly axis$: MotionProperty<Axis>;
axis: Axis;
readonly cancellation$: MemorylessMotionSubject<any>;
cancel(): void;
readonly enabled$: MemorylessMotionSubject<boolean>;
enable(): void;
disable(): void;
readonly value$: ObservableWithMotionOperators<Point2D>;
readonly down$: ObservableWithMotionOperators<PartialPointerEvent>;
readonly move$: ObservableWithMotionOperators<PartialPointerEvent>;
readonly up$: ObservableWithMotionOperators<PartialPointerEvent>;
readonly cancel$: ObservableWithMotionOperators<PartialPointerEvent>;
readonly contextMenu$: ObservableWithMotionOperators<PartialPointerEvent>;
readonly capturedClick$: ObservableWithMotionOperators<MouseEvent>;
readonly capturedDragStart$: ObservableWithMotionOperators<DragEvent>;
constructor({down$, move$, up$, cancel$, contextMenu$, capturedClick$, capturedDragStart$}: PointerEventStreams);
}
export default Draggable;