Class: Manager

Manager

new Manager(element, options)

Manager

Name Type Description
element HTMLElement
options Object optional

Methods

add a recognizer to the manager
existing recognizers with the same event name will be removed

Name Type Description
recognizer Recognizer

destroy()

destroy the manager and unbinds all events
it doesn't unbind dom events, that is the user own responsibility

emit(event, data)

emit event to the listeners

Name Type Description
event String
data Object

get(recognizer){Recognizer|Null}

get a recognizer by its event name.

Name Type Description
recognizer Recognizer | String

off(events, handler){EventEmitter}

unbind event, leave emit blank to remove all handlers

Name Type Description
events String
handler function optional

on(events, handler){EventEmitter}

bind event

Name Type Description
events String
handler function

recognize(inputData)

run the recognizers!
called by the inputHandler function on every movement of the pointers (touches)
it walks through all the recognizers and tries to detect the gesture that is being made

Name Type Description
inputData Object

remove(recognizer){Manager}

remove a recognizer by name or instance

Name Type Description
recognizer Recognizer | String

set(options){Manager}

set options

Name Type Description
options Object

stop(force)

stop recognizing for this session.
This session will be discarded, when a new [input]start event is fired.
When forced, the recognizer cycle is stopped immediately.

Name Type Description
force Boolean optional