mirror of
				https://github.com/flynx/PortableMag.git
				synced 2025-10-30 19:40:12 +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); | 		if (that.options.onBeforeScrollEnd) that.options.onBeforeScrollEnd.call(that, e); | ||||||
| 
 | 
 | ||||||
|  | 		/* | ||||||
| 		// XXX do we need this?
 | 		// XXX do we need this?
 | ||||||
| 		if (that.zoomed) { | 		if (that.zoomed) { | ||||||
| 			scale = that.scale * that.lastScale; | 			scale = that.scale * that.lastScale; | ||||||
| @ -424,6 +425,7 @@ iScroll.prototype = { | |||||||
| 			if (that.options.onZoomEnd) that.options.onZoomEnd.call(that, e); | 			if (that.options.onZoomEnd) that.options.onZoomEnd.call(that, e); | ||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
|  | 		*/ | ||||||
| 
 | 
 | ||||||
| 		if (!that.moved) { | 		if (!that.moved) { | ||||||
| 			if (hasTouch) { | 			if (hasTouch) { | ||||||
|  | |||||||
| @ -133,9 +133,10 @@ $(document).ready(function(){ | |||||||
| 	$('.viewer') | 	$('.viewer') | ||||||
| 		.on('scrollCancelled', function(){ setCurrentPage() }) | 		.on('scrollCancelled', function(){ setCurrentPage() }) | ||||||
| 		//.on('shortClick', handleClick) | 		//.on('shortClick', handleClick) | ||||||
| 		.on('swipeLeft', handleSwipeLeft)  | 		//.on('swipeLeft', handleSwipeLeft)  | ||||||
| 		.on('swipeRight', handleSwipeRight) | 		//.on('swipeRight', handleSwipeRight) | ||||||
| 		.on('screenReleased', handleScrollRelease) | 		//.on('screenReleased', handleScrollRelease) | ||||||
|  | 		.on('screenReleased swipeRight swipeLeft', handleScrollRelease) | ||||||
| 
 | 
 | ||||||
| 	/* | 	/* | ||||||
| 	// try a way of cheating... | 	// try a way of cheating... | ||||||
|  | |||||||
| @ -77,6 +77,13 @@ function makeSwipeHandler(action){ | |||||||
| 	return function(evt, data){ | 	return function(evt, data){ | ||||||
| 		// ribbon mode...
 | 		// ribbon mode...
 | ||||||
| 		if(isNavigationViewRelative()){ | 		if(isNavigationViewRelative()){ | ||||||
|  | 
 | ||||||
|  | 			// this makes things snap...
 | ||||||
|  | 			if(SNAP_TO_PAGES_IN_RIBBON){ | ||||||
|  | 				setCurrentPage() | ||||||
|  | 				return | ||||||
|  | 			} | ||||||
|  | 
 | ||||||
| 			return handleScrollRelease(evt, data) | 			return handleScrollRelease(evt, data) | ||||||
| 		} | 		} | ||||||
| 		// full page view...
 | 		// full page view...
 | ||||||
| @ -95,11 +102,13 @@ var handleSwipeRight = makeSwipeHandler(nextPage) | |||||||
| //		explicitly bind them...
 | //		explicitly bind them...
 | ||||||
| // XXX restore all the changed values...
 | // XXX restore all the changed values...
 | ||||||
| function handleScrollRelease(evt, data){ | function handleScrollRelease(evt, data){ | ||||||
|  | 	/* | ||||||
| 	// this makes things snap...
 | 	// this makes things snap...
 | ||||||
| 	if(SNAP_TO_PAGES_IN_RIBBON || !isNavigationViewRelative()){ | 	if(SNAP_TO_PAGES_IN_RIBBON || !isNavigationViewRelative()){ | ||||||
| 		setCurrentPage() | 		setCurrentPage() | ||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
|  | 	*/ | ||||||
| 
 | 
 | ||||||
| 	var speed = data.speed.x | 	var speed = data.speed.x | ||||||
| 	var pages = $('.page') | 	var pages = $('.page') | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user