textmode.js / input / touch / TouchPosition
Interface: TouchPosition
Touch position expressed both in grid and client coordinates.
The grid coordinate system uses center-based coordinates matching the rendering space:
(0, 0)is the center cell of the grid- Negative X values are to the left of center
- Positive X values are to the right of center
- Negative Y values are above center
- Positive Y values are below center
When the touch is outside the grid bounds, x and y are set to Number.NEGATIVE_INFINITY to indicate an invalid/outside position.
Extends
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
clientX | number | Client X coordinate in CSS pixels. | - |
clientY | number | Client Y coordinate in CSS pixels. | - |
id | number | Identifier provided by the browser for a touch point. | - |
pressure? | number | Touch pressure (0-1) when supported. | - |
radiusX? | number | Contact ellipse radius on the X axis in CSS pixels. | - |
radiusY? | number | Contact ellipse radius on the Y axis in CSS pixels. | - |
rotationAngle? | number | Contact ellipse angle in degrees when provided. | - |
x | number | The X coordinate (column), often relative to the grid's center. | GridPosition.x |
y | number | The Y coordinate (row), often relative to the grid's center. | GridPosition.y |