class Touch extends Object
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).
Note: Many of these 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 1.0. This may also be the case for radiusX and radiusY; if the hardware reports only a single point, these values will be 1.
MDN
- Annotations
- @RawJSType() @native() @JSGlobal()
- Alphabetic
- By Inheritance
- Touch
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Touch()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clientX: Double
The X coordinate of the touch point relative to the left edge of the browser viewport, not including any scroll offset.
The X coordinate of the touch point relative to the left edge of the browser viewport, not including any scroll offset. Read only.
MDN
- def clientY: Double
The Y coordinate of the touch point relative to the top edge of the browser viewport, not including any scroll offset.
The Y coordinate of the touch point relative to the top edge of the browser viewport, not including any scroll offset. Read only.
MDN
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def force: Double
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).
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). Read only.
MDN
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def identifier: Double
A unique identifier for this Touch object.
A unique identifier for this 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.
MDN
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def pageX: Double
The X coordinate of the touch point relative to the left edge of the document.
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.
MDN Read only.
- def pageY: Double
The Y coordinate of the touch point relative to the top of the document.
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. Read only.
MDN
- def propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
- def radiusX: Double
The X radius of the ellipse that most closely circumscribes the area of contact with the screen.
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. Read only.
MDN
- def radiusY: Double
The Y radius of the ellipse that most closely circumscribes the area of contact with the screen.
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. Read only.
MDN
- def rotationAngle: Double
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.
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. Read only.
MDN
- def screenX: Double
The X coordinate of the touch point relative to the left edge of the screen.
The X coordinate of the touch point relative to the left edge of the screen. Read only.
MDN
- def screenY: Double
The Y coordinate of the touch point relative to the top edge of the screen.
The Y coordinate of the touch point relative to the top edge of the screen. Read only.
MDN
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def target: EventTarget
The Element on which the touch point 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.
The Element on which the touch point 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 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's any risk of an element being removed while it is being touched, best practice is to attach the touch listeners directly to the target. Read only.
MDN
- def toLocaleString(): String
- Definition Classes
- Object
- def toString(): String
- Definition Classes
- AnyRef → Any
- def valueOf(): Any
- Definition Classes
- Object
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()