API Docs for: 1.1.2

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:150

dispose this hammer instance


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

enable of disable hammer.js detection

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

unbind events to the instance

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

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:66

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

eventStartHandler <Object>
src/instance.js:53

event start handler on the element to start the detection

options <Object>
src/instance.js:35

options, merged with the defaults options with an _ are converted to camelCase