Class: Recognizer

Recognizer

new Recognizer(options)

Recognizer
Every recognizer needs to extend from this class.

Name Type Description
options Object

Members

abstractdefaultsObject

Methods

canEmit(){boolean}

can we emit?

canRecognizeWith(otherRecognizer){Boolean}

if the recognizer can recognize simultaneous with an other recognizer

Name Type Description
otherRecognizer Recognizer

dropRecognizeWith(otherRecognizer){Recognizer}

drop the simultaneous link. it doesnt remove the link on the other recognizer.

Name Type Description
otherRecognizer Recognizer

dropRequireFailure(otherRecognizer){Recognizer}

drop the requireFailure link. it does not remove the link on the other recognizer.

Name Type Description
otherRecognizer Recognizer

emit(input)

You should use tryEmit instead of emit directly to check
that all the needed recognizers has failed before emitting.

Name Type Description
input Object

abstractgetTouchAction(){Array}

return the preferred touch-action

hasRequireFailures(){boolean}

has require failures boolean

abstractprocess(inputData){Const}

return the state of the recognizer
the actual recognizing happens in this method

Name Type Description
inputData Object

recognize(inputData)

update the recognizer

Name Type Description
inputData Object

recognizeWith(otherRecognizer){Recognizer}

recognize simultaneous with an other recognizer.

Name Type Description
otherRecognizer Recognizer

requireFailure(otherRecognizer){Recognizer}

recognizer can only run when an other is failing

Name Type Description
otherRecognizer Recognizer

abstractreset()

called when the gesture isn't allowed to recognize
like when another is being recognized or it is disabled

set options

Name Type Description
options Object

tryEmit(input)

Check that all the require failure recognizers has failed,
if true, it emits a gesture event,
otherwise, setup the state to FAILED.

Name Type Description
input Object