Skip to content

Commit

Permalink
flatten slide number when there are only vertical slides
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel committed May 24, 2018
1 parent 3c5c50f commit 30b670c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions js/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -3043,6 +3043,12 @@
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 ) {
case 'c':
value.push( getSlidePastCount() + 1 );
Expand Down

0 comments on commit 30b670c

Please sign in to comment.