nl_tokens: Called whenever the user starts moving the scroll - view using touch gestures .
pl_tokens: function _touchStart ( event ) { // Create touch-end event listener if ( ! this . _touchEndEventListener ) { this . _touchEndEventListener = function ( event2 ) { event2 . target . removeEventListener ( 'touchend' , this . _touchEndEventListener ) ; _touchEnd . call ( this , event2 ) ; } . bind ( this ) ; } // Remove any touches that are no longer active var oldTouchesCount = this . _scroll . activeTouches . length ; var i = 0 ; var j ; var touchFound ; while ( i < this . _scroll . activeTouches . length ) { var activeTouch = this . _scroll . activeTouches [ i ] ; touchFound = false ; for ( j = 0 ; j < event . touches . length ; j ++ ) { var touch = event . touches [ j ] ; if ( <mask> . identifier === activeTouch . id ) { touchFound = true ; break ; } } if ( ! touchFound ) { //_log.cal(this, 'removing touch with id: ', activeTouch.id); this . _scroll . activeTouches . splice ( i , 1 ) ; } else { i ++ ; } } // Process touch for ( i = 0 ; i < event . touches . length ; i ++ ) { var changedTouch = event . touches [ i ] ; touchFound = false ; for ( j = 0 ; j < this . _scroll . activeTouches . length ; j ++ ) { if ( this . _scroll . activeTouches [ j ] . id === changedTouch . identifier ) { touchFound = true ; break ; } } if ( ! touchFound ) { var current = [ changedTouch . clientX , changedTouch . clientY ] ; var time = _getEventTimestamp ( event ) ; this . _scroll . activeTouches . push ( { id : changedTouch . identifier , start : current , current : current , prev : current , time : time , prevTime : time } ) ; // The following listener is automatically removed after touchend is received // and ensures that the scrollview always received touchend. changedTouch . target . addEventListener ( 'touchend' , this . _touchEndEventListener ) ; } } // The first time a touch new touch gesture has arrived, emit event if ( ! oldTouchesCount && this . _scroll . activeTouches . length ) { this . applyScrollForce ( 0 ) ; this . _scroll . touchDelta = 0 ; } }