index.js
function TMEhandler(manager, inputEvent, inputData) {
    var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH);
    var isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE);

    // when we're in a touch event, so  block all upcoming mouse events
    // most mobile browser also emit mouseevents, right after touchstart
    if (isTouch) {
      this.mouse.allow = false;
    } else if (isMouse && !this.mouse.allow) {
      return;
    }

    // reset the allowMouse when we're done
    if (inputEvent & (INPUT_END | INPUT_CANCEL)) {
      this.mouse.allow = true;
    }

    this.callback(manager, inputEvent, inputData);
  }
function TMEhandler(manager, inputEvent, inputData) {
    var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH);
    var isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE);

    // when we're in a touch event, so  block all upcoming mouse events
    // most mobile browser also emit mouseevents, right after touchstart
    if (isTouch) {
      this.mouse.allow = false;
    } else if (isMouse && !this.mouse.allow) {
      return;
    }

    // reset the allowMouse when we're done
    if (inputEvent & (INPUT_END | INPUT_CANCEL)) {
      this.mouse.allow = true;
    }

    this.callback(manager, inputEvent, inputData);
  }
function TMEhandler ( manager , inputEvent , inputData ) { var isTouch = ( inputData . pointerType == INPUT_TYPE_TOUCH ) ; var isMouse = ( inputData . pointerType == INPUT_TYPE_MOUSE ) ; // when we're in a touch event, so  block all upcoming mouse events // most mobile browser also emit mouseevents, right after touchstart if ( isTouch ) { this . mouse . allow = false ; } else if ( isMouse && ! this . mouse . allow ) { return ; } // reset the allowMouse when we're done if ( inputEvent & ( INPUT_END | INPUT_CANCEL ) ) { this . mouse . allow = true ; } this . callback ( manager , inputEvent , inputData ) ; }
handle mouse and touch events
@param {Mallet} manager
@param {String} inputEvent
@param {Object} inputData
handle mouse and touch events