Kaynağa Gözat

Add autoSlideRight option

When the autoSlideRight config option is active, the auto-sliding
will always navigate to the right and never down even if slides are
present there. This allows hidden "bonus slides" in presentations
which can be displayed as needed but won't show up automatically.
MichiK 9 yıl önce
ebeveyn
işleme
c0afa01e6a
2 değiştirilmiş dosya ile 11 ekleme ve 1 silme
  1. 5 0
      README.md
  2. 6 1
      js/reveal.js

+ 5 - 0
README.md

@@ -152,6 +152,11 @@ Reveal.initialize({
 	// Stop auto-sliding after user input
 	autoSlideStoppable: true,
 
+	// When auto-sliding is active, do always proceed to the right
+	// instead of the next slide which may be below (useful for
+	// infinite loop presentations with hidden "bonus slides")
+	autoSlideRight: false,
+
 	// Enable slide navigation via mouse wheel
 	mouseWheel: false,
 

+ 6 - 1
js/reveal.js

@@ -103,6 +103,11 @@
 			// Stop auto-sliding after user input
 			autoSlideStoppable: true,
 
+			// When auto-sliding is active, do always proceed to the right
+			// instead of the next slide which may be below (useful for
+			// infinite loop presentations with hidden "bonus slides")
+			autoSlideRight: false,
+
 			// Enable slide navigation via mouse wheel
 			mouseWheel: false,
 
@@ -3823,7 +3828,7 @@
 
 		// Prioritize revealing fragments
 		if( nextFragment() === false ) {
-			if( availableRoutes().down ) {
+			if( availableRoutes().down && !( autoSlide && config.autoSlideRight ) ) {
 				navigateDown();
 			}
 			else if( config.rtl ) {