Class Index | File Index

Classes


Class Touch


Defined in: input.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Touch()
Creates an instance of the Touch object
Field Summary
Field Attributes Field Name and Description
 
Canvas reference.
<static>  
Touch.points
Current touch points array.
<static>  
Touch.state
Current touch state.
<static>  
Touch.x
Current touch point X.
<static>  
Touch.y
Current touch point y.
Method Summary
Method Attributes Method Name and Description
 
addCustomEvents(canvas, ontouchstart, ontouchmove, ontouchend)
Setup links to custom events outside the Touch object.
 
addEvents(canvas)
Setup links to events inside the Touch object.
 
Return Input device type.
 
Get the state of touch input, touchstart, touchmove or touchend.
 
getX()
Return x position of touch point.
 
getY()
Return y position of touch point.
 
Touch end event
 
Touch move event
 
Touch start event
Class Detail
Touch()
Creates an instance of the Touch object
See:
input.js
Field Detail
{[object HTMLCanvasElement]} canvas
Canvas reference.

<static> {Array} Touch.points
Current touch points array.

<static> {Number} Touch.state
Current touch state.

<static> {Number} Touch.x
Current touch point X.

<static> {Number} Touch.y
Current touch point y.
Method Detail
addCustomEvents(canvas, ontouchstart, ontouchmove, ontouchend)
Setup links to custom events outside the Touch object.
Parameters:
{[object HTMLCanvasElement]} canvas
Canvas object.
{Object} ontouchstart
Touch start event reference.
{Object} ontouchmove
Touch move event reference.
{Object} ontouchend
Touch end event reference.

addEvents(canvas)
Setup links to events inside the Touch object.
Parameters:
{[object HTMLCanvasElement]} canvas
Canvas object.

{String} getDeviceType()
Return Input device type.
Returns:
{String} Input device type.

{String} getState()
Get the state of touch input, touchstart, touchmove or touchend.
Returns:
{String} Returns state string: touchstart, touchmove or touchend.

{Number} getX()
Return x position of touch point.
Returns:
{Number} x touch point.

{Number} getY()
Return y position of touch point.
Returns:
{Number} y touch point.

ontouchend(e)
Touch end event
Parameters:
{Event} e
Touch end event.

ontouchmove(e)
Touch move event
Parameters:
{Event} e
Touch move event.

ontouchstart(e)
Touch start event
Parameters:
{Event} e
Touch start event.

Documentation generated by JsDoc Toolkit 2.4.0 on Fri May 06 2011 14:41:27 GMT+0100 (BST)