Skip to content

Commit 0e7edff

Browse files
authored
stylusData documentation. (#3112)
## Description This PR adds docs for `stylusData` object in events. >[!CAUTION] > This has to be merged after finishing support for all main platforms (`web`/`android`/`iOS`) ## Test plan Run docs
1 parent 2ad43fe commit 0e7edff

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

docs/docs/gestures/hover-gesture.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,16 @@ X coordinate of the current position of the pointer relative to the window. The
104104

105105
Y coordinate of the current position of the pointer relative to the window. The value is expressed in point units. It is recommended to use it instead of [`y`](#y) in cases when the original view can be transformed as an effect of the gesture.
106106

107+
### `stylusData`
108+
109+
Object that contains additional information about `stylus`. It consists of the following fields:
110+
111+
- [`tiltX`](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltX) - angle in degrees between the Y-Z plane of the stylus and the screen.
112+
- [`tiltY`](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltY) - angle in degrees between the X-Z plane of the stylus and the screen.
113+
- [`altitudeAngle`](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/altitudeAngle) - angle between stylus axis and the X-Y plane of a device screen.
114+
- [`azimuthAngle`](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/azimuthAngle) - angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis.
115+
- [`pressure`](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pressure) - indicates the normalized pressure of the stylus.
116+
107117
<BaseEventData />
108118

109119
## Remarks

docs/docs/gestures/pan-gesture.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,16 @@ X coordinate of the current position of the pointer (finger or a leading pointer
189189

190190
Y coordinate of the current position of the pointer (finger or a leading pointer when there are multiple fingers placed) relative to the window. The value is expressed in point units. It is recommended to use it instead of [`y`](#y) in cases when the original view can be transformed as an effect of the gesture.
191191

192+
### `stylusData`
193+
194+
Object that contains additional information about `stylus`. It consists of the following fields:
195+
196+
- [`tiltX`](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltX) - angle in degrees between the Y-Z plane of the stylus and the screen.
197+
- [`tiltY`](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltY) - angle in degrees between the X-Z plane of the stylus and the screen.
198+
- [`altitudeAngle`](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/altitudeAngle) - angle between stylus axis and the X-Y plane of a device screen.
199+
- [`azimuthAngle`](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/azimuthAngle) - angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis.
200+
- [`pressure`](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pressure) - indicates the normalized pressure of the stylus.
201+
192202
<BaseEventData />
193203

194204
## Example

0 commit comments

Comments
 (0)