1 | /// <reference types="react" />
|
2 | import type { PanGestureHandlerEventPayload } from './GestureHandlerEventPayload';
|
3 | import { BaseGestureHandlerProps } from './gestureHandlerCommon';
|
4 | export declare const panGestureHandlerProps: readonly ["activeOffsetY", "activeOffsetX", "failOffsetY", "failOffsetX", "minDist", "minVelocity", "minVelocityX", "minVelocityY", "minPointers", "maxPointers", "avgTouches", "enableTrackpadTwoFingerGesture", "activateAfterLongPress"];
|
5 | export declare const panGestureHandlerCustomNativeProps: readonly ["activeOffsetYStart", "activeOffsetYEnd", "activeOffsetXStart", "activeOffsetXEnd", "failOffsetYStart", "failOffsetYEnd", "failOffsetXStart", "failOffsetXEnd"];
|
6 | interface CommonPanProperties {
|
7 | /**
|
8 | * Minimum distance the finger (or multiple finger) need to travel before the
|
9 | * handler activates. Expressed in points.
|
10 | */
|
11 | minDist?: number;
|
12 | /**
|
13 | * Android only.
|
14 | */
|
15 | avgTouches?: boolean;
|
16 | /**
|
17 | * Enables two-finger gestures on supported devices, for example iPads with
|
18 | * trackpads. If not enabled the gesture will require click + drag, with
|
19 | * enableTrackpadTwoFingerGesture swiping with two fingers will also trigger
|
20 | * the gesture.
|
21 | */
|
22 | enableTrackpadTwoFingerGesture?: boolean;
|
23 | /**
|
24 | * A number of fingers that is required to be placed before handler can
|
25 | * activate. Should be a higher or equal to 0 integer.
|
26 | */
|
27 | minPointers?: number;
|
28 | /**
|
29 | * When the given number of fingers is placed on the screen and handler hasn't
|
30 | * yet activated it will fail recognizing the gesture. Should be a higher or
|
31 | * equal to 0 integer.
|
32 | */
|
33 | maxPointers?: number;
|
34 | minVelocity?: number;
|
35 | minVelocityX?: number;
|
36 | minVelocityY?: number;
|
37 | activateAfterLongPress?: number;
|
38 | }
|
39 | export interface PanGestureConfig extends CommonPanProperties {
|
40 | activeOffsetYStart?: number;
|
41 | activeOffsetYEnd?: number;
|
42 | activeOffsetXStart?: number;
|
43 | activeOffsetXEnd?: number;
|
44 | failOffsetYStart?: number;
|
45 | failOffsetYEnd?: number;
|
46 | failOffsetXStart?: number;
|
47 | failOffsetXEnd?: number;
|
48 | }
|
49 | export interface PanGestureHandlerProps extends BaseGestureHandlerProps<PanGestureHandlerEventPayload>, CommonPanProperties {
|
50 | /**
|
51 | * Range along X axis (in points) where fingers travels without activation of
|
52 | * handler. Moving outside of this range implies activation of handler. Range
|
53 | * can be given as an array or a single number. If range is set as an array,
|
54 | * first value must be lower or equal to 0, a the second one higher or equal
|
55 | * to 0. If only one number `p` is given a range of `(-inf, p)` will be used
|
56 | * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.
|
57 | */
|
58 | activeOffsetY?: number | [activeOffsetYStart: number, activeOffsetYEnd: number];
|
59 | /**
|
60 | * Range along X axis (in points) where fingers travels without activation of
|
61 | * handler. Moving outside of this range implies activation of handler. Range
|
62 | * can be given as an array or a single number. If range is set as an array,
|
63 | * first value must be lower or equal to 0, a the second one higher or equal
|
64 | * to 0. If only one number `p` is given a range of `(-inf, p)` will be used
|
65 | * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.
|
66 | */
|
67 | activeOffsetX?: number | [activeOffsetXStart: number, activeOffsetXEnd: number];
|
68 | /**
|
69 | * When the finger moves outside this range (in points) along Y axis and
|
70 | * handler hasn't yet activated it will fail recognizing the gesture. Range
|
71 | * can be given as an array or a single number. If range is set as an array,
|
72 | * first value must be lower or equal to 0, a the second one higher or equal
|
73 | * to 0. If only one number `p` is given a range of `(-inf, p)` will be used
|
74 | * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.
|
75 | */
|
76 | failOffsetY?: number | [failOffsetYStart: number, failOffsetYEnd: number];
|
77 | /**
|
78 | * When the finger moves outside this range (in points) along X axis and
|
79 | * handler hasn't yet activated it will fail recognizing the gesture. Range
|
80 | * can be given as an array or a single number. If range is set as an array,
|
81 | * first value must be lower or equal to 0, a the second one higher or equal
|
82 | * to 0. If only one number `p` is given a range of `(-inf, p)` will be used
|
83 | * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.
|
84 | */
|
85 | failOffsetX?: number | [failOffsetXStart: number, failOffsetXEnd: number];
|
86 | }
|
87 | export declare const panHandlerName = "PanGestureHandler";
|
88 | export type PanGestureHandler = typeof PanGestureHandler;
|
89 | export declare const PanGestureHandler: import("react").ComponentType<PanGestureHandlerProps & import("react").RefAttributes<any>>;
|
90 | export declare function managePanProps(props: PanGestureHandlerProps): PanGestureHandlerProps & Partial<Record<"failOffsetXStart" | "failOffsetYStart" | "failOffsetXEnd" | "failOffsetYEnd" | "activeOffsetXStart" | "activeOffsetXEnd" | "activeOffsetYStart" | "activeOffsetYEnd", number>>;
|
91 | export {};
|