aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2018-05-24 09:21:37 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2018-05-24 09:21:42 +0200
commit30b670cf42c458b80d0af22abeb5162507229061 (patch)
tree308d0b09d3bd9d465ad20f4bafaf8fd4422c2222 /js
parent3c5c50f3fee71d9741b69257df26aae7c14b7a68 (diff)
downloadperl-software-in-gnu-guix-30b670cf42c458b80d0af22abeb5162507229061.tar
perl-software-in-gnu-guix-30b670cf42c458b80d0af22abeb5162507229061.tar.gz
flatten slide number when there are only vertical slides
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js6
1 files changed, 6 insertions, 0 deletions
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 );