소스 검색

don't show auto slide controls if there's only one slide

Hakim El Hattab 11 년 전
부모
커밋
dd08b86a0f
2개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 1
      js/reveal.js
  2. 1 1
      js/reveal.min.js

+ 3 - 1
js/reveal.js

@@ -518,6 +518,8 @@ var Reveal = (function(){
 	 */
 	function configure( options ) {
 
+		var numberOfSlides = document.querySelectorAll( SLIDES_SELECTOR ).length;
+
 		dom.wrapper.classList.remove( config.transition );
 
 		// New config options may be passed when this method
@@ -576,7 +578,7 @@ var Reveal = (function(){
 		}
 
 		// 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() {
 				return Math.min( Math.max( ( Date.now() - autoSlideStartTime ) / autoSlide, 0 ), 1 );
 			} );

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
js/reveal.min.js


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.