new Manager(element, options)
Manager
| Name | Type | Description |
|---|---|---|
element |
HTMLElement | |
options |
Object | optional |
Methods
-
add(recognizer){Recognizer|Manager}
-
add a recognizer to the manager
existing recognizers with the same event name will be removedName Type Description recognizerRecognizer -
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 eventString dataObject -
get(recognizer){Recognizer|Null}
-
get a recognizer by its event name.
Name Type Description recognizerRecognizer | String -
off(events, handler){EventEmitter}
-
unbind event, leave emit blank to remove all handlers
Name Type Description eventsString handlerfunction optional -
on(events, handler){EventEmitter}
-
bind event
Name Type Description eventsString handlerfunction -
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 madeName Type Description inputDataObject -
remove(recognizer){Manager}
-
remove a recognizer by name or instance
Name Type Description recognizerRecognizer | String -
set(options){Manager}
-
set options
Name Type Description optionsObject -
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 forceBoolean optional