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
Copy file name to clipboardExpand all lines: docs/en/api/elements/built-in/view.mdx
+41-5Lines changed: 41 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ Only available on Android platform, used to force specific nodes to create corre
99
99
exposure-id?:string
100
100
```
101
101
102
-
Specify whether the target node needs to listen to [exposure/anti-exposure events](../../../guide/interaction/visibility-detection/exposure-ability.mdx#monitor-exposure-of-the-entire-page).
102
+
Specify whether the target node needs to listen to [exposure/disexposure events](../../../guide/interaction/visibility-detection/exposure-ability.mdx#monitor-exposure-of-the-entire-page).
Specify the boundary scaling value of the target node itself in the exposure detection, which affects the viewport intersection judgment of the target node. Each node can have its own boundary scaling value.
124
124
125
-
Before using this capability, you also need to set [`enable-exposure-ui-margin`](#enable-exposure-ui-margin) for the current node.
125
+
:::tip
126
+
On both Android and iOS platforms, you need to set [`enable-exposure-ui-margin`](#enable-exposure-ui-margin) for the current node; otherwise, it won't take effect. On the HarmonyOS platform, setting [`enable-exposure-ui-margin`](#enable-exposure-ui-margin) is not required for it to take effect.
Specify the screen boundary scaling value referenced by the target node in the exposure detection task, which affects the viewport intersection judgment of the target node. Each node can have its own screen boundary scaling value.
138
140
141
+
:::tip
142
+
On both Android and iOS platforms, you need to set [`enable-exposure-ui-margin`](#enable-exposure-ui-margin) for the current node; otherwise, a positive value represents the scaling value of the target node's own boundaries, and a negative value represents the scaling value of the screen boundaries. On the HarmonyOS platform, setting [`enable-exposure-ui-margin`](#enable-exposure-ui-margin) is not required for it to take effect.
Specify whether the target node supports the [`exposure-ui-margin-*`](#exposure-ui-margin-) properties.
156
162
157
-
Setting it to `true` will change the behavior of [`exposure-screen-margin-*`](#exposure-screen-margin-) and may cause the lazy loading of the scrollable container to fail.
163
+
:::tip
164
+
Setting this to `true` will change the behavior of `exposure-screen-margin-*` on Android and iOS platforms, potentially causing lazy loading of scrollable containers to fail.
Specify whether the exposure detection task takes into account the viewport clipping of the parent node. When set to `true`, nodes outside the parent node viewport cannot trigger exposure, and when set to `false`, nodes outside the parent node viewport can trigger exposure.
167
175
176
+
:::tip
177
+
By default, exposure detection only considers the viewport clipping of scrollable parent nodes. The viewport clipping of other parent nodes with width and height and `overflow: visible` has no effect on exposure detection. Setting `enable-exposure-ui-clip` for these parent nodes allows for more accurate viewport clipping determination.
Specifies whether the target node and its child nodes can respond to Lynx touch events. This property does not affect platform-level gestures (such as scrolling of `scroll-view`).
335
347
348
+
:::tip
349
+
It is recommended to use [`pointer-events`](../../css/properties/pointer-events.mdx) instead of `user-interaction-enabled`.
Specify whether the target node consumes platform-layer touch events, affects platform-layer gestures (such as scrolling of `scroll-view`), does not affect Lynx touch events, and can achieve similar platform-layer gesture penetration/interception effects.
344
360
345
361
:::tip
346
-
On the Android side, only supports setting effectiveness on the `view` element.
362
+
On the Android platform, this setting only applies to `view` elements, and the corresponding Android View needs to be created for the node to take effect. It may also require setting [`flatten`](#flatten) to `false` for it to work.
347
363
348
-
Known differences between the two sides: Android and HarmonyOS support platform-layer gesture penetration/interception of parent-child/sibling structures; iOS only supports platform-layer gesture penetration/interception of sibling structures.
364
+
Gesture interception effects only apply to sibling nodes, not parent-child nodes.
349
365
:::
350
366
351
367
### `block-native-event`
@@ -521,7 +537,9 @@ tap: TouchEvent;
521
537
522
538
It belongs to [touch event](../../lynx-api/event/touch-event), which is triggered when the finger clicks on the touch surface.
523
539
540
+
:::tip
524
541
This event and the [`longpress`](#longpress) event are mutually exclusive in event monitoring, that is, if the front-end monitors both events at the same time, the two events will not be triggered at the same time, and [`longpress`](#longpress) takes precedence.
542
+
:::
525
543
526
544
### `longpress`
527
545
@@ -531,6 +549,23 @@ longpress: TouchEvent;
531
549
532
550
It belongs to the [touch event](../../lynx-api/event/touch-event), which is triggered when the finger is long pressed on the touch surface, and the interval between long press triggers is `500 ms`.
533
551
552
+
### `click`
553
+
554
+
```ts
555
+
click: TouchEvent;
556
+
```
557
+
558
+
This belongs to the [touch event](../../lynx-api/event/touch-event), triggered when a finger clicks on the touch surface.
559
+
560
+
:::tip
561
+
This event differs slightly from the [`tap`](#tap) event, mainly in the trigger distance threshold and the triggering object.
562
+
563
+
- The distance threshold for `tap` is fixed; it cannot be triggered if the movement distance exceeds a certain value. The distance threshold for `click` depends on the node's touch hotspot; it cannot be triggered if the node moves outside the touch hotspot.
564
+
565
+
- The triggering object for `tap` is the node closest to the user that is actually touched. The triggering object for `click` is the node closest to the user that is listening for the `click` event.
566
+
567
+
:::
568
+
534
569
### `layoutchange`
535
570
536
571
```ts
@@ -624,6 +659,7 @@ lynx
624
659
.invoke({
625
660
method: 'boundingClientRect',
626
661
params: {
662
+
iOSEnableAnimationProps: false, // Specifies whether to consider animation properties when calculating position on iOS; the default is false.
627
663
androidEnableTransformProps: true, // Specifies whether to consider the transform attribute when calculating the position on Android. The default value is false.
628
664
relativeTo: null, // Specify the reference node, relative to LynxView by default.
Copy file name to clipboardExpand all lines: docs/en/api/lynx-api/event/mouse-event.mdx
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,15 +38,15 @@ When a mouse event is triggered, if any buttons are pressed, a integer value rep
38
38
x: number;
39
39
```
40
40
41
-
Represents the horizontal axis position of the mouse pointer in the `UI` coordinate system that contains the mouse pointer and is closest to the user.
41
+
Represents the horizontal axis position of the mouse pointer in the `element` coordinate system that contains the mouse pointer and is closest to the user.
42
42
43
43
### y
44
44
45
45
```ts
46
46
y: number;
47
47
```
48
48
49
-
Represents the vertical axis position of the mouse pointer in the `UI` coordinate system that contains the mouse pointer and is closest to the user.
49
+
Represents the vertical axis position of the mouse pointer in the `element` coordinate system that contains the mouse pointer and is closest to the user.
50
50
51
51
### pageX
52
52
@@ -84,31 +84,31 @@ Indicates the vertical axis position of the mouse pointer in the current window
84
84
85
85
### mousedown
86
86
87
-
Indicates a mouse button is pressed (primary or secondary). [`target`](./event#target) is the `UI` closest to the user that contains the mouse pointer.
87
+
Indicates a mouse button is pressed (primary or secondary). [`target`](./event#target) is the `element` closest to the user that contains the mouse pointer.
88
88
89
89
### mousemove
90
90
91
-
Indicates that the mouse moves after `mousedown`. [`target`](./event#target) is always the same as [`target`](./event#target) of `mousedown`.
91
+
Indicates that the mouse moves after [`mousedown`](#mousedown). [`target`](./event#target) is always the same as [`mousedown`](#mousedown)'s [`target`](./event#target).
92
92
93
93
### mouseup
94
94
95
-
Indicates that the mouse button is released, [`target`](./event#target) is the same as `mousedown`'s [`target`](./event#target).
95
+
Indicates that the mouse button is released, [`target`](./event#target) is the same as [`mousedown`](#mousedown)'s [`target`](./event#target).
96
96
97
97
### mouseenter
98
98
99
-
Indicates that the mouse moves into the activation area of [`target`](./event#target) for the first time. [`target`](./event#target) is the `UI` that contains the mouse pointer and is closest to the user.
99
+
Indicates that the mouse moves into the activation area of [`target`](./event#target) for the first time. [`target`](./event#target) is the `element` that contains the mouse pointer and is closest to the user.
100
100
101
-
Note: the `mouseenter` event does not bubble, and it can't be captured by using `capture-` API.
101
+
Note: the `mouseenter` event does not bubble, and it can't be captured by using [`capture-`](../../../guide/interaction/event-handling/event-propagation.mdx#event-handler-property) API.
102
102
103
103
### mouseover
104
104
105
-
Indicates that the mouse is moving inside [`target`](./event#target) after `mouseenter`. [`target`](./event#target) is the `UI` that contains the mouse pointer and is closest to the user.
105
+
Indicates that the mouse is moving inside [`target`](./event#target) after [`mouseenter`](#mouseenter). [`target`](./event#target) is the `element` that contains the mouse pointer and is closest to the user.
106
106
107
107
### mouseleave
108
108
109
-
Indicates that the mouse moves out of the activation area of [`target`](./event#target) for the first time. [`target`](./event#target) is the same as previous `mouseenter`.
109
+
Indicates that the mouse moves out of the activation area of [`target`](./event#target) for the first time. [`target`](./event#target) is the same as previous [`mouseenter`](#mouseenter)'s [`target`](./event#target).
110
110
111
-
Note: the `mouseleave` event does not bubble, and it can't be captured by using `capture-` API.
111
+
Note: the `mouseleave` event does not bubble, and it can't be captured by using [`capture-`](../../../guide/interaction/event-handling/event-propagation.mdx#event-handler-property) API.
Copy file name to clipboardExpand all lines: docs/en/api/lynx-api/event/touch-event.mdx
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,13 +68,17 @@ Indicates that the touch event is interrupted by the system or `Lynx` external g
68
68
69
69
### tap
70
70
71
-
Indicates that the finger clicks on the touch surface. [`target`](./event#target) is the `element`that contains the touch point and is closest to the user. Only the first finger can trigger it. When the finger moves beyond a certain threshold or triggers the `UI` at the touch position to slide, the `tap` event cannot be triggered.
71
+
This indicates a single tap on the touch surface. The [`target`](./event#target) is the `element`containing the touch point and closest to the user. Only the first finger can trigger this event. If the finger moves beyond a certain threshold, or if an `element` in the [`event response chain`](../../../guide/interaction/event-handling/event-propagation.mdx#event-response-chain) slides, the `tap` event will not trigger.
72
72
73
-
In addition, this event and the [`longpress`](#longpress) event are mutually exclusive in event monitoring. That is, if the frontend monitors two events at the same time, the two events will not be triggered at the same time, and [`longpress`](#longpress) takes priority.
73
+
Furthermore, this event and the [`longpress`](#longpress) event are mutually exclusive in event listening. That is, if the front-end listens for both events simultaneously, they will not trigger concurrently; [`longpress`](#longpress) takes precedence.
74
74
75
75
### longpress
76
76
77
-
Indicates that the finger long presses on the touch surface. [`target`](./event#target) is the `element` that contains the touch point and is closest to the user. The interval for long press triggering is `500 ms`.
77
+
This indicates a long press on the touch surface. The [`target`](./event#target) is the `element` containing the touch point and closest to the user. Only the first finger can trigger this event. The `longpress` event will not trigger if the finger moves beyond a certain threshold or the long press interval is less than `500 ms`.
78
+
79
+
### click
80
+
81
+
This indicates a single click on the touch plane. [`target`](./event#target) is the `element` containing the touch point, closest to the user, and listening for the `click` event. Only the first finger can trigger this event. Unlike the [`tap`](#tap) event, the `click` event will not trigger if the finger moves away from the `element` closest to the user and listening for the `click` event, or if an `element` in the [`event response chain`](../../../guide/interaction/event-handling/event-propagation.mdx#event-response-chain) of that `element` slides.
0 commit comments