index.js
function (input) {
    // not needed with native support for the touchAction property
    if (NATIVE_TOUCH_ACTION) {
      return;
    }

    var srcEvent = input.srcEvent;
    var direction = input.offsetDirection;

    // if the touch action did prevented once this session
    if (this.manager.session.prevented) {
      srcEvent.preventDefault();
      return;
    }

    var actions = this.actions;
    var hasNone = inStr(actions, TOUCH_ACTION_NONE);
    var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);
    var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);

    if (hasNone ||
      (hasPanY && direction & DIRECTION_HORIZONTAL) ||
      (hasPanX && direction & DIRECTION_VERTICAL)) {
      return this.preventSrc(srcEvent);
    }
  }
function (input) {
    // not needed with native support for the touchAction property
    if (NATIVE_TOUCH_ACTION) {
      return;
    }

    var srcEvent = input.srcEvent;
    var direction = input.offsetDirection;

    // if the touch action did prevented once this session
    if (this.manager.session.prevented) {
      srcEvent.preventDefault();
      return;
    }

    var actions = this.actions;
    var hasNone = inStr(actions, TOUCH_ACTION_NONE);
    var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);
    var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);

    if (hasNone ||
      (hasPanY && direction & DIRECTION_HORIZONTAL) ||
      (hasPanX && direction & DIRECTION_VERTICAL)) {
      return this.preventSrc(srcEvent);
    }
  }
function ( input ) { // not needed with native support for the touchAction property if ( NATIVE_TOUCH_ACTION ) { return ; } var srcEvent = input . srcEvent ; var direction = input . offsetDirection ; // if the touch action did prevented once this session if ( this . manager . session . prevented ) { srcEvent . preventDefault ( ) ; return ; } var actions = this . actions ; var hasNone = inStr ( actions , TOUCH_ACTION_NONE ) ; var hasPanY = inStr ( actions , TOUCH_ACTION_PAN_Y ) ; var hasPanX = inStr ( actions , TOUCH_ACTION_PAN_X ) ; if ( hasNone || ( hasPanY && direction & DIRECTION_HORIZONTAL ) || ( hasPanX && direction & DIRECTION_VERTICAL ) ) { return this . preventSrc ( srcEvent ) ; } }
this method is called on each input cycle and provides the preventing of the browser behavior
@param {Object} input
this method is called on each input cycle and provides the preventing of the browser behavior