mozilla

Revision 18111 of Touch

  • Revision slug: DOM/Touch
  • Revision title: Touch
  • Revision id: 18111
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment 4 words added

Revision Content

{{ domref() }}

A Touch object represents a single point of contact between the user and a touch-sensitive interface device (which may be, for example, a touchscreen or a trackpad).

Attributes

{{ domxref("Touch.identifier") }}
A unique identifier for this {{ domxref("Touch") }} object. A given touch (say, by a finger) will have the same identifier for the duration of its movement around the surface. This lets you ensure that you're tracking the same touch all the time. Read only.
{{ domxref("Touch.screenX") }}
The X coordinate of the touch point relative to the screen, not including any scroll offset.
{{ domxref("Touch.screenY") }}
The Y coordinate of the touch point relative to the screen, not including any scroll offset.
{{ domxref("Touch.clientX") }}
The X coordinate of the touch point relative to the viewport, not including any scroll offset.
{{ domxref("Touch.clientY") }}
The Y coordinate of the touch point relative to the viewport, not including any scroll offset.
{{ domxref("Touch.pageX") }}
The X coordinate of the touch point relative to the viewport, including any scroll offset.
{{ domxref("Touch.pageY") }}
The Y coordinate of the touch point relative to the viewport, including any scroll offset.
{{ domxref("Touch.radiusX") }}
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.
{{ domxref("Touch.radiusY") }}
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.
{{ domxref("Touch.rotationAngle") }}
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.
{{ domxref("Touch.force") }}
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).

See also

  • Touch events
  • {{ domxref("Touch") }}
  • {{ domxref("TouchList") }}
  • {{ domxref("TouchEvent") }}

Specification

Touch Events Specification

Revision Source

<p>{{ domref() }}</p>
<p>A <code>Touch</code> object represents a single point of contact between the user and a touch-sensitive interface device (which may be, for example, a touchscreen or a trackpad).</p>
<h2>Attributes</h2>
<dl> <dt>{{ domxref("Touch.identifier") }}</dt> <dd>A unique identifier for this {{ domxref("Touch") }} object. A given touch (say, by a finger) will have the same identifier for the duration of its movement around the surface. This lets you ensure that you're tracking the same touch all the time. <strong>Read only.</strong></dd> <dt><strong>{{ domxref("Touch.screenX") }}</strong></dt> <dd>The X coordinate of the touch point relative to the screen, not including any scroll offset.</dd>
</dl>
<dl> <dt><strong>{{ domxref("Touch.screenY") }}</strong></dt> <dd>The Y coordinate of the touch point relative to the screen, not including any scroll offset.</dd> <dt><strong>{{ domxref("Touch.clientX") }}</strong></dt> <dd>The X coordinate of the touch point relative to the viewport, not including any scroll offset.</dd> <dt><strong>{{ domxref("Touch.clientY") }}</strong></dt> <dd>The Y coordinate of the touch point relative to the viewport, not including any scroll offset.</dd> <dt>{{ domxref("Touch.pageX") }}</dt> <dd>The X coordinate of the touch point relative to the viewport, including any scroll offset.</dd> <dt>{{ domxref("Touch.pageY") }}</dt> <dd>The Y coordinate of the touch point relative to the viewport, including any scroll offset.</dd> <dt>{{ domxref("Touch.radiusX") }}</dt> <dd>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 <code>screenX</code>.</dd> <dt>{{ domxref("Touch.radiusY") }}</dt> <dd>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 <code>screenY</code>.</dd> <dt>{{ domxref("Touch.rotationAngle") }}</dt> <dd>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.</dd> <dt>{{ domxref("Touch.force") }}</dt> <dd>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).</dd>
</dl>
<h2>See also</h2>
<ul> <li><a href="/en/DOM/Touch_events" title="en/DOM/Touch events">Touch events</a></li> <li>{{ domxref("Touch") }}</li> <li>{{ domxref("TouchList") }}</li> <li>{{ domxref("TouchEvent") }}</li>
</ul>
<h3 name="Specification">Specification</h3>
<p><a class=" external" href="http://www.w3.org/TR/touch-events/" title="http://www.w3.org/TR/touch-events/">Touch Events Specification</a></p>
Revert to this revision