Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
JavaScript Suite Documentation

TouchEvent Class Reference

Constructors

Instance Methods

Constructors

new TouchEvent(parameters)

Initializes an instance of TouchEvent.

Instance Methods

touchEvent.getC() ⇒ Array.<TouchCoord>

Get the C

Kind: Instance method of TouchEvent
Returns: Array.<TouchCoord> - the KEY_C value

touchEvent.getIdParam() ⇒ Number

Get the IdParam

Kind: Instance method of TouchEvent
Returns: Number - the KEY_ID value

touchEvent.getTs() ⇒ Array.<Number>

Get the Ts

Kind: Instance method of TouchEvent
Returns: Array.<Number> - the KEY_TS value

touchEvent.setC(c) ⇒ TouchEvent

Set the C

Kind: Instance method of TouchEvent
Returns: TouchEvent - The class instance for method chaining.

ParamTypeDescription
c Array.<TouchCoord> The desired C. {'array_min_size': 1, 'array_max_size': 1000}

touchEvent.setIdParam(id) ⇒ TouchEvent

Set the IdParam

Kind: Instance method of TouchEvent
Returns: TouchEvent - The class instance for method chaining.

ParamTypeDescription
id Number A touch's unique identifier. The application can track the current touch events by id. If a touch event has type begin, the id should be added to the set of touches. If a touch event has type end, the id should be removed from the set of touches. - The desired IdParam. {'num_min_value': 0, 'num_max_value': 9}

touchEvent.setTs(ts) ⇒ TouchEvent

Set the Ts

Kind: Instance method of TouchEvent
Returns: TouchEvent - The class instance for method chaining.

ParamTypeDescription
ts Array.<Number> The time that the touch was recorded. This number can the time since the beginning of the session or something else as long as the units are in milliseconds. The timestamp is used to determined the rate of change of position of a touch. The application also uses the time to verify whether two touches, with different ids, are part of a single action by the user. If there is only a single timestamp in this array, it is the same for every coordinate in the coordinates array. - The desired Ts. {'array_min_size': 1, 'array_max_size': 1000, 'num_min_value': 0, 'num_max_value': 2000000000}
View on GitHub.com