js/lib/hammer.js
function register(gesture) {
    // add an enable gesture options if there is no given
    var options = gesture.defaults || {};
    if(options[gesture.name] === undefined) {
      options[gesture.name] = true;
    }

    // extend Hammer default options with the Hammer.gesture options
    Hammer.utils.extend(Hammer.defaults, options, true);

    // set its index
    gesture.index = gesture.index || 1000;

    // add Hammer.gesture to the list
    this.gestures.push(gesture);

    // sort the list by index
    this.gestures.sort(function(a, b) {
      if(a.index < b.index) { return -1; }
      if(a.index > b.index) { return 1; }
      return 0;
    });

    return this.gestures;
  }
function register(gesture) {
    // add an enable gesture options if there is no given
    var options = gesture.defaults || {};
    if(options[gesture.name] === undefined) {
      options[gesture.name] = true;
    }

    // extend Hammer default options with the Hammer.gesture options
    Hammer.utils.extend(Hammer.defaults, options, true);

    // set its index
    gesture.index = gesture.index || 1000;

    // add Hammer.gesture to the list
    this.gestures.push(gesture);

    // sort the list by index
    this.gestures.sort(function(a, b) {
      if(a.index < b.index) { return -1; }
      if(a.index > b.index) { return 1; }
      return 0;
    });

    return this.gestures;
  }
function register ( gesture ) { // add an enable gesture options if there is no given var options = gesture . defaults || { } ; if ( options [ gesture . name ] === undefined ) { options [ gesture . name ] = true ; } // extend Hammer default options with the Hammer.gesture options Hammer . utils . extend ( Hammer . defaults , options , true ) ; // set its index gesture . index = gesture . index || 1000 ; // add Hammer.gesture to the list this . gestures . push ( gesture ) ; // sort the list by index this . gestures . sort ( function ( a , b ) { if ( a . index < b . index ) { return - 1 ; } if ( a . index > b . index ) { return 1 ; } return 0 ; } ) ; return this . gestures ; }
register new gesture
@param   {Object}    gesture object, see gestures.js for documentation
@returns {Array}     gestures
register new gesture