1# Bound Gesture Configuration
2
3You can set the gestures that are bound to a component. Specifically, you can add or remove gestures by calling the APIs of the **UIGestureEvent** object.
4
5>**NOTE**
6>
7>The initial APIs of this module are supported since API version 12. Newly added APIs will be marked with a superscript to indicate their earliest API version.
8
9## UIGestureEvent
10
11Provides APIs for configuring gestures bound to a component.
12
13### addGesture
14
15addGesture(gesture: GestureHandler\<T>, priority?: GesturePriority, mask?: GestureMask): void
16
17Adds a gesture.
18
19**Atomic service API**: This API can be used in atomic services since API version 12.
20
21**Parameters**
22
23| Name| Type  | Mandatory| Description                      |
24| ------ | ------ | ---- | -------------------------- |
25| gesture  |  [GestureHandler\<T>](#gesturehandlert) | Yes  | Gesture handler object.|
26| priority  |  [GesturePriority](#gesturepriority) | No  | Priority of the bound gesture.|
27| mask  |  [GestureMask](./ts-gesture-settings.md#gesturemask) | No  | Mask for gesture events.|
28
29### addParallelGesture
30
31addParallelGesture(gesture: GestureHandler\<T>, mask?: GestureMask): void
32
33Adds a gesture that can be recognized at once by the component and its child component.
34
35**Atomic service API**: This API can be used in atomic services since API version 12.
36
37**Parameters**
38
39| Name| Type  | Mandatory| Description                      |
40| ------ | ------ | ---- | -------------------------- |
41| gesture  |  [GestureHandler\<T>](#gesturehandlert) | Yes  | Gesture handler object.|
42| mask  |  [GestureMask](./ts-gesture-settings.md#gesturemask) | No  | Mask for gesture events.|
43
44### removeGestureByTag
45
46removeGestureByTag(tag: string): void
47
48Remove a gesture from a component that has been bound with a specific tag through a modifier.
49
50**Atomic service API**: This API can be used in atomic services since API version 12.
51
52**Parameters**
53
54| Name| Type  | Mandatory| Description                      |
55| ------ | ------ | ---- | -------------------------- |
56| tag  |  string | Yes  | Gesture processor flag.|
57
58### clearGestures
59
60clearGestures(): void
61
62Clears all gestures that have been bound to the component through a modifier.
63
64**Atomic service API**: This API can be used in atomic services since API version 12.
65
66## GestureHandler\<T>
67
68Defines the basic type of the gesture handler.
69
70### tag
71
72tag(tag: string): T
73
74Sets the tag for the gesture handler.
75
76**Atomic service API**: This API can be used in atomic services since API version 12.
77
78**Parameters**
79
80| Name| Type| Mandatory|Description                                       |
81| ----  | ------  | ------|---------------------------------- |
82| tag   | string  | Yes|Tag of the gesture handler.|
83
84## TapGestureHandler
85
86Defines a type of gesture handler object for tap gestures.
87
88### constructor
89
90constructor(options?: TapGestureHandlerOptions)
91
92A constructor used to create a **TapGestureHandler** object.
93
94**Atomic service API**: This API can be used in atomic services since API version 12.
95
96**Parameters**
97
98| Name | Type                                                        | Mandatory| Description              |
99| ------- | ------------------------------------------------------------ | ---- | ------------------ |
100| options | [TapGestureHandlerOptions](#tapgesturehandleroptions) | No  | Parameters of the tap gesture handler.|
101
102### onAction
103
104onAction(event: Callback\<GestureEvent>): TapGestureHandler
105
106Invoked when a tap gesture is recognized.
107
108**Atomic service API**: This API can be used in atomic services since API version 12.
109
110**System capability**: SystemCapability.ArkUI.ArkUI.Full
111
112**Parameters**
113
114| Name| Type                             | Mandatory| Description                |
115| ------ | --------------------------------- | ---- | -------------------- |
116| event  | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked when a tap gesture is recognized.|
117
118**Return value**
119
120| Type| Description|
121| -------- | -------- |
122| TapGestureHandler | Tap gesture handler object.|
123
124## TapGestureHandlerOptions
125
126Provides the parameters of the tap gesture handler.
127
128**Atomic service API**: This API can be used in atomic services since API version 12.
129
130**System capability**: SystemCapability.ArkUI.ArkUI.Full
131
132| Attributes        | Type                                  | Mandatory| Description                |
133| ------------ | -------------------------------------- | ---- | -------------------- |
134| count | number | No| Number of consecutive taps. If the value is less than 1 or is not set, the default value is used.<br>Default value: **1**<br>**NOTE**<br>1. If multi-tap is configured, the timeout interval between a lift and the next tap is 300 ms.<br>2. If the distance between the last tapped position and the current tapped position exceeds 60 vp, gesture recognition fails.|
135| fingers | number | No| Number of fingers required to trigger a tap. The value ranges from 1 to 10. If the value is less than 1 or is not set, the default value is used.<br>Default value: **1**<br>**NOTE**<br>1. If the value is greater than 1, the tap gesture will fail to be recognized when the number of fingers pressing the screen within 300 ms of the first finger's being pressed is less than the required number, or when the number of fingers lifted from the screen within 300 ms of the first finger's being lifted is less than the required number.<br>2. When the number of fingers touching the screen exceeds the set value, the gesture can be recognized.|
136
137## LongPressGestureHandler
138
139Defines a type of gesture handler object for long press gestures.
140
141### constructor
142
143constructor(options?: LongPressGestureHandlerOptions)
144
145A constructor used to create a **LongPressGestureHandler** object.
146
147**Atomic service API**: This API can be used in atomic services since API version 12.
148
149**Parameters**
150
151
152| Name | Type                                                        | Mandatory| Description              |
153| ------- | ------------------------------------------------------------ | ---- | ------------------ |
154| options | [LongPressGestureHandlerOptions](#longpressgesturehandleroptions) | No  | Parameters of the long press gesture handler.|
155
156### onAction
157
158onAction(event: Callback\<GestureEvent>): LongPressGestureHandler
159
160Invoked when a long press gesture is recognized.
161
162**Atomic service API**: This API can be used in atomic services since API version 12.
163
164**System capability**: SystemCapability.ArkUI.ArkUI.Full
165
166**Parameters**
167
168| Name| Type                             | Mandatory| Description                |
169| ------ | --------------------------------- | ---- | -------------------- |
170| event  | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked when a long press gesture is recognized.|
171
172**Return value**
173
174| Type| Description|
175| -------- | -------- |
176| LongPressGestureHandler | Long press gesture handler object.|
177
178### onActionEnd
179
180onActionEnd(event: Callback\<GestureEvent>): LongPressGestureHandler
181
182Invoked when the last finger is lifted after the long press gesture is recognized.
183
184**Atomic service API**: This API can be used in atomic services since API version 12.
185
186**System capability**: SystemCapability.ArkUI.ArkUI.Full
187
188**Parameters**
189
190| Name| Type                             | Mandatory| Description                |
191| ------ | --------------------------------- | ---- | -------------------- |
192| event  | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked when the last finger is lifted after the long press gesture is recognized.|
193
194**Return value**
195
196| Type| Description|
197| -------- | -------- |
198| LongPressGestureHandler | Long press gesture handler object.|
199
200### onActionCancel
201
202onActionCancel(event: Callback\<void>): LongPressGestureHandler
203
204Invoked when a tap cancellation event is received after a long press gesture is recognized.
205
206**Atomic service API**: This API can be used in atomic services since API version 12.
207
208**System capability**: SystemCapability.ArkUI.ArkUI.Full
209
210**Parameters**
211
212| Name| Type                             | Mandatory| Description                |
213| ------ | --------------------------------- | ---- | -------------------- |
214| event  | [Callback](./ts-types.md#callback12)\<void> | Yes| Callback invoked when a tap cancellation event is received after a long press gesture is recognized.|
215
216**Return value**
217
218| Type| Description|
219| -------- | -------- |
220| LongPressGestureHandler | Long press gesture handler object.|
221
222## LongPressGestureHandlerOptions
223
224Provides the parameters of the long press gesture handler.
225
226**Atomic service API**: This API can be used in atomic services since API version 12.
227
228**System capability**: SystemCapability.ArkUI.ArkUI.Full
229
230| Attributes        | Type                                  | Mandatory| Description                |
231| ------------ | -------------------------------------- | ---- | -------------------- |
232| fingers | number | No| Minimum number of fingers to trigger a long press gesture. The value ranges from 1 to 10.<br>Default value: **1**<br> **NOTE**<br>If a finger moves more than 15 px after being pressed, the gesture recognition fails.|
233| repeat | boolean | No| Whether to continuously trigger the event callback.<br>Default value: **false**|
234| duration | number | No| Minimum hold-down time, in ms.<br>Default value: **500**<br>**NOTE**<br>If the value is less than or equal to 0, the default value <b>500</b> is used.|
235
236## PanGestureHandler
237
238Defines a type of gesture handler object for pan gestures.
239
240### constructor
241
242constructor(options?: PanGestureHandlerOptions)
243
244A constructor used to create a **PanGestureHandler** object.
245
246**Atomic service API**: This API can be used in atomic services since API version 12.
247
248**Parameters**
249
250
251| Name | Type                                                        | Mandatory| Description              |
252| ------- | ------------------------------------------------------------ | ---- | ------------------ |
253| options | [PanGestureHandlerOptions](#pangesturehandleroptions) | No  | Parameters of the pan gesture handler.|
254
255### onActionStart
256
257onActionStart(event: Callback\<GestureEvent>): PanGestureHandler
258
259Invoked when a pan gesture is recognized.
260
261**Atomic service API**: This API can be used in atomic services since API version 12.
262
263**System capability**: SystemCapability.ArkUI.ArkUI.Full
264
265**Parameters**
266
267| Name| Type                             | Mandatory| Description                |
268| ------ | --------------------------------- | ---- | -------------------- |
269| event  | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked when a pan gesture is recognized.|
270
271**Return value**
272
273| Type| Description|
274| -------- | -------- |
275| PanGestureHandler | Pan gesture handler object.|
276
277### onActionUpdate
278
279onActionUpdate(event: Callback\<GestureEvent>): PanGestureHandler
280
281Invoked during the movement of a pan gesture.
282
283**Atomic service API**: This API can be used in atomic services since API version 12.
284
285**System capability**: SystemCapability.ArkUI.ArkUI.Full
286
287**Parameters**
288
289| Name| Type                             | Mandatory| Description                |
290| ------ | --------------------------------- | ---- | -------------------- |
291| event  | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked during the movement of a pan gesture.<br>If **fingerList** contains multiple fingers, this callback updates the location information of only one finger each time.|
292
293**Return value**
294
295| Type| Description|
296| -------- | -------- |
297| PanGestureHandler | Pan gesture handler object.|
298
299### onActionEnd
300
301onActionEnd(event: Callback\<GestureEvent>): PanGestureHandler
302
303Invoked when the finger used for a pan gesture is lifted.
304
305**Atomic service API**: This API can be used in atomic services since API version 12.
306
307**System capability**: SystemCapability.ArkUI.ArkUI.Full
308
309**Parameters**
310
311| Name| Type                             | Mandatory| Description                |
312| ------ | --------------------------------- | ---- | -------------------- |
313| event  | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked when the finger used for a pan gesture is lifted.|
314
315**Return value**
316
317| Type| Description|
318| -------- | -------- |
319| PanGestureHandler | Pan gesture handler object.|
320
321### onActionCancel
322
323onActionCancel(event: Callback\<void>): PanGestureHandler
324
325Invoked when a tap cancellation event is received after a pan gesture is recognized.
326
327**Atomic service API**: This API can be used in atomic services since API version 12.
328
329**System capability**: SystemCapability.ArkUI.ArkUI.Full
330
331**Parameters**
332
333| Name| Type                             | Mandatory| Description                |
334| ------ | --------------------------------- | ---- | -------------------- |
335| event  | [Callback](./ts-types.md#callback12)\<void> | Yes| Callback invoked when a tap cancellation event is received after a pan gesture is recognized.|
336
337**Return value**
338
339| Type| Description|
340| -------- | -------- |
341| PanGestureHandler | Pan gesture handler object.|
342
343## PanGestureHandlerOptions
344
345Provides the parameters of the pan gesture handler.
346
347**Atomic service API**: This API can be used in atomic services since API version 12.
348
349**System capability**: SystemCapability.ArkUI.ArkUI.Full
350
351| Attributes        | Type                                  | Mandatory| Description                |
352| ------------ | -------------------------------------- | ---- | -------------------- |
353| fingers | number | No| Minimum number of fingers to trigger a pan gesture. The value ranges from 1 to 10.<br>Default value: **1**<br>Value range: [1, 10]<br>**NOTE**<br>If the value is less than 1 or is not set, the default value is used.|
354| direction | [PanDirection](./ts-basic-gestures-pangesture.md#pandirection) | No| Pan direction. The value supports the AND (&amp;) and OR (\|) operations.<br>Default value: **PanDirection.All**|
355| distance | number | No| Minimum pan distance to trigger the gesture, in vp.<br>Default value: **5**<br>**NOTE**<br>If a pan gesture and a [tab](ts-container-tabs.md) swipe occur at the same time, set **distance** to **1** so that the gesture can be more easily recognized.<br>If the value specified is less than **0**, the default value **5** is used.|
356
357## SwipeGestureHandler
358
359Defines a type of gesture handler object for swipe gestures.
360
361### constructor
362
363constructor(options?: SwipeGestureHandlerOptions)
364
365A constructor used to create a **SwipeGestureHandler** object.
366
367**Atomic service API**: This API can be used in atomic services since API version 12.
368
369**Parameters**
370
371| Name | Type                                                        | Mandatory| Description              |
372| ------- | ------------------------------------------------------------ | ---- | ------------------ |
373| options | [SwipeGestureHandlerOptions](#swipegesturehandleroptions) | No  | Parameters of the swipe gesture handler.|
374
375### onAction
376
377onAction(event: Callback\<GestureEvent>): SwipeGestureHandlerOptions
378
379Invoked when a swipe gesture is recognized.
380
381**Atomic service API**: This API can be used in atomic services since API version 12.
382
383**System capability**: SystemCapability.ArkUI.ArkUI.Full
384
385**Parameters**
386
387| Name| Type                             | Mandatory| Description                |
388| ------ | --------------------------------- | ---- | -------------------- |
389| event  | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked when a swipe gesture is recognized.|
390
391**Return value**
392
393| Type| Description|
394| -------- | -------- |
395| SwipeGestureHandler | Swipe gesture handler object.|
396
397## SwipeGestureHandlerOptions
398
399Provides the parameters of the swipe gesture handler.
400
401**Atomic service API**: This API can be used in atomic services since API version 12.
402
403**System capability**: SystemCapability.ArkUI.ArkUI.Full
404
405| Attributes        | Type                                  | Mandatory| Description                |
406| ------------ | -------------------------------------- | ---- | -------------------- |
407| fingers | number | No| Minimum number of fingers to trigger a swipe gesture. The value ranges from 1 to 10.<br>Default value: **1**|
408| direction | [SwipeDirection](./ts-basic-gestures-swipegesture.md#swipedirection) | No| Swipe direction.<br>Default value: **SwipeDirection.All**|
409| speed | number | No| Minimum speed of the swipe gesture.<br>Default value: 100 vp/s<br>**NOTE**<br>If the value is less than or equal to 0, it will be converted to the default value.|
410
411## PinchGestureHandler
412
413Defines a type of gesture handler object for pinch gestures.
414
415### constructor
416
417constructor(options?: PinchGestureHandlerOptions)
418
419A constructor used to create a **PinchGestureHandler** object.
420
421**Atomic service API**: This API can be used in atomic services since API version 12.
422
423**Parameters**
424
425
426| Name | Type                                                        | Mandatory| Description              |
427| ------- | ------------------------------------------------------------ | ---- | ------------------ |
428| options | [PinchGestureHandlerOptions](#pinchgesturehandleroptions) | No  | Parameters of the pinch gesture handler.|
429
430### onActionStart
431
432onActionStart(event: Callback\<GestureEvent>): PinchGestureHandler
433
434Invoked when a pinch gesture is recognized.
435
436**Atomic service API**: This API can be used in atomic services since API version 12.
437
438**System capability**: SystemCapability.ArkUI.ArkUI.Full
439
440**Parameters**
441
442| Name| Type                             | Mandatory| Description                |
443| ------ | --------------------------------- | ---- | -------------------- |
444| event  | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked when a pinch gesture is recognized.|
445
446**Return value**
447
448| Type| Description|
449| -------- | -------- |
450| PinchGestureHandler | Pinch gesture handler object.|
451
452### onActionUpdate
453
454onActionUpdate(event: Callback\<GestureEvent>): PinchGestureHandler
455
456Invoked during the movement of a pinch gesture.
457
458**Atomic service API**: This API can be used in atomic services since API version 12.
459
460**System capability**: SystemCapability.ArkUI.ArkUI.Full
461
462**Parameters**
463
464| Name| Type                             | Mandatory| Description                |
465| ------ | --------------------------------- | ---- | -------------------- |
466| event  | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked during the movement of a pinch gesture.|
467
468**Return value**
469
470| Type| Description|
471| -------- | -------- |
472| PinchGestureHandler | Pinch gesture handler object.|
473
474### onActionEnd
475
476onActionEnd(event: Callback\<GestureEvent>): PinchGestureHandler
477
478Invoked when the finger used for a pinch gesture is lifted.
479
480**Atomic service API**: This API can be used in atomic services since API version 12.
481
482**System capability**: SystemCapability.ArkUI.ArkUI.Full
483
484**Parameters**
485
486| Name| Type                             | Mandatory| Description                |
487| ------ | --------------------------------- | ---- | -------------------- |
488| event  | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked when the finger used for a pinch gesture is lifted.|
489
490**Return value**
491
492| Type| Description|
493| -------- | -------- |
494| PinchGestureHandler | Pinch gesture handler object.|
495
496### onActionCancel
497
498onActionCancel(event: Callback\<void>): PinchGestureHandler
499
500Invoked when a tap cancellation event is received after a pinch gesture is recognized.
501
502**Atomic service API**: This API can be used in atomic services since API version 12.
503
504**System capability**: SystemCapability.ArkUI.ArkUI.Full
505
506**Parameters**
507
508| Name| Type                             | Mandatory| Description                |
509| ------ | --------------------------------- | ---- | -------------------- |
510| event  | [Callback](./ts-types.md#callback12)\<void> | Yes| Callback invoked when a tap cancellation event is received after a pinch gesture is recognized.|
511
512**Return value**
513
514| Type| Description|
515| -------- | -------- |
516| PinchGestureHandler | Pan gesture handler object.|
517
518## PinchGestureHandlerOptions
519
520Provides the parameters of the pinch gesture handler.
521
522**Atomic service API**: This API can be used in atomic services since API version 12.
523
524**System capability**: SystemCapability.ArkUI.ArkUI.Full
525
526| Attributes        | Type                                  | Mandatory| Description                |
527| ------------ | -------------------------------------- | ---- | -------------------- |
528| fingers | number | No| Minimum number of fingers to trigger a pinch. The value ranges from 2 to 5.<br>Default value: **2**<br>While more fingers than the minimum number can be pressed to trigger the gesture, only the first fingers of the minimum number participate in gesture calculation.|
529| distance | number | No| Minimum recognition distance, in vp.<br>Default value: **5**<br>**NOTE**<br> If the value is less than or equal to 0, it will be converted to the default value.|
530
531## RotationGestureHandler
532
533Defines a type of gesture handler object for rotation gestures.
534
535### constructor
536
537constructor(options?: RotationGestureHandlerOptions)
538
539A constructor used to create a **RotationGestureHandler** object.
540
541**Atomic service API**: This API can be used in atomic services since API version 12.
542
543**Parameters**
544
545
546| Name | Type                                                        | Mandatory| Description              |
547| ------- | ------------------------------------------------------------ | ---- | ------------------ |
548| options | [RotationGestureHandlerOptions](#rotationgesturehandleroptions) | No  | Parameters of the rotation gesture handler.|
549
550### onActionStart
551
552onActionStart(event: Callback\<GestureEvent>): RotationGestureHandler
553
554Invoked when a rotation gesture is recognized.
555
556**Atomic service API**: This API can be used in atomic services since API version 12.
557
558**System capability**: SystemCapability.ArkUI.ArkUI.Full
559
560**Parameters**
561
562| Name| Type                             | Mandatory| Description                |
563| ------ | --------------------------------- | ---- | -------------------- |
564| event  | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked when a rotation gesture is recognized.|
565
566**Return value**
567
568| Type| Description|
569| -------- | -------- |
570| RotationGestureHandler | Pan gesture handler object.|
571
572### onActionUpdate
573
574onActionUpdate(event: Callback\<GestureEvent>): RotationGestureHandler
575
576Invoked during the movement of the rotation gesture.
577
578**Atomic service API**: This API can be used in atomic services since API version 12.
579
580**System capability**: SystemCapability.ArkUI.ArkUI.Full
581
582**Parameters**
583
584| Name| Type                             | Mandatory| Description                |
585| ------ | --------------------------------- | ---- | -------------------- |
586| event  | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked during the movement of the rotation gesture.|
587
588**Return value**
589
590| Type| Description|
591| -------- | -------- |
592| RotationGestureHandler | Pan gesture handler object.|
593
594### onActionEnd
595
596onActionEnd(event: Callback\<GestureEvent>): RotationGestureHandler
597
598Invoked when the finger used for the rotation gesture is lifted.
599
600**Atomic service API**: This API can be used in atomic services since API version 12.
601
602**System capability**: SystemCapability.ArkUI.ArkUI.Full
603
604**Parameters**
605
606| Name| Type                             | Mandatory| Description                |
607| ------ | --------------------------------- | ---- | -------------------- |
608| event  | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked when the finger used for the rotation gesture is lifted.|
609
610**Return value**
611
612| Type| Description|
613| -------- | -------- |
614| RotationGestureHandler | Rotation gesture handler object.|
615
616### onActionCancel
617
618onActionCancel(event: Callback\<void>): RotationGestureHandler
619
620Invoked when a tap cancellation event is received after the rotation gesture is recognized.
621
622**Atomic service API**: This API can be used in atomic services since API version 12.
623
624**System capability**: SystemCapability.ArkUI.ArkUI.Full
625
626**Parameters**
627
628| Name| Type                             | Mandatory| Description                |
629| ------ | --------------------------------- | ---- | -------------------- |
630| event  | [Callback](./ts-types.md#callback12)\<void> | Yes| Callback invoked when a tap cancellation event is received after the rotation gesture is recognized.|
631
632**Return value**
633
634| Type| Description|
635| -------- | -------- |
636| RotationGestureHandler | Pan gesture handler object.|
637
638## RotationGestureHandlerOptions
639
640Provides the parameters of the rotation gesture handler.
641
642**Atomic service API**: This API can be used in atomic services since API version 12.
643
644**System capability**: SystemCapability.ArkUI.ArkUI.Full
645
646| Attributes        | Type                                  | Mandatory| Description                |
647| ------------ | -------------------------------------- | ---- | -------------------- |
648| fingers | number | No| Minimum number of fingers to trigger a rotation. The value ranges from 2 to 5.<br>Default value: **2**<br>While more fingers than the minimum number can be pressed to trigger the gesture, only the first two fingers participate in gesture calculation.|
649| angle | number | No| Minimum degree that can trigger the rotation gesture.<br>Default value: **1**<br>**NOTE**<br>If the value is less than or equal to 0 or greater than 360, it will be converted to the default value.|
650
651## GestureGroupHandler
652
653Defines a type of gesture handler object for gesture groups.
654
655### constructor
656
657constructor(options?: GestureGroupGestureHandlerOptions)
658
659A constructor used to create a **GestureGroupHandler** object.
660
661**Atomic service API**: This API can be used in atomic services since API version 12.
662
663**Parameters**
664
665| Name | Type                                                        | Mandatory| Description              |
666| ------- | ------------------------------------------------------------ | ---- | ------------------ |
667| options | [GestureGroupGestureHandlerOptions](#gesturegroupgesturehandleroptions) | No  | Parameters of the gesture group handler.|
668
669### onCancel
670
671onCancel(event: Callback\<void>): GestureGroupHandler
672
673Invoked when a cancellation event is received after the gesture group in sequential gesture recognition (**GestureMode.Sequence**) is recognized.
674
675**Atomic service API**: This API can be used in atomic services since API version 12.
676
677**System capability**: SystemCapability.ArkUI.ArkUI.Full
678
679**Parameters**
680
681| Name| Type                             | Mandatory| Description                |
682| ------ | --------------------------------- | ---- | -------------------- |
683| event  | [Callback](./ts-types.md#callback12)\<void> | Yes| Callback invoked when a cancellation event is received after the gesture group in sequential gesture recognition **GestureMode.Sequence**) is recognized.|
684
685**Return value**
686
687| Type| Description|
688| -------- | -------- |
689| GestureGroupHandler | Gesture group handler object.|
690
691## GestureGroupGestureHandlerOptions
692
693Provides the parameters of the gesture group handler.
694
695**Atomic service API**: This API can be used in atomic services since API version 12.
696
697**System capability**: SystemCapability.ArkUI.ArkUI.Full
698
699| Attributes        | Type                                  | Mandatory| Description                |
700| ------------ | -------------------------------------- | ---- | -------------------- |
701| mode    | [GestureMode](./ts-combined-gestures.md#gesturemode)                          | Yes  | Recognition mode of combined gestures.<br>Default value: **GestureMode.Sequence**     |
702| gestures | [GestureHandler](#gesturehandlert)\<[TapGestureHandler](#tapgesturehandler) \| [LongPressGestureHandler](#longpressgesturehandler) \| [PanGestureHandler](#pangesturehandler) \| [SwipeGestureHandler](#swipegesturehandler) \| [PinchGestureHandler](#pinchgesturehandler) \| [RotationGestureHandler](#rotationgesturehandler) \| [GestureGroupHandler](#gesturegrouphandler)>[] | Yes  | Gestures that need to be included in the gesture group.<br>**NOTE**<br>To add both tap and double-tap gestures for a component, add two TapGestures, with the tap gesture added after the double-tap gesture.|
703
704## GesturePriority
705
706**Atomic service API**: This API can be used in atomic services since API version 12.
707
708| Name| Description|
709| -------- | -------- |
710| NORMAL | Normal priority.|
711| PRIORITY | High priority.|
712
713## Example
714
715For details, see [Gesture Modifier](./ts-universal-attributes-gesture-modifier.md).
716