documentation/presentation/reveal.js-2.6.2/plugin/zoom-js/zoom.js
function pan() {
		var range = 0.12,
			rangeX = window.innerWidth * range,
			rangeY = window.innerHeight * range,
			scrollOffset = getScrollOffset();

		// Up
		if( mouseY < rangeY ) {
			window.scroll( scrollOffset.x, scrollOffset.y - ( 1 - ( mouseY / rangeY ) ) * ( 14 / level ) );
		}
		// Down
		else if( mouseY > window.innerHeight - rangeY ) {
			window.scroll( scrollOffset.x, scrollOffset.y + ( 1 - ( window.innerHeight - mouseY ) / rangeY ) * ( 14 / level ) );
		}

		// Left
		if( mouseX < rangeX ) {
			window.scroll( scrollOffset.x - ( 1 - ( mouseX / rangeX ) ) * ( 14 / level ), scrollOffset.y );
		}
		// Right
		else if( mouseX > window.innerWidth - rangeX ) {
			window.scroll( scrollOffset.x + ( 1 - ( window.innerWidth - mouseX ) / rangeX ) * ( 14 / level ), scrollOffset.y );
		}
	}
function pan() {
		var range = 0.12,
			rangeX = window.innerWidth * range,
			rangeY = window.innerHeight * range,
			scrollOffset = getScrollOffset();

		// Up
		if( mouseY < rangeY ) {
			window.scroll( scrollOffset.x, scrollOffset.y - ( 1 - ( mouseY / rangeY ) ) * ( 14 / level ) );
		}
		// Down
		else if( mouseY > window.innerHeight - rangeY ) {
			window.scroll( scrollOffset.x, scrollOffset.y + ( 1 - ( window.innerHeight - mouseY ) / rangeY ) * ( 14 / level ) );
		}

		// Left
		if( mouseX < rangeX ) {
			window.scroll( scrollOffset.x - ( 1 - ( mouseX / rangeX ) ) * ( 14 / level ), scrollOffset.y );
		}
		// Right
		else if( mouseX > window.innerWidth - rangeX ) {
			window.scroll( scrollOffset.x + ( 1 - ( window.innerWidth - mouseX ) / rangeX ) * ( 14 / level ), scrollOffset.y );
		}
	}
function pan ( ) { var range = 0.12 , rangeX = window . innerWidth * range , rangeY = window . innerHeight * range , scrollOffset = getScrollOffset ( ) ; // Up if ( mouseY < rangeY ) { window . scroll ( scrollOffset . x , scrollOffset . y - ( 1 - ( mouseY / rangeY ) ) * ( 14 / level ) ) ; } // Down else if ( mouseY > window . innerHeight - rangeY ) { window . scroll ( scrollOffset . x , scrollOffset . y + ( 1 - ( window . innerHeight - mouseY ) / rangeY ) * ( 14 / level ) ) ; } // Left if ( mouseX < rangeX ) { window . scroll ( scrollOffset . x - ( 1 - ( mouseX / rangeX ) ) * ( 14 / level ) , scrollOffset . y ) ; } // Right else if ( mouseX > window . innerWidth - rangeX ) { window . scroll ( scrollOffset . x + ( 1 - ( window . innerWidth - mouseX ) / rangeX ) * ( 14 / level ) , scrollOffset . y ) ; } }
Pan the document when the mosue cursor approaches the edges
of the window.
Pan the document when the mosue cursor approaches the edges of the window .