mirror of
				https://github.com/flynx/PortableMag.git
				synced 2025-10-31 12:00:11 +00:00 
			
		
		
		
	more cleanup and refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									1029a087a0
								
							
						
					
					
						commit
						e8b542ed61
					
				| @ -12,18 +12,19 @@ | |||||||
| // drag/swipe...
 | // drag/swipe...
 | ||||||
| var CLICK_THRESHOLD = 10 | var CLICK_THRESHOLD = 10 | ||||||
| 
 | 
 | ||||||
| // if the amount of time to wait beween start and end is greater than this
 | // if the amount of time to wait bteween start and end is greater than
 | ||||||
| // the event is considered a long click.
 | // this the event is considered a long click.
 | ||||||
| // NOTE: this will not auto-fire the event, the user MUST release first.
 | // NOTE: this will not auto-fire the event, the user MUST release first.
 | ||||||
| var LONG_CLICK_THRESHOLD = 400 | var LONG_CLICK_THRESHOLD = 400 | ||||||
| 
 | 
 | ||||||
| // the maximum amount of time between clicks to count them together.
 | // the maximum amount of time between clicks to count them together.
 | ||||||
| // NOTE: if multi-clicks are disabled this has no effect.
 | // NOTE: if multi-clicks are disabled this has no effect.
 | ||||||
| // NOTE: this is reset by the timeout explicitly set in the handler...
 | // NOTE: this is reset by the timeout explicitly set in the handler...
 | ||||||
| // NOTE: this is the timeout between two consecutive clicks and not the total.
 | // NOTE: this is the timeout between two consecutive clicks and not the 
 | ||||||
|  | // 		total.
 | ||||||
| // NOTE: if multiple clicks are enabled this will introduce a lag after
 | // NOTE: if multiple clicks are enabled this will introduce a lag after
 | ||||||
| // 		each click (while we wait for the next), so keep this as small 
 | // 		each click (while we wait for the next), so keep this as small 
 | ||||||
| // 		as possible.
 | // 		as possible, but not too small as to rush the user too much.
 | ||||||
| var MULTI_CLICK_TIMEOUT = 200 | var MULTI_CLICK_TIMEOUT = 200 | ||||||
| 
 | 
 | ||||||
| // the amount of time between finger releases.
 | // the amount of time between finger releases.
 | ||||||
| @ -112,7 +113,6 @@ function makeScrollHandler(root, config){ | |||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 		*/ | 		*/ | ||||||
| 		//togglePageDragging('on')
 |  | ||||||
| 		scrolled = $(root.children()[0]) | 		scrolled = $(root.children()[0]) | ||||||
| 		setTransitionDuration(scrolled, 0) | 		setTransitionDuration(scrolled, 0) | ||||||
| 		// XXX these two are redundant...
 | 		// XXX these two are redundant...
 | ||||||
| @ -231,8 +231,6 @@ function makeScrollHandler(root, config){ | |||||||
| 			clicks: null, | 			clicks: null, | ||||||
| 		} | 		} | ||||||
| 		// XXX stop only if no fingers are touching or let the callback decide...
 | 		// XXX stop only if no fingers are touching or let the callback decide...
 | ||||||
| 		//togglePageDragging('off')
 |  | ||||||
| 		// XXX update this with the new data model!!! (see below)
 |  | ||||||
| 		if(options.postCallback  | 		if(options.postCallback  | ||||||
| 				// XXX revise this....
 | 				// XXX revise this....
 | ||||||
| 				&& options.postCallback(data) === false  | 				&& options.postCallback(data) === false  | ||||||
| @ -323,9 +321,6 @@ function makeScrollHandler(root, config){ | |||||||
| 				this.state = 'waiting' | 				this.state = 'waiting' | ||||||
| 			} else { | 			} else { | ||||||
| 				this.state = 'waiting' | 				this.state = 'waiting' | ||||||
| 				// XXX STUB: this makes starting the scroll a bit sluggish, 
 |  | ||||||
| 				//		find a faster way...
 |  | ||||||
| 				//togglePageDragging('on')
 |  | ||||||
| 
 | 
 | ||||||
| 				// NOTE: if we bind both touch and mouse events, on touch devices they 
 | 				// NOTE: if we bind both touch and mouse events, on touch devices they 
 | ||||||
| 				//		might start interfering with each other...
 | 				//		might start interfering with each other...
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user