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 handler 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### allowedTypes<sup>14+</sup> 85 86allowedTypes(types: Array\<SourceTool>): T 87 88Sets the event input sources supported by the gesture handler. 89 90**Atomic service API**: This API can be used in atomic services since API version 14. 91 92**System capability**: SystemCapability.ArkUI.ArkUI.Full 93 94**Parameters** 95 96| Name| Type| Mandatory|Description | 97| ---- | ------ | ------|---------------------------------- | 98| types | Array\<[SourceTool](ts-gesture-settings.md#sourcetool9)> | Yes|Event input sources supported by the gesture handler.| 99 100## TapGestureHandler 101 102Defines a type of gesture handler object for tap gestures. 103 104### constructor 105 106constructor(options?: TapGestureHandlerOptions) 107 108A constructor used to create a **TapGestureHandler** object. 109 110**Atomic service API**: This API can be used in atomic services since API version 12. 111 112**Parameters** 113 114| Name | Type | Mandatory| Description | 115| ------- | ------------------------------------------------------------ | ---- | ------------------ | 116| options | [TapGestureHandlerOptions](#tapgesturehandleroptions) | No | Parameters of the tap gesture handler.| 117 118### onAction 119 120onAction(event: Callback\<GestureEvent>): TapGestureHandler 121 122Invoked when a tap gesture is recognized. 123 124**Atomic service API**: This API can be used in atomic services since API version 12. 125 126**System capability**: SystemCapability.ArkUI.ArkUI.Full 127 128**Parameters** 129 130| Name| Type | Mandatory| Description | 131| ------ | --------------------------------- | ---- | -------------------- | 132| event | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked when a tap gesture is recognized.| 133 134**Return value** 135 136| Type| Description| 137| -------- | -------- | 138| TapGestureHandler | Tap gesture handler object.| 139 140## TapGestureHandlerOptions 141 142Provides the parameters of the tap gesture handler. 143 144**Atomic service API**: This API can be used in atomic services since API version 12. 145 146**System capability**: SystemCapability.ArkUI.ArkUI.Full 147 148| Attributes | Type | Mandatory| Description | 149| ------------ | -------------------------------------- | ---- | -------------------- | 150| 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.| 151| 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.| 152 153## LongPressGestureHandler 154 155Defines a type of gesture handler object for long press gestures. 156 157### constructor 158 159constructor(options?: LongPressGestureHandlerOptions) 160 161A constructor used to create a **LongPressGestureHandler** object. 162 163**Atomic service API**: This API can be used in atomic services since API version 12. 164 165**Parameters** 166 167 168| Name | Type | Mandatory| Description | 169| ------- | ------------------------------------------------------------ | ---- | ------------------ | 170| options | [LongPressGestureHandlerOptions](#longpressgesturehandleroptions) | No | Parameters of the long press gesture handler.| 171 172### onAction 173 174onAction(event: Callback\<GestureEvent>): LongPressGestureHandler 175 176Invoked when a long press gesture is recognized. 177 178**Atomic service API**: This API can be used in atomic services since API version 12. 179 180**System capability**: SystemCapability.ArkUI.ArkUI.Full 181 182**Parameters** 183 184| Name| Type | Mandatory| Description | 185| ------ | --------------------------------- | ---- | -------------------- | 186| event | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked when a long press gesture is recognized.| 187 188**Return value** 189 190| Type| Description| 191| -------- | -------- | 192| LongPressGestureHandler | Long press gesture handler object.| 193 194### onActionEnd 195 196onActionEnd(event: Callback\<GestureEvent>): LongPressGestureHandler 197 198Invoked when the last finger is lifted after the long press gesture is recognized. 199 200**Atomic service API**: This API can be used in atomic services since API version 12. 201 202**System capability**: SystemCapability.ArkUI.ArkUI.Full 203 204**Parameters** 205 206| Name| Type | Mandatory| Description | 207| ------ | --------------------------------- | ---- | -------------------- | 208| 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.| 209 210**Return value** 211 212| Type| Description| 213| -------- | -------- | 214| LongPressGestureHandler | Long press gesture handler object.| 215 216### onActionCancel 217 218onActionCancel(event: Callback\<void>): LongPressGestureHandler 219 220Invoked when a tap cancellation event is received after a long press gesture is recognized. 221 222**Atomic service API**: This API can be used in atomic services since API version 12. 223 224**System capability**: SystemCapability.ArkUI.ArkUI.Full 225 226**Parameters** 227 228| Name| Type | Mandatory| Description | 229| ------ | --------------------------------- | ---- | -------------------- | 230| event | [Callback](./ts-types.md#callback12)\<void> | Yes| Callback invoked when a tap cancellation event is received after a long press gesture is recognized.| 231 232**Return value** 233 234| Type| Description| 235| -------- | -------- | 236| LongPressGestureHandler | Long press gesture handler object.| 237 238## LongPressGestureHandlerOptions 239 240Provides the parameters of the long press gesture handler. 241 242**Atomic service API**: This API can be used in atomic services since API version 12. 243 244**System capability**: SystemCapability.ArkUI.ArkUI.Full 245 246| Attributes | Type | Mandatory| Description | 247| ------------ | -------------------------------------- | ---- | -------------------- | 248| 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.| 249| repeat | boolean | No| Whether to continuously trigger the event callback.<br>Default value: **false**| 250| 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.| 251 252## PanGestureHandler 253 254Defines a type of gesture handler object for pan gestures. 255 256### constructor 257 258constructor(options?: PanGestureHandlerOptions) 259 260A constructor used to create a **PanGestureHandler** object. 261 262**Atomic service API**: This API can be used in atomic services since API version 12. 263 264**Parameters** 265 266 267| Name | Type | Mandatory| Description | 268| ------- | ------------------------------------------------------------ | ---- | ------------------ | 269| options | [PanGestureHandlerOptions](#pangesturehandleroptions) | No | Parameters of the pan gesture handler.| 270 271### onActionStart 272 273onActionStart(event: Callback\<GestureEvent>): PanGestureHandler 274 275Invoked when a pan gesture is recognized. 276 277**Atomic service API**: This API can be used in atomic services since API version 12. 278 279**System capability**: SystemCapability.ArkUI.ArkUI.Full 280 281**Parameters** 282 283| Name| Type | Mandatory| Description | 284| ------ | --------------------------------- | ---- | -------------------- | 285| event | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked when a pan gesture is recognized.| 286 287**Return value** 288 289| Type| Description| 290| -------- | -------- | 291| PanGestureHandler | Pan gesture handler object.| 292 293### onActionUpdate 294 295onActionUpdate(event: Callback\<GestureEvent>): PanGestureHandler 296 297Invoked during the movement of a pan gesture. 298 299**Atomic service API**: This API can be used in atomic services since API version 12. 300 301**System capability**: SystemCapability.ArkUI.ArkUI.Full 302 303**Parameters** 304 305| Name| Type | Mandatory| Description | 306| ------ | --------------------------------- | ---- | -------------------- | 307| 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.| 308 309**Return value** 310 311| Type| Description| 312| -------- | -------- | 313| PanGestureHandler | Pan gesture handler object.| 314 315### onActionEnd 316 317onActionEnd(event: Callback\<GestureEvent>): PanGestureHandler 318 319Invoked when the finger used for a pan gesture is lifted. 320 321**Atomic service API**: This API can be used in atomic services since API version 12. 322 323**System capability**: SystemCapability.ArkUI.ArkUI.Full 324 325**Parameters** 326 327| Name| Type | Mandatory| Description | 328| ------ | --------------------------------- | ---- | -------------------- | 329| 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.| 330 331**Return value** 332 333| Type| Description| 334| -------- | -------- | 335| PanGestureHandler | Pan gesture handler object.| 336 337### onActionCancel 338 339onActionCancel(event: Callback\<void>): PanGestureHandler 340 341Invoked when a tap cancellation event is received after a pan gesture is recognized. 342 343**Atomic service API**: This API can be used in atomic services since API version 12. 344 345**System capability**: SystemCapability.ArkUI.ArkUI.Full 346 347**Parameters** 348 349| Name| Type | Mandatory| Description | 350| ------ | --------------------------------- | ---- | -------------------- | 351| event | [Callback](./ts-types.md#callback12)\<void> | Yes| Callback invoked when a tap cancellation event is received after a pan gesture is recognized.| 352 353**Return value** 354 355| Type| Description| 356| -------- | -------- | 357| PanGestureHandler | Pan gesture handler object.| 358 359## PanGestureHandlerOptions 360 361Provides the parameters of the pan gesture handler. 362 363**Atomic service API**: This API can be used in atomic services since API version 12. 364 365**System capability**: SystemCapability.ArkUI.ArkUI.Full 366 367| Attributes | Type | Mandatory| Description | 368| ------------ | -------------------------------------- | ---- | -------------------- | 369| 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.| 370| direction | [PanDirection](./ts-basic-gestures-pangesture.md#pandirection) | No| Pan direction. The value supports the AND (&) and OR (\|) operations.<br>Default value: **PanDirection.All**| 371| 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.| 372 373## SwipeGestureHandler 374 375Defines a type of gesture handler object for swipe gestures. 376 377### constructor 378 379constructor(options?: SwipeGestureHandlerOptions) 380 381A constructor used to create a **SwipeGestureHandler** object. 382 383**Atomic service API**: This API can be used in atomic services since API version 12. 384 385**Parameters** 386 387| Name | Type | Mandatory| Description | 388| ------- | ------------------------------------------------------------ | ---- | ------------------ | 389| options | [SwipeGestureHandlerOptions](#swipegesturehandleroptions) | No | Parameters of the swipe gesture handler.| 390 391### onAction 392 393onAction(event: Callback\<GestureEvent>): SwipeGestureHandlerOptions 394 395Invoked when a swipe gesture is recognized. 396 397**Atomic service API**: This API can be used in atomic services since API version 12. 398 399**System capability**: SystemCapability.ArkUI.ArkUI.Full 400 401**Parameters** 402 403| Name| Type | Mandatory| Description | 404| ------ | --------------------------------- | ---- | -------------------- | 405| event | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked when a swipe gesture is recognized.| 406 407**Return value** 408 409| Type| Description| 410| -------- | -------- | 411| SwipeGestureHandler | Swipe gesture handler object.| 412 413## SwipeGestureHandlerOptions 414 415Provides the parameters of the swipe gesture handler. 416 417**Atomic service API**: This API can be used in atomic services since API version 12. 418 419**System capability**: SystemCapability.ArkUI.ArkUI.Full 420 421| Attributes | Type | Mandatory| Description | 422| ------------ | -------------------------------------- | ---- | -------------------- | 423| fingers | number | No| Minimum number of fingers to trigger a swipe gesture. The value ranges from 1 to 10.<br>Default value: **1**| 424| direction | [SwipeDirection](./ts-basic-gestures-swipegesture.md#swipedirection) | No| Swipe direction.<br>Default value: **SwipeDirection.All**| 425| 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.| 426 427## PinchGestureHandler 428 429Defines a type of gesture handler object for pinch gestures. 430 431### constructor 432 433constructor(options?: PinchGestureHandlerOptions) 434 435A constructor used to create a **PinchGestureHandler** object. 436 437**Atomic service API**: This API can be used in atomic services since API version 12. 438 439**Parameters** 440 441 442| Name | Type | Mandatory| Description | 443| ------- | ------------------------------------------------------------ | ---- | ------------------ | 444| options | [PinchGestureHandlerOptions](#pinchgesturehandleroptions) | No | Parameters of the pinch gesture handler.| 445 446### onActionStart 447 448onActionStart(event: Callback\<GestureEvent>): PinchGestureHandler 449 450Invoked when a pinch gesture is recognized. 451 452**Atomic service API**: This API can be used in atomic services since API version 12. 453 454**System capability**: SystemCapability.ArkUI.ArkUI.Full 455 456**Parameters** 457 458| Name| Type | Mandatory| Description | 459| ------ | --------------------------------- | ---- | -------------------- | 460| event | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked when a pinch gesture is recognized.| 461 462**Return value** 463 464| Type| Description| 465| -------- | -------- | 466| PinchGestureHandler | Pinch gesture handler object.| 467 468### onActionUpdate 469 470onActionUpdate(event: Callback\<GestureEvent>): PinchGestureHandler 471 472Invoked during the movement of a pinch gesture. 473 474**Atomic service API**: This API can be used in atomic services since API version 12. 475 476**System capability**: SystemCapability.ArkUI.ArkUI.Full 477 478**Parameters** 479 480| Name| Type | Mandatory| Description | 481| ------ | --------------------------------- | ---- | -------------------- | 482| event | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked during the movement of a pinch gesture.| 483 484**Return value** 485 486| Type| Description| 487| -------- | -------- | 488| PinchGestureHandler | Pinch gesture handler object.| 489 490### onActionEnd 491 492onActionEnd(event: Callback\<GestureEvent>): PinchGestureHandler 493 494Invoked when the finger used for a pinch gesture is lifted. 495 496**Atomic service API**: This API can be used in atomic services since API version 12. 497 498**System capability**: SystemCapability.ArkUI.ArkUI.Full 499 500**Parameters** 501 502| Name| Type | Mandatory| Description | 503| ------ | --------------------------------- | ---- | -------------------- | 504| 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.| 505 506**Return value** 507 508| Type| Description| 509| -------- | -------- | 510| PinchGestureHandler | Pinch gesture handler object.| 511 512### onActionCancel 513 514onActionCancel(event: Callback\<void>): PinchGestureHandler 515 516Invoked when a tap cancellation event is received after a pinch gesture is recognized. 517 518**Atomic service API**: This API can be used in atomic services since API version 12. 519 520**System capability**: SystemCapability.ArkUI.ArkUI.Full 521 522**Parameters** 523 524| Name| Type | Mandatory| Description | 525| ------ | --------------------------------- | ---- | -------------------- | 526| event | [Callback](./ts-types.md#callback12)\<void> | Yes| Callback invoked when a tap cancellation event is received after a pinch gesture is recognized.| 527 528**Return value** 529 530| Type| Description| 531| -------- | -------- | 532| PinchGestureHandler | Pan gesture handler object.| 533 534## PinchGestureHandlerOptions 535 536Provides the parameters of the pinch gesture handler. 537 538**Atomic service API**: This API can be used in atomic services since API version 12. 539 540**System capability**: SystemCapability.ArkUI.ArkUI.Full 541 542| Attributes | Type | Mandatory| Description | 543| ------------ | -------------------------------------- | ---- | -------------------- | 544| 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.| 545| 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.| 546 547## RotationGestureHandler 548 549Defines a type of gesture handler object for rotation gestures. 550 551### constructor 552 553constructor(options?: RotationGestureHandlerOptions) 554 555A constructor used to create a **RotationGestureHandler** object. 556 557**Atomic service API**: This API can be used in atomic services since API version 12. 558 559**Parameters** 560 561 562| Name | Type | Mandatory| Description | 563| ------- | ------------------------------------------------------------ | ---- | ------------------ | 564| options | [RotationGestureHandlerOptions](#rotationgesturehandleroptions) | No | Parameters of the rotation gesture handler.| 565 566### onActionStart 567 568onActionStart(event: Callback\<GestureEvent>): RotationGestureHandler 569 570Invoked when a rotation gesture is recognized. 571 572**Atomic service API**: This API can be used in atomic services since API version 12. 573 574**System capability**: SystemCapability.ArkUI.ArkUI.Full 575 576**Parameters** 577 578| Name| Type | Mandatory| Description | 579| ------ | --------------------------------- | ---- | -------------------- | 580| event | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked when a rotation gesture is recognized.| 581 582**Return value** 583 584| Type| Description| 585| -------- | -------- | 586| RotationGestureHandler | Pan gesture handler object.| 587 588### onActionUpdate 589 590onActionUpdate(event: Callback\<GestureEvent>): RotationGestureHandler 591 592Invoked during the movement of the rotation gesture. 593 594**Atomic service API**: This API can be used in atomic services since API version 12. 595 596**System capability**: SystemCapability.ArkUI.ArkUI.Full 597 598**Parameters** 599 600| Name| Type | Mandatory| Description | 601| ------ | --------------------------------- | ---- | -------------------- | 602| event | [Callback](./ts-types.md#callback12)<[GestureEvent](ts-gesture-settings.md#gestureevent)> | Yes| Callback invoked during the movement of the rotation gesture.| 603 604**Return value** 605 606| Type| Description| 607| -------- | -------- | 608| RotationGestureHandler | Pan gesture handler object.| 609 610### onActionEnd 611 612onActionEnd(event: Callback\<GestureEvent>): RotationGestureHandler 613 614Invoked when the finger used for the rotation gesture is lifted. 615 616**Atomic service API**: This API can be used in atomic services since API version 12. 617 618**System capability**: SystemCapability.ArkUI.ArkUI.Full 619 620**Parameters** 621 622| Name| Type | Mandatory| Description | 623| ------ | --------------------------------- | ---- | -------------------- | 624| 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.| 625 626**Return value** 627 628| Type| Description| 629| -------- | -------- | 630| RotationGestureHandler | Rotation gesture handler object.| 631 632### onActionCancel 633 634onActionCancel(event: Callback\<void>): RotationGestureHandler 635 636Invoked when a tap cancellation event is received after the rotation gesture is recognized. 637 638**Atomic service API**: This API can be used in atomic services since API version 12. 639 640**System capability**: SystemCapability.ArkUI.ArkUI.Full 641 642**Parameters** 643 644| Name| Type | Mandatory| Description | 645| ------ | --------------------------------- | ---- | -------------------- | 646| event | [Callback](./ts-types.md#callback12)\<void> | Yes| Callback invoked when a tap cancellation event is received after the rotation gesture is recognized.| 647 648**Return value** 649 650| Type| Description| 651| -------- | -------- | 652| RotationGestureHandler | Pan gesture handler object.| 653 654## RotationGestureHandlerOptions 655 656Provides the parameters of the rotation gesture handler. 657 658**Atomic service API**: This API can be used in atomic services since API version 12. 659 660**System capability**: SystemCapability.ArkUI.ArkUI.Full 661 662| Attributes | Type | Mandatory| Description | 663| ------------ | -------------------------------------- | ---- | -------------------- | 664| 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.| 665| 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.| 666 667## GestureGroupHandler 668 669Defines a type of gesture handler object for gesture groups. 670 671### constructor 672 673constructor(options?: GestureGroupGestureHandlerOptions) 674 675A constructor used to create a **GestureGroupHandler** object. 676 677**Atomic service API**: This API can be used in atomic services since API version 12. 678 679**Parameters** 680 681| Name | Type | Mandatory| Description | 682| ------- | ------------------------------------------------------------ | ---- | ------------------ | 683| options | [GestureGroupGestureHandlerOptions](#gesturegroupgesturehandleroptions) | No | Parameters of the gesture group handler.| 684 685### onCancel 686 687onCancel(event: Callback\<void>): GestureGroupHandler 688 689Invoked when a cancellation event is received after the gesture group in sequential gesture recognition (**GestureMode.Sequence**) is recognized. 690 691**Atomic service API**: This API can be used in atomic services since API version 12. 692 693**System capability**: SystemCapability.ArkUI.ArkUI.Full 694 695**Parameters** 696 697| Name| Type | Mandatory| Description | 698| ------ | --------------------------------- | ---- | -------------------- | 699| 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.| 700 701**Return value** 702 703| Type| Description| 704| -------- | -------- | 705| GestureGroupHandler | Gesture group handler object.| 706 707## GestureGroupGestureHandlerOptions 708 709Provides the parameters of the gesture group handler. 710 711**Atomic service API**: This API can be used in atomic services since API version 12. 712 713**System capability**: SystemCapability.ArkUI.ArkUI.Full 714 715| Attributes | Type | Mandatory| Description | 716| ------------ | -------------------------------------- | ---- | -------------------- | 717| mode | [GestureMode](./ts-combined-gestures.md#gesturemode) | Yes | Recognition mode of combined gestures.<br>Default value: **GestureMode.Sequence** | 718| 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.| 719 720## GesturePriority 721 722**Atomic service API**: This API can be used in atomic services since API version 12. 723 724| Name| Description| 725| -------- | -------- | 726| NORMAL | Normal priority.| 727| PRIORITY | High priority.| 728 729## Example 730 731For details, see [Gesture Modifier](./ts-universal-attributes-gesture-modifier.md). 732