Class: State

Guacamole.Touch.State(templateopt)

new State(templateopt)

The current state of a touch contact.
Parameters:
Name Type Attributes Default Description
template Guacamole.Touch.State | object <optional>
{} The object whose properties should be copied within the new Guacamole.Touch.State.
Source:

Extends

Members

(non-null) angle :number

The rough angle of clockwise rotation of the general area of the touch contact, in degrees.
Type:
  • number
Default Value:
  • 0.0
Source:

(non-null) force :number

The relative force exerted by the touch contact, where 0 is no force (the touch has been lifted) and 1 is maximum force (the maximum amount of force representable by the device).
Type:
  • number
Default Value:
  • 1.0
Source:

(non-null) id :number

An arbitrary integer ID which uniquely identifies this contact relative to other active contacts.
Type:
  • number
Default Value:
  • 0
Source:

(non-null) radiusX :number

The Y radius of the ellipse covering the general area of the touch contact, in pixels.
Type:
  • number
Default Value:
  • 0
Source:

(non-null) radiusY :number

The X radius of the ellipse covering the general area of the touch contact, in pixels.
Type:
  • number
Default Value:
  • 0
Source:

(non-null) x :number

The current X position, in pixels.
Type:
  • number
Inherited From:
Default Value:
  • 0
Source:

(non-null) y :number

The current Y position, in pixels.
Type:
  • number
Inherited From:
Default Value:
  • 0
Source:

Methods

fromClientPosition(elementnon-null, clientXnon-null, clientYnon-null)

Assigns the position represented by the given element and clientX/clientY coordinates. The clientX and clientY coordinates are relative to the browser viewport and are commonly available within JavaScript event objects. The final position is translated to coordinates that are relative the given element.
Parameters:
Name Type Description
element Element The element the coordinates should be relative to.
clientX number The viewport-relative X coordinate to translate.
clientY number The viewport-relative Y coordinate to translate.
Inherited From:
Source: