examples/touch/hammer.js
function collectEventData(element, eventType, touches, ev) {
    // find out pointerType
    var pointerType = POINTER_TOUCH;
    if(Utils.inStr(ev.type, 'mouse') || PointerEvent.matchType(POINTER_MOUSE, ev)) {
      pointerType = POINTER_MOUSE;
    }

    return {
      center     : Utils.getCenter(touches),
      timeStamp  : new Date().getTime(),
      target     : ev.target,
      touches    : touches,
      eventType  : eventType,
      pointerType: pointerType,
      srcEvent   : ev,

      /**
       * prevent the browser default actions
       * mostly used to disable scrolling of the browser
       */
      preventDefault: function() {
        var srcEvent = this.srcEvent;
        srcEvent.preventManipulation && srcEvent.preventManipulation();
        srcEvent.preventDefault && srcEvent.preventDefault();
      },

      /**
       * stop bubbling the event up to its parents
       */
      stopPropagation: function() {
        this.srcEvent.stopPropagation();
      },

      /**
       * immediately stop gesture detection
       * might be useful after a swipe was detected
       * @return {*}
       */
      stopDetect: function() {
        return Detection.stopDetect();
      }
    };
  }
function collectEventData(element, eventType, touches, ev) {
    // find out pointerType
    var pointerType = POINTER_TOUCH;
    if(Utils.inStr(ev.type, 'mouse') || PointerEvent.matchType(POINTER_MOUSE, ev)) {
      pointerType = POINTER_MOUSE;
    }

    return {
      center     : Utils.getCenter(touches),
      timeStamp  : new Date().getTime(),
      target     : ev.target,
      touches    : touches,
      eventType  : eventType,
      pointerType: pointerType,
      srcEvent   : ev,

      /**
       * prevent the browser default actions
       * mostly used to disable scrolling of the browser
       */
      preventDefault: function() {
        var srcEvent = this.srcEvent;
        srcEvent.preventManipulation && srcEvent.preventManipulation();
        srcEvent.preventDefault && srcEvent.preventDefault();
      },

      /**
       * stop bubbling the event up to its parents
       */
      stopPropagation: function() {
        this.srcEvent.stopPropagation();
      },

      /**
       * immediately stop gesture detection
       * might be useful after a swipe was detected
       * @return {*}
       */
      stopDetect: function() {
        return Detection.stopDetect();
      }
    };
  }
function collectEventData ( element , eventType , touches , ev ) { // find out pointerType var pointerType = POINTER_TOUCH ; if ( Utils . inStr ( ev . type , 'mouse' ) || PointerEvent . matchType ( POINTER_MOUSE , ev ) ) { pointerType = POINTER_MOUSE ; } return { center : Utils . getCenter ( touches ) , timeStamp : new Date ( ) . getTime ( ) , target : ev . target , touches : touches , eventType : eventType , pointerType : pointerType , srcEvent : ev , /**
       * prevent the browser default actions
       * mostly used to disable scrolling of the browser
       */ preventDefault : function ( ) { var srcEvent = this . srcEvent ; srcEvent . preventManipulation && srcEvent . preventManipulation ( ) ; srcEvent . preventDefault && srcEvent . preventDefault ( ) ; } , /**
       * stop bubbling the event up to its parents
       */ stopPropagation : function ( ) { this . srcEvent . stopPropagation ( ) ; } , /**
       * immediately stop gesture detection
       * might be useful after a swipe was detected
       * @return {*}
       */ stopDetect : function ( ) { return Detection . stopDetect ( ) ; } } ; }
collect event data for Hammer js
@param   {HTMLElement}   element
@param   {String}        eventType        like EVENT_MOVE
@param   {Object}        eventData
collect event data for Hammer js