core/src/ons/gesture-detector.js
function getTouchList(ev, eventType) {
    // get the fake pointerEvent touchlist
    if (GestureDetector.HAS_POINTEREVENTS) {
      return PointerEvent.getTouchList();
    }

    // get the touchlist
    if (ev.touches) {
      if (eventType == EVENT_MOVE) {
        return ev.touches;
      }

      var identifiers = [];
      var concat = [].concat(Utils.toArray(ev.touches), Utils.toArray(ev.changedTouches));
      var touchList = [];

      Utils.each(concat, function(touch) {
        if (Utils.inArray(identifiers, touch.identifier) === -1) {
          touchList.push(touch);
        }
        identifiers.push(touch.identifier);
      });

      return touchList;
    }

    // make fake touchList from mouse position
    ev.identifier = 1;
    return [ev];
  }
function getTouchList(ev, eventType) {
    // get the fake pointerEvent touchlist
    if (GestureDetector.HAS_POINTEREVENTS) {
      return PointerEvent.getTouchList();
    }

    // get the touchlist
    if (ev.touches) {
      if (eventType == EVENT_MOVE) {
        return ev.touches;
      }

      var identifiers = [];
      var concat = [].concat(Utils.toArray(ev.touches), Utils.toArray(ev.changedTouches));
      var touchList = [];

      Utils.each(concat, function(touch) {
        if (Utils.inArray(identifiers, touch.identifier) === -1) {
          touchList.push(touch);
        }
        identifiers.push(touch.identifier);
      });

      return touchList;
    }

    // make fake touchList from mouse position
    ev.identifier = 1;
    return [ev];
  }
function getTouchList ( ev , eventType ) { // get the fake pointerEvent touchlist if ( GestureDetector . HAS_POINTEREVENTS ) { return PointerEvent . getTouchList ( ) ; } // get the touchlist if ( ev . touches ) { if ( eventType == EVENT_MOVE ) { return ev . touches ; } var identifiers = [ ] ; var concat = [ ] . concat ( Utils . toArray ( ev . touches ) , Utils . toArray ( ev . changedTouches ) ) ; var touchList = [ ] ; Utils . each ( concat , function ( touch ) { if ( Utils . inArray ( identifiers , touch . identifier ) === - 1 ) { touchList . push ( touch ) ; } identifiers . push ( touch . identifier ) ; } ) ; return touchList ; } // make fake touchList from mouse position ev . identifier = 1 ; return [ ev ] ; }
create touchList depending on the event
@param {Object} ev
@param {String} eventType
@return {Array} touches
create touchList depending on the event