From 30b670cf42c458b80d0af22abeb5162507229061 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 24 May 2018 09:21:37 +0200 Subject: flatten slide number when there are only vertical slides --- js/reveal.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'js') diff --git a/js/reveal.js b/js/reveal.js index 163bc99..0f40977 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -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 ); -- cgit v1.2.3