examples/ionic1/www/lib/ionic/js/ionic.bundle.js
function(touches, timeStamp) {
    var self = this;

    // remember if the deceleration was just stopped
    self.__decStopped = !!(self.__isDecelerating || self.__isAnimating);

    self.hintResize();

    if (timeStamp instanceof Date) {
      timeStamp = timeStamp.valueOf();
    }
    if (typeof timeStamp !== "number") {
      timeStamp = Date.now();
    }

    // Reset interruptedAnimation flag
    self.__interruptedAnimation = true;

    // Stop deceleration
    if (self.__isDecelerating) {
      zyngaCore.effect.Animate.stop(self.__isDecelerating);
      self.__isDecelerating = false;
      self.__interruptedAnimation = true;
    }

    // Stop animation
    if (self.__isAnimating) {
      zyngaCore.effect.Animate.stop(self.__isAnimating);
      self.__isAnimating = false;
      self.__interruptedAnimation = true;
    }

    // Use center point when dealing with two fingers
    var currentTouchLeft, currentTouchTop;
    var isSingleTouch = touches.length === 1;
    if (isSingleTouch) {
      currentTouchLeft = touches[0].pageX;
      currentTouchTop = touches[0].pageY;
    } else {
      currentTouchLeft = Math.abs(touches[0].pageX + touches[1].pageX) / 2;
      currentTouchTop = Math.abs(touches[0].pageY + touches[1].pageY) / 2;
    }

    // Store initial positions
    self.__initialTouchLeft = currentTouchLeft;
    self.__initialTouchTop = currentTouchTop;

    // Store initial touchList for scale calculation
    self.__initialTouches = touches;

    // Store current zoom level
    self.__zoomLevelStart = self.__zoomLevel;

    // Store initial touch positions
    self.__lastTouchLeft = currentTouchLeft;
    self.__lastTouchTop = currentTouchTop;

    // Store initial move time stamp
    self.__lastTouchMove = timeStamp;

    // Reset initial scale
    self.__lastScale = 1;

    // Reset locking flags
    self.__enableScrollX = !isSingleTouch && self.options.scrollingX;
    self.__enableScrollY = !isSingleTouch && self.options.scrollingY;

    // Reset tracking flag
    self.__isTracking = true;

    // Reset deceleration complete flag
    self.__didDecelerationComplete = false;

    // Dragging starts directly with two fingers, otherwise lazy with an offset
    self.__isDragging = !isSingleTouch;

    // Some features are disabled in multi touch scenarios
    self.__isSingleTouch = isSingleTouch;

    // Clearing data structure
    self.__positions = [];

  }
function(touches, timeStamp) {
    var self = this;

    // remember if the deceleration was just stopped
    self.__decStopped = !!(self.__isDecelerating || self.__isAnimating);

    self.hintResize();

    if (timeStamp instanceof Date) {
      timeStamp = timeStamp.valueOf();
    }
    if (typeof timeStamp !== "number") {
      timeStamp = Date.now();
    }

    // Reset interruptedAnimation flag
    self.__interruptedAnimation = true;

    // Stop deceleration
    if (self.__isDecelerating) {
      zyngaCore.effect.Animate.stop(self.__isDecelerating);
      self.__isDecelerating = false;
      self.__interruptedAnimation = true;
    }

    // Stop animation
    if (self.__isAnimating) {
      zyngaCore.effect.Animate.stop(self.__isAnimating);
      self.__isAnimating = false;
      self.__interruptedAnimation = true;
    }

    // Use center point when dealing with two fingers
    var currentTouchLeft, currentTouchTop;
    var isSingleTouch = touches.length === 1;
    if (isSingleTouch) {
      currentTouchLeft = touches[0].pageX;
      currentTouchTop = touches[0].pageY;
    } else {
      currentTouchLeft = Math.abs(touches[0].pageX + touches[1].pageX) / 2;
      currentTouchTop = Math.abs(touches[0].pageY + touches[1].pageY) / 2;
    }

    // Store initial positions
    self.__initialTouchLeft = currentTouchLeft;
    self.__initialTouchTop = currentTouchTop;

    // Store initial touchList for scale calculation
    self.__initialTouches = touches;

    // Store current zoom level
    self.__zoomLevelStart = self.__zoomLevel;

    // Store initial touch positions
    self.__lastTouchLeft = currentTouchLeft;
    self.__lastTouchTop = currentTouchTop;

    // Store initial move time stamp
    self.__lastTouchMove = timeStamp;

    // Reset initial scale
    self.__lastScale = 1;

    // Reset locking flags
    self.__enableScrollX = !isSingleTouch && self.options.scrollingX;
    self.__enableScrollY = !isSingleTouch && self.options.scrollingY;

    // Reset tracking flag
    self.__isTracking = true;

    // Reset deceleration complete flag
    self.__didDecelerationComplete = false;

    // Dragging starts directly with two fingers, otherwise lazy with an offset
    self.__isDragging = !isSingleTouch;

    // Some features are disabled in multi touch scenarios
    self.__isSingleTouch = isSingleTouch;

    // Clearing data structure
    self.__positions = [];

  }
function ( touches , timeStamp ) { var self = this ; // remember if the deceleration was just stopped self . __decStopped = ! ! ( self . __isDecelerating || self . __isAnimating ) ; self . hintResize ( ) ; if ( timeStamp instanceof Date ) { timeStamp = timeStamp . valueOf ( ) ; } if ( typeof timeStamp !== "number" ) { timeStamp = Date . now ( ) ; } // Reset interruptedAnimation flag self . __interruptedAnimation = true ; // Stop deceleration if ( self . __isDecelerating ) { zyngaCore . effect . Animate . stop ( self . __isDecelerating ) ; self . __isDecelerating = false ; self . __interruptedAnimation = true ; } // Stop animation if ( self . __isAnimating ) { zyngaCore . effect . Animate . stop ( self . __isAnimating ) ; self . __isAnimating = false ; self . __interruptedAnimation = true ; } // Use center point when dealing with two fingers var currentTouchLeft , currentTouchTop ; var isSingleTouch = touches . length === 1 ; if ( isSingleTouch ) { currentTouchLeft = touches [ 0 ] . pageX ; currentTouchTop = touches [ 0 ] . pageY ; } else { currentTouchLeft = Math . abs ( touches [ 0 ] . pageX + touches [ 1 ] . pageX ) / 2 ; currentTouchTop = Math . abs ( touches [ 0 ] . pageY + touches [ 1 ] . pageY ) / 2 ; } // Store initial positions self . __initialTouchLeft = currentTouchLeft ; self . __initialTouchTop = currentTouchTop ; // Store initial touchList for scale calculation self . __initialTouches = touches ; // Store current zoom level self . __zoomLevelStart = self . __zoomLevel ; // Store initial touch positions self . __lastTouchLeft = currentTouchLeft ; self . __lastTouchTop = currentTouchTop ; // Store initial move time stamp self . __lastTouchMove = timeStamp ; // Reset initial scale self . __lastScale = 1 ; // Reset locking flags self . __enableScrollX = ! isSingleTouch && self . options . scrollingX ; self . __enableScrollY = ! isSingleTouch && self . options . scrollingY ; // Reset tracking flag self . __isTracking = true ; // Reset deceleration complete flag self . __didDecelerationComplete = false ; // Dragging starts directly with two fingers, otherwise lazy with an offset self . __isDragging = ! isSingleTouch ; // Some features are disabled in multi touch scenarios self . __isSingleTouch = isSingleTouch ; // Clearing data structure self . __positions = [ ] ; }
Touch start handler for scrolling support
Touch start handler for scrolling support