function updateEvent(event, touch, timeStamp, timer) {
		var time = timeStamp - event.timeStamp;

		event.type = 'move';
		event.distX =  touch.pageX - event.startX;
		event.distY =  touch.pageY - event.startY;
		event.deltaX = touch.pageX - event.pageX;
		event.deltaY = touch.pageY - event.pageY;
		
		// Average the velocity of the last few events using a decay
		// curve to even out spurious jumps in values.
		event.velocityX = 0.3 * event.velocityX + 0.7 * event.deltaX / time;
		event.velocityY = 0.3 * event.velocityY + 0.7 * event.deltaY / time;
		event.pageX =  touch.pageX;
		event.pageY =  touch.pageY;

		timer.kick();
	}
// Logic for triggering move and moveend events
Logic for triggering move and moveend events
Logic for triggering move and moveend events
function updateEvent(event, touch, timeStamp, timer) {
		var time = timeStamp - event.timeStamp;
		event.type = 'move';
		event.distX =  touch.pageX - event.startX;
		event.distY =  touch.pageY - event.startY;
		event.deltaX = touch.pageX - event.pageX;
		event.deltaY = touch.pageY - event.pageY;
		event.velocityX = 0.3 * event.velocityX + 0.7 * event.deltaX / time;
		event.velocityY = 0.3 * event.velocityY + 0.7 * event.deltaY / time;
		event.pageX =  touch.pageX;
		event.pageY =  touch.pageY;
		timer.kick();
	}
function updateEvent ( event , touch , timeStamp , timer ) { var time = timeStamp - event . timeStamp ; event . type = 'move' ; event . distX = touch . pageX - event . startX ; event . distY = touch . pageY - event . startY ; event . deltaX = touch . pageX - event . pageX ; event . deltaY = touch . pageY - event . pageY ; event . velocityX = 0.3 * event . velocityX + 0.7 * event . deltaX / time ; event . velocityY = 0.3 * event . velocityY + 0.7 * event . deltaY / time ; event . pageX = touch . pageX ; event . pageY = touch . pageY ; timer . kick ( ) ; }
Logic for triggering move and moveend events
Logic for triggering move and moveend events
// Average the velocity of the last few events using a decay // curve to even out spurious jumps in values.