You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At any given time, each handler instance has an assigned [state](/docs/under-the-hood/state) that can change when new touch events occur or can be forced to change by the touch system in certain circumstances. You can hook into state transitions using specific [gesture callbacks](#callbacks).
12
12
@@ -103,30 +103,35 @@ Called when there will be no more information about this pointer. It may be call
103
103
104
104
### GestureEvent
105
105
106
-
<CodeWithTypes
107
-
srcCode={`
106
+
<CollapsibleCode
107
+
label="Show composed types definitions"
108
+
expandedLabel="Hide composed types definitions"
109
+
lineBounds={[0, 4]}
110
+
src={`
108
111
export type GestureEvent<HandlerData> = {
109
112
handlerTag: number;
110
113
numberOfPointers: number;
111
114
pointerType: PointerType;
112
115
} & HandlerData;
113
-
`}
114
-
srcDetails={`
116
+
115
117
export enum PointerType {
116
118
TOUCH,
117
119
STYLUS,
118
120
MOUSE,
119
121
KEY,
120
122
OTHER,
121
-
}`}
122
-
/>
123
+
}
124
+
`}/>
123
125
124
126
`GestureEvent` contains properties common to all gestures (`handlerTag`, `numberOfPointers`, `pointerType`) along with gesture-specific data defined in each gesture's documentation.
125
127
126
128
### TouchEvent
127
129
128
-
<CodeWithTypes
129
-
srcCode={`
130
+
<CollapsibleCode
131
+
label="Show composed types definitions"
132
+
expandedLabel="Hide composed types definitions"
133
+
lineBounds={[0, 8]}
134
+
src={`
130
135
export type GestureTouchEvent = {
131
136
handlerTag: number;
132
137
numberOfTouches: number;
@@ -136,8 +141,7 @@ export type GestureTouchEvent = {
136
141
changedTouches: TouchData[];
137
142
pointerType: PointerType;
138
143
};
139
-
`}
140
-
srcDetails={`
144
+
141
145
export const State = {
142
146
UNDETERMINED: 0,
143
147
FAILED: 1,
@@ -170,7 +174,6 @@ export enum PointerType {
170
174
KEY,
171
175
OTHER,
172
176
}
173
-
`}
174
-
/>
177
+
`}/>
175
178
176
179
`TouchEvent` carries information about raw touch events, like touching the screen or moving the finger.
0 commit comments