25
									
								
								js/reveal.js
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								js/reveal.js
									
									
									
									
									
								
							| @@ -134,6 +134,11 @@ var Reveal = (function(){ | |||||||
| 			linkify(); | 			linkify(); | ||||||
| 		} | 		} | ||||||
| 		 | 		 | ||||||
|  | 		//bind scrolling | ||||||
|  | 		 if(window.addEventListener){ | ||||||
|  | 		    document.addEventListener('DOMMouseScroll', scrollStep, false); | ||||||
|  | 		    } | ||||||
|  |  | ||||||
| 		// Read the initial hash | 		// Read the initial hash | ||||||
| 		readURL(); | 		readURL(); | ||||||
| 	} | 	} | ||||||
| @@ -622,6 +627,26 @@ var Reveal = (function(){ | |||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	 | 	 | ||||||
|  | 	var stepT=0; | ||||||
|  |   function scrollStep(e){ | ||||||
|  |   clearTimeout(stepT); | ||||||
|  |   stepT=setTimeout(function(){ | ||||||
|  |       if(e.detail>0){ | ||||||
|  |         if(availableRoutes().down){ | ||||||
|  |           navigateDown() | ||||||
|  |           }else{ | ||||||
|  |           navigateRight() | ||||||
|  |           } | ||||||
|  |         }else{ | ||||||
|  |         if(availableRoutes().up){ | ||||||
|  |           navigateUp() | ||||||
|  |           }else{ | ||||||
|  |           navigateLeft() | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       },200); | ||||||
|  |     } | ||||||
|  | 	 | ||||||
| 	// Expose some methods publicly | 	// Expose some methods publicly | ||||||
| 	return { | 	return { | ||||||
| 		initialize: initialize, | 		initialize: initialize, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user