Interface TouchData

The touch interaction data interface See https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent and https://developer.mozilla.org/en-US/docs/Web/API/Touch (documentation extracted from there)

interface TouchData {
    allTouches: readonly TouchData[];
    altKey: boolean;
    clientX: number;
    clientY: number;
    ctrlKey: boolean;
    currentTarget: null | EventTarget;
    force: number;
    identifier: number;
    metaKey: boolean;
    pageX: number;
    pageY: number;
    radiusX: number;
    radiusY: number;
    rotationAngle: number;
    screenX: number;
    screenY: number;
    shiftKey: boolean;
    target: null | EventTarget;
    timeStamp: number;
}

Hierarchy

Implemented by

Properties

allTouches: readonly TouchData[]

All the current touches.

altKey: boolean

True if the alt key was down when the mouse event was fired.

clientX: number

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY: number

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

ctrlKey: boolean

True if the control key was down when the mouse event was fired.

currentTarget: null | EventTarget

A reference to the currently registered target for the event. This is the object to which the event is currently slated to be sent. It's possible this has been changed along the way through retargeting.

force: number

The amount of pressure being applied to the surface by the user, as a float between 0.0 (no pressure) and 1.0 (maximum pressure).

identifier: number

A unique identifier for the implied touch object.

metaKey: boolean

True if the meta key was down when the mouse event was fired.

pageX: number

The X coordinate of the touch point relative to the left edge of the document. Unlike clientX, this value includes the horizontal scroll offset, if any.

pageY: number

The Y coordinate of the touch point relative to the top of the document. Unlike clientY, this value includes the vertical scroll offset, if any.

radiusX: number

The X radius of the ellipse that most closely circumscribes the area of contact with the screen. The value is in pixels of the same scale as screenX.

radiusY: number

The Y radius of the ellipse that most closely circumscribes the area of contact with the screen. The value is in pixels of the same scale as screenY.

rotationAngle: number

The angle (in degrees) that the ellipse described by radiusX and radiusY must be rotated, clockwise, to most accurately cover the area of contact between the user and the surface.

screenX: number

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY: number

The Y coordinate of the mouse pointer in global (screen) coordinates.

shiftKey: boolean

True if the shift key was down when the mouse event was fired.

target: null | EventTarget

A reference to the target to which the event was originally dispatched.

timeStamp: number

The time at which the event was created (in milliseconds). By specification, this value is time since epoch—but in reality, browsers' definitions vary. In addition, work is underway to change this to be a DOMHighResTimeStamp instead.

Generated using TypeDoc