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 otherRecognizerRecognizer  - 
    
dropRecognizeWith(otherRecognizer){Recognizer}
 - 
    
    
    
drop the simultaneous link. it doesnt remove the link on the other recognizer.
Name Type Description otherRecognizerRecognizer  - 
    
dropRequireFailure(otherRecognizer){Recognizer}
 - 
    
    
    
drop the requireFailure link. it does not remove the link on the other recognizer.
Name Type Description otherRecognizerRecognizer  - 
    
emit(input)
 - 
    
    
    
You should use
tryEmitinstead ofemitdirectly to check
that all the needed recognizers has failed before emitting.Name Type Description inputObject  - 
    
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 methodName Type Description inputDataObject  - 
    
recognize(inputData)
 - 
    
    
    
update the recognizer
Name Type Description inputDataObject  - 
    
recognizeWith(otherRecognizer){Recognizer}
 - 
    
    
    
recognize simultaneous with an other recognizer.
Name Type Description otherRecognizerRecognizer  - 
    
requireFailure(otherRecognizer){Recognizer}
 - 
    
    
    
recognizer can only run when an other is failing
Name Type Description otherRecognizerRecognizer  - 
    
abstractreset()
 - 
    
    
    
called when the gesture isn't allowed to recognize
like when another is being recognized or it is disabled - 
    
set(options){Recognizer}
 - 
    
    
    
set options
Name Type Description optionsObject  - 
    
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 inputObject