#

API Documentation for: NEXT
Show: Inherited Protected Private Deprecated

# Touch Class

Defined in: `Touch:40`
Module: EaselJS

Global utility for working with multi-touch enabled devices in EaselJS. Currently supports W3C Touch API (iOS and modern Android browser) and the Pointer API (IE), including ms-prefixed events in IE10, and unprefixed in IE11.

Ensure that you disable touch when cleaning up your application. You do not have to check if touch is supported to enable it, as it will fail gracefully if it is not supported.

#### Example

     var stage = new createjs.Stage("canvasId");
     createjs.Touch.enable(stage);

Note: It is important to disable Touch on a stage that you are no longer using:

     createjs.Touch.disable(stage);

- Index
- Methods

## Item Index

### Methods

- _handleEnd
- _handleMove
- _handleStart
- _IE_disable static
- _IE_enable static
- _IE_handleEvent static
- _IOS_disable static
- _IOS_enable static
- _IOS_handleEvent static
- disable static
- enable static
- isSupported static

## Methods

### `_handleEnd`

(

- `stage`
- `id`
- `e`

)
protected

Defined in `_handleEnd:291`

#### Parameters:

- `stage` Stage
- `id` String | Number
- `e` Object

### `_handleMove`

(

- `stage`
- `id`
- `e`
- `x`
- `y`

)
protected

Defined in `_handleMove:277`

#### Parameters:

- `stage` Stage
- `id` String | Number
- `e` Object
- `x` Number
- `y` Number

### `_handleStart`

(

- `stage`
- `id`
- `e`
- `x`
- `y`

)
protected

Defined in `_handleStart:258`

#### Parameters:

- `stage` Stage
- `id` String | Number
- `e` Object
- `x` Number
- `y` Number

### `_IE_disable`

(

- `stage`

)
protected static

Defined in `_IE_disable:202`

#### Parameters:

- `stage` Stage

### `_IE_enable`

(

- `stage`

)
protected static

Defined in `_IE_enable:175`

#### Parameters:

- `stage` Stage

### `_IE_handleEvent`

(

- `stage`
- `e`

)
protected static

Defined in `_IE_handleEvent:228`

#### Parameters:

- `stage` Stage
- `e` Object

  The event to handle.

### `_IOS_disable`

(

- `stage`

)
protected static

Defined in `_IOS_disable:132`

#### Parameters:

- `stage` Stage

### `_IOS_enable`

(

- `stage`

)
protected static

Defined in `_IOS_enable:117`

#### Parameters:

- `stage` Stage

### `_IOS_handleEvent`

(

- `stage`
- `e`

)
protected static

Defined in `_IOS_handleEvent:148`

#### Parameters:

- `stage` Stage
- `e` Object

  The event to handle

### `disable`

(

- `stage`

)
static

Defined in `disable:103`

Removes all listeners that were set up when calling `Touch.enable()` on a stage.

#### Parameters:

- `stage` Stage

  The Stage to disable touch on.

### `enable`

(

- `stage`
- `[singleTouch=false]`
- `[allowDefault=false]`

)
Boolean static

Defined in `enable:76`

Enables touch interaction for the specified EaselJS Stage. Currently supports iOS (and compatible browsers, such as modern Android browsers), and IE10/11. Supports both single touch and multi-touch modes. Extends the EaselJS MouseEvent model, but without support for double click or over/out events. See the MouseEvent MouseEvent/pointerId:property for more information.

#### Parameters:

- `stage` Stage

  The Stage to enable touch on.

- `[singleTouch=false]` Boolean optional

  If `true`, only a single touch will be active at a time.

- `[allowDefault=false]` Boolean optional

  If `true`, then default gesture actions (ex. scrolling, zooming) will be allowed when the user is interacting with the target canvas.

#### Returns:

Boolean:

Returns `true` if touch was successfully enabled on the target stage.

### `isSupported`

() Boolean static

Defined in `isSupported:64`

Returns `true` if touch is supported in the current browser.

#### Returns:

Boolean:

Indicates whether touch is supported in the current browser.