disable
static
void
disable
(
stage
)
Removes all listeners that were set up when calling Touch.enable on a stage.
- Parameters:
-
stage <Stage>The stage to disable touch on.
- Returns:
void
enable
static
Boolean
enable
(
stage
,
singleTouch
,
allowDefault
)
Enables touch interaction for the specified EaselJS stage. Currently supports iOS (and compatible browsers, such
as modern Android browsers), and IE10.
Supports both single touch and multi-touch modes. Extends the EaselJS MouseEvent model, but without support for
double click or over/out events. See MouseEvent.pointerID for more information.
- Parameters:
-
stage <Stage>The stage to enable touch on. -
singleTouch <Boolean>If true, only a single touch will be active at a time. Default is false. -
allowDefault <Boolean>If true, then default gesture actions (ex. scrolling, zooming) will be allowed when the user is interacting with the target canvas. Default is false.
- Returns:
Boolean - Returns true if touch was successfully enabled on the target stage.
isSupported
static
Boolean
isSupported
(
)
Returns true if touch is supported in the current browser.
- Returns:
Boolean - A boolean indicating whether touch is supported in the current browser.