reset = function () {
clearTimeout( self._gesture_timer );
self._gesture_dir = 0;
- self._gesture_count = 0;
self._gesture_timer = undefined;
},
direction = {
}
if ( !this._gesture_timer ) {
- this._gesture_count = 1;
this._gesture_dir = dir;
this._gesture_timer = setTimeout( function () {
return false;
}
- this._gesture_count++;
-
- if ( this._gesture_count === 3 ) {
- switch ( dir ) {
- case direction.top:
- this.scrollTo( this._sx, 0, this.options.overshootDuration );
- break;
- case direction.bottom:
- this.scrollTo( this._sx, -( this._getViewHeight() - this._$clip.height() ),
- this.options.overshootDuration );
- break;
- case direction.left:
- this.scrollTo( 0, this._sy, this.options.overshootDuration );
- break;
- case direction.right:
- this.scrollTo( -( this._getViewWidth() - this._$clip.width() ), this._sy,
- this.options.overshootDuration );
- break;
- }
-
- reset();
- this._didDrag = true;
-
- return true;
- }
-
return false;
},