skip fragments when in overview
This commit is contained in:
		
							
								
								
									
										13
									
								
								js/reveal.js
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								js/reveal.js
									
									
									
									
									
								
							| @@ -61,6 +61,7 @@ | |||||||
|  *  |  *  | ||||||
|  * version 1.1: |  * version 1.1: | ||||||
|  * - Optional progress bar UI element |  * - Optional progress bar UI element | ||||||
|  |  * - Slide overview available via SPACE | ||||||
|  *  |  *  | ||||||
|  * TODO: |  * TODO: | ||||||
|  * - Touch/swipe interactions |  * - Touch/swipe interactions | ||||||
| @@ -286,10 +287,10 @@ var Reveal = (function(){ | |||||||
| 	 * can't be improved. | 	 * can't be improved. | ||||||
| 	 */ | 	 */ | ||||||
| 	function activateOverview() { | 	function activateOverview() { | ||||||
| 		var horizontalSlides = Array.prototype.slice.call( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ); |  | ||||||
|  |  | ||||||
| 		document.body.classList.add( 'overview' ); | 		document.body.classList.add( 'overview' ); | ||||||
|  |  | ||||||
|  | 		var horizontalSlides = Array.prototype.slice.call( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ); | ||||||
|  |  | ||||||
| 		for( var i = 0, len = horizontalSlides.length; i < len; i++ ) { | 		for( var i = 0, len = horizontalSlides.length; i < len; i++ ) { | ||||||
| 			var hslide = horizontalSlides[i], | 			var hslide = horizontalSlides[i], | ||||||
| 				htransform = 'translateZ(-2500px) translate(' + ( ( i - indexh ) * 105 ) + '%, 0%)'; | 				htransform = 'translateZ(-2500px) translate(' + ( ( i - indexh ) * 105 ) + '%, 0%)'; | ||||||
| @@ -567,7 +568,7 @@ var Reveal = (function(){ | |||||||
| 	 | 	 | ||||||
| 	function navigateLeft() { | 	function navigateLeft() { | ||||||
| 		// Prioritize hiding fragments | 		// Prioritize hiding fragments | ||||||
| 		if( previousFragment() === false ) { | 		if( overviewIsActive() || previousFragment() === false ) { | ||||||
| 			indexh --; | 			indexh --; | ||||||
| 			indexv = 0; | 			indexv = 0; | ||||||
| 			slide(); | 			slide(); | ||||||
| @@ -575,7 +576,7 @@ var Reveal = (function(){ | |||||||
| 	} | 	} | ||||||
| 	function navigateRight() { | 	function navigateRight() { | ||||||
| 		// Prioritize revealing fragments | 		// Prioritize revealing fragments | ||||||
| 		if( nextFragment() === false ) { | 		if( overviewIsActive() || nextFragment() === false ) { | ||||||
| 			indexh ++; | 			indexh ++; | ||||||
| 			indexv = 0; | 			indexv = 0; | ||||||
| 			slide(); | 			slide(); | ||||||
| @@ -583,14 +584,14 @@ var Reveal = (function(){ | |||||||
| 	} | 	} | ||||||
| 	function navigateUp() { | 	function navigateUp() { | ||||||
| 		// Prioritize hiding fragments | 		// Prioritize hiding fragments | ||||||
| 		if( previousFragment() === false ) { | 		if( overviewIsActive() || previousFragment() === false ) { | ||||||
| 			indexv --; | 			indexv --; | ||||||
| 			slide(); | 			slide(); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	function navigateDown() { | 	function navigateDown() { | ||||||
| 		// Prioritize revealing fragments | 		// Prioritize revealing fragments | ||||||
| 		if( nextFragment() === false ) { | 		if( overviewIsActive() || nextFragment() === false ) { | ||||||
| 			indexv ++; | 			indexv ++; | ||||||
| 			slide(); | 			slide(); | ||||||
| 		} | 		} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user