From a1205b57b0655fa0a6c6298facd9b4c0a09e53ab Mon Sep 17 00:00:00 2001 From: king_he <6384784@qq.com> Date: Tue, 28 Jun 2022 01:12:15 +0000 Subject: [PATCH] update en/application-dev/reference/arkui-ts/ts-gesture-settings.md. Signed-off-by: king_he <6384784@qq.com> --- .../reference/arkui-ts/ts-gesture-settings.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/en/application-dev/reference/arkui-ts/ts-gesture-settings.md b/en/application-dev/reference/arkui-ts/ts-gesture-settings.md index b51abd4a6c..e48d89b03a 100644 --- a/en/application-dev/reference/arkui-ts/ts-gesture-settings.md +++ b/en/application-dev/reference/arkui-ts/ts-gesture-settings.md @@ -1,7 +1,7 @@ # Gesture Binding Methods -> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** +> **NOTE**
> This method is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. @@ -16,22 +16,22 @@ None Use the following attributes to bind gesture recognition to a component. When a gesture is recognized, the event callback is invoked to notify the component. - | Name | Type | Default Value | Description | +| Name | Type | Default Value | Description | | -------- | -------- | -------- | -------- | | gesture | gesture: GestureType,
mask?: GestureMask | gesture: -,
mask: GestureMask.Normal | Gesture to recognize.
**gesture** specifies the type of the gesture to bind, and **mask** specifies the event response setting. | -| priorityGesture | gesture: GestureType,
mask?: GestureMask | gesture: -,
mask: GestureMask.Normal | Gesture to preferentially recognize.
**gesture** specifies the type of the gesture to bind, and **mask** specifies the event response setting.
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> - By default, the child component takes precedence over the parent component in gesture recognition. When **priorityGesture** is configured for the parent component, the parent component takes precedence over the child component in gesture recognition. | -| parallelGesture | gesture: GestureType,
mask?: GestureMask | gesture: -,
mask: GestureMask.Normal | Gesture that can be triggered together with the child component gesture.
**gesture** specifies the type of the gesture to bind, and **mask** specifies the event response setting.
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> - The gesture event is not a bubbling event. When **parallelGesture** is set for the parent component, gesture events that are the same for the parent component and child components can be triggered, thereby implementing a bubbling effect. | +| priorityGesture | gesture: GestureType,
mask?: GestureMask | gesture: -,
mask: GestureMask.Normal | Gesture to preferentially recognize.
**gesture** specifies the type of the gesture to bind, and **mask** specifies the event response setting.
**NOTE**
By default, the child component takes precedence over the parent component in gesture recognition. When **priorityGesture** is configured for the parent component, the parent component takes precedence over the child component in gesture recognition. | +| parallelGesture | gesture: GestureType,
mask?: GestureMask | gesture: -,
mask: GestureMask.Normal | Gesture that can be triggered together with the child component gesture.
**gesture** specifies the type of the gesture to bind, and **mask** specifies the event response setting.
**NOTE**
The gesture event is not a bubbling event. When **parallelGesture** is set for the parent component, gesture events that are the same for the parent component and child components can be triggered, thereby implementing a bubbling effect. | - GestureMask enums - | Name | Description | + | Name | Description | | -------- | -------- | | Normal | The gestures of child components are not masked and are recognized based on the default gesture recognition sequence. | - | IgnoreInternal | The gestures of child components are masked. Only the gestures of the current component are recognized.
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> However, the built-in gestures of the child components are not masked. For example, when the child component is a **<List>** component, the built-in sliding gestures can still be triggered. | + | IgnoreInternal | The gestures of child components are masked. Only the gestures of the current component are recognized.
**NOTE**
The built-in gestures of the child components are not masked. For example, when the child component is a **<List>** component, the built-in sliding gestures can still be triggered. | - Gesture types - | Name | Description | + | Name | Description | | -------- | -------- | | TapGesture | Tap gesture, which can be a single-tap or multi-tap gesture. | | LongPressGesture | Long press gesture. | @@ -43,15 +43,15 @@ Use the following attributes to bind gesture recognition to a component. When a ## Gesture Response Event -The component uses the **gesture** method to bind the gesture object and uses the events provided in this object to respond to the gesture operation. For example, the **onAction** event of the **TapGesture** object can be used to respond to a click event. For details about the event definition, see the section of each gesture object. +The component uses the **gesture** method to bind the gesture object and uses the events provided in this object to respond to the gesture operation. For example, the **onAction** event of the **TapGesture** object can be used to respond to a click event. For details about the events, see the section of each gesture object. - TapGesture events - | Name | Description | + | Name | Description | | -------- | -------- | | onAction((event?: GestureEvent) => void) | Callback invoked when a tap gesture is recognized. | - GestureEvent attributes - | Name | Type | Description | + | Name | Type | Description | | -------- | -------- | -------- | | timestamp | number | Timestamp of the event. | | target8+ | EventTarget | Object that triggers the gesture event. | -- GitLab