Touch extension type

The Touch interface represents a single contact point on a touch-sensitive device. The contact point is commonly a finger or stylus and the device may be a touchscreen or trackpad.

The Touch.radiusX, Touch.radiusY, and Touch.rotationAngle describe the area of contact between the user and the screen, the touch area. This can be helpful when dealing with imprecise pointing devices such as fingers. These values are set to describe an ellipse that as closely as possible matches the entire area of contact (such as the user's fingertip).

Note: Many of the properties' values are hardware-dependent; for example, if the device doesn't have a way to detect the amount of pressure placed on the surface, the force value will always be 0. This may also be the case for radiusX and radiusY; if the hardware reports only a single point, these values will be 1.


API documentation sourced from MDN Web Docs.

on
Implemented types
Available extensions

Constructors

Touch(TouchInit touchInitDict)
factory

Properties

altitudeAngle double
no setter
azimuthAngle double
no setter
clientX double
The Touch.clientX read-only property returns the X coordinate of the touch point relative to the viewport, not including any scroll offset.
no setter
clientY double
The Touch.clientY read-only property returns the Y coordinate of the touch point relative to the browser's viewport, not including any scroll offset.
no setter
force double
The Touch.force read-only property returns the amount of pressure the user is applying to the touch surface for a Touch point.
no setter
hashCode int
The hash code for this object.
no setterinherited
identifier int
The Touch.identifier returns a value uniquely identifying this point of contact with the touch surface. This value remains consistent for every event involving this finger's (or stylus's) movement on the surface until it is lifted off the surface.
no setter
pageX double
The Touch.pageX read-only property returns the X coordinate of the touch point relative to the viewport, including any scroll offset.
no setter
pageY double
The Touch.pageY read-only property returns the Y coordinate of the touch point relative to the viewport, including any scroll offset.
no setter
radiusX double
The radiusX read-only property of the Touch interface returns the X radius of the ellipse that most closely circumscribes the area of contact with the touch surface. The value is in CSS pixels of the same scale as Touch.screenX.
no setter
radiusY double
The radiusY read-only property of the Touch interface returns the Y radius of the ellipse that most closely circumscribes the area of contact with the touch surface. The value is in CSS pixels of the same scale as Touch.screenX.
no setter
rotationAngle double
The rotationAngle read-only property of the Touch interface returns the rotation angle, in degrees, of the contact area ellipse defined by Touch.radiusX and Touch.radiusY. The value may be between 0 and 90. Together, these three values describe an ellipse that approximates the size and shape of the area of contact between the user and the screen. This may be a relatively large ellipse representing the contact between a fingertip and the screen or a small area representing the tip of a stylus, for example.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
screenX double
Returns the X coordinate of the touch point relative to the screen, not including any scroll offset.
no setter
screenY double
Returns the Y coordinate of the touch point relative to the screen, not including any scroll offset.
no setter
target EventTarget
The read-only target property of the Touch interface returns the (EventTarget) on which the touch contact started when it was first placed on the surface, even if the touch point has since moved outside the interactive area of that element or even been removed from the document. Note that if the target element is removed from the document, events will still be targeted at it, and hence won't necessarily bubble up to the window or document anymore. If there is any risk of an element being removed while it is being touched, the best practice is to attach the touch listeners directly to the target.
no setter
touchType TouchType
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited