don't show auto slide controls if there's only one slide
This commit is contained in:
		| @@ -518,6 +518,8 @@ var Reveal = (function(){ | |||||||
| 	 */ | 	 */ | ||||||
| 	function configure( options ) { | 	function configure( options ) { | ||||||
|  |  | ||||||
|  | 		var numberOfSlides = document.querySelectorAll( SLIDES_SELECTOR ).length; | ||||||
|  |  | ||||||
| 		dom.wrapper.classList.remove( config.transition ); | 		dom.wrapper.classList.remove( config.transition ); | ||||||
|  |  | ||||||
| 		// New config options may be passed when this method | 		// New config options may be passed when this method | ||||||
| @@ -576,7 +578,7 @@ var Reveal = (function(){ | |||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		// Auto-slide playback controls | 		// Auto-slide playback controls | ||||||
| 		if( config.autoSlide && config.autoSlideStoppable && features.canvas && features.requestAnimationFrame ) { | 		if( numberOfSlides > 1 && config.autoSlide && config.autoSlideStoppable && features.canvas && features.requestAnimationFrame ) { | ||||||
| 			autoSlidePlayer = new Playback( dom.wrapper, function() { | 			autoSlidePlayer = new Playback( dom.wrapper, function() { | ||||||
| 				return Math.min( Math.max( ( Date.now() - autoSlideStartTime ) / autoSlide, 0 ), 1 ); | 				return Math.min( Math.max( ( Date.now() - autoSlideStartTime ) / autoSlide, 0 ), 1 ); | ||||||
| 			} ); | 			} ); | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								js/reveal.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								js/reveal.min.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Reference in New Issue
	
	Block a user