API Docs for: 1.1.0

Class Instance

Class defined in: src/instance.js:5

create new hammer instance all methods should return the instance itself, so it is chainable.

Hammer.Instance Instance( element, [options={}] )
src/instance.js:5
Parameters:
  • element <HTMLElement>
  • [options={}] <Object>

    options are merged with Hammer.defaults


Returns: <Hammer.Instance>
Null dispose( )
src/instance.js:152

dispose this hammer instance


Returns: <Null>
chainable enable( state )
src/instance.js:140

enable of disable hammer.js detection

Parameters:
chainable off( gestures, handler )
src/instance.js:90

unbind events to the instance

Parameters:
chainable on( gestures, handler )
src/instance.js:73

bind events to the instance

Parameters:
  • gestures <String>

    multiple gestures by splitting with a space

  • handler <Function>
chainable trigger( gesture, [eventData] )
src/instance.js:110

trigger gesture event

Parameters:
eventHandlers <Array>
src/instance.js:63

keep a list of user event handlers which needs to be removed when calling 'dispose'

eventStartHandler <Object>
src/instance.js:49

event start handler on the element to start the detection

options <Object>
src/instance.js:35

options, merged with the defaults