Browse Source

flatten slide number when there are only vertical slides

Hakim El Hattab 6 years ago
parent
commit
30b670cf42
1 changed files with 6 additions and 0 deletions
  1. 6 0
      js/reveal.js

+ 6 - 0
js/reveal.js

@@ -3043,6 +3043,12 @@
 				format = config.slideNumber;
 				format = config.slideNumber;
 			}
 			}
 
 
+			// If there are ONLY vertical slides in this deck, always use
+			// a flattened slide number
+			if( !/c/.test( format ) && dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ).length === 1 ) {
+				format = 'c';
+			}
+
 			switch( format ) {
 			switch( format ) {
 				case 'c':
 				case 'c':
 					value.push( getSlidePastCount() + 1 );
 					value.push( getSlidePastCount() + 1 );