mirror of
				https://github.com/flynx/PortableMag.git
				synced 2025-10-31 03:50:16 +00:00 
			
		
		
		
	doing magic testing...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									9a37cadb1e
								
							
						
					
					
						commit
						b45f9996d0
					
				| @ -404,6 +404,7 @@ iScroll.prototype = { | ||||
| 
 | ||||
| 		if (that.options.onBeforeScrollEnd) that.options.onBeforeScrollEnd.call(that, e); | ||||
| 
 | ||||
| 		/* | ||||
| 		// XXX do we need this?
 | ||||
| 		if (that.zoomed) { | ||||
| 			scale = that.scale * that.lastScale; | ||||
| @ -424,6 +425,7 @@ iScroll.prototype = { | ||||
| 			if (that.options.onZoomEnd) that.options.onZoomEnd.call(that, e); | ||||
| 			return; | ||||
| 		} | ||||
| 		*/ | ||||
| 
 | ||||
| 		if (!that.moved) { | ||||
| 			if (hasTouch) { | ||||
|  | ||||
| @ -133,9 +133,10 @@ $(document).ready(function(){ | ||||
| 	$('.viewer') | ||||
| 		.on('scrollCancelled', function(){ setCurrentPage() }) | ||||
| 		//.on('shortClick', handleClick) | ||||
| 		.on('swipeLeft', handleSwipeLeft)  | ||||
| 		.on('swipeRight', handleSwipeRight) | ||||
| 		.on('screenReleased', handleScrollRelease) | ||||
| 		//.on('swipeLeft', handleSwipeLeft)  | ||||
| 		//.on('swipeRight', handleSwipeRight) | ||||
| 		//.on('screenReleased', handleScrollRelease) | ||||
| 		.on('screenReleased swipeRight swipeLeft', handleScrollRelease) | ||||
| 
 | ||||
| 	/* | ||||
| 	// try a way of cheating... | ||||
|  | ||||
| @ -77,6 +77,13 @@ function makeSwipeHandler(action){ | ||||
| 	return function(evt, data){ | ||||
| 		// ribbon mode...
 | ||||
| 		if(isNavigationViewRelative()){ | ||||
| 
 | ||||
| 			// this makes things snap...
 | ||||
| 			if(SNAP_TO_PAGES_IN_RIBBON){ | ||||
| 				setCurrentPage() | ||||
| 				return | ||||
| 			} | ||||
| 
 | ||||
| 			return handleScrollRelease(evt, data) | ||||
| 		} | ||||
| 		// full page view...
 | ||||
| @ -95,11 +102,13 @@ var handleSwipeRight = makeSwipeHandler(nextPage) | ||||
| //		explicitly bind them...
 | ||||
| // XXX restore all the changed values...
 | ||||
| function handleScrollRelease(evt, data){ | ||||
| 	/* | ||||
| 	// this makes things snap...
 | ||||
| 	if(SNAP_TO_PAGES_IN_RIBBON || !isNavigationViewRelative()){ | ||||
| 		setCurrentPage() | ||||
| 		return | ||||
| 	} | ||||
| 	*/ | ||||
| 
 | ||||
| 	var speed = data.speed.x | ||||
| 	var pages = $('.page') | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user