UNPKG

1.29 kBTypeScriptView Raw
1import { DomController } from '../platform/dom-controller';
2import { GestureDelegate } from './gesture-controller';
3import { Platform } from '../platform/platform';
4/**
5 * @hidden
6 */
7export declare class PanGesture {
8 plt: Platform;
9 private element;
10 private debouncer;
11 private events;
12 private pointerEvents;
13 private detector;
14 protected started: boolean;
15 private captured;
16 isListening: boolean;
17 protected gestute: GestureDelegate;
18 protected direction: string;
19 private eventsConfig;
20 constructor(plt: Platform, element: HTMLElement, opts?: PanGestureConfig);
21 listen(): void;
22 unlisten(): void;
23 destroy(): void;
24 pointerDown(ev: any): boolean;
25 pointerMove(ev: any): void;
26 pointerUp(ev: any): void;
27 tryToCapture(ev: any): boolean;
28 abort(ev: any): void;
29 getNativeElement(): HTMLElement;
30 canStart(_ev: any): boolean;
31 onDragStart(_ev: any): void;
32 onDragMove(_ev: any): void;
33 onDragEnd(_ev: any): void;
34 notCaptured(_ev: any): void;
35}
36/**
37 * @hidden
38 */
39export interface PanGestureConfig {
40 threshold?: number;
41 maxAngle?: number;
42 direction?: 'x' | 'y';
43 gesture?: GestureDelegate;
44 domController?: DomController;
45 zone?: boolean;
46 capture?: boolean;
47 passive?: boolean;
48}