diff options
author | Hakim El Hattab | 2017-02-20 11:41:31 +0100 |
---|---|---|
committer | Hakim El Hattab | 2017-02-20 11:41:31 +0100 |
commit | 8f7e4bfd418d2c7fb74c477bf4516861b3bc0d71 (patch) | |
tree | f4ba1248c72596dfd72d0c204ba9e9bfcdb43d5b /js | |
parent | 5565d0861260c62f20f9ad5211aea697b4e8a0cc (diff) | |
parent | 95bca847d6d000fc745660852c70ae5d3c63e9d0 (diff) |
Merge branch 'slidenum' of https://github.com/malcomio/reveal.js into dev
Diffstat (limited to 'js')
-rw-r--r-- | js/reveal.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/js/reveal.js b/js/reveal.js index 5325beb..b48620b 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -57,6 +57,9 @@ // Display the page number of the current slide slideNumber: false, + + // Determine which displays to show the slide number on + showSlideNumber: 'all', // Push each slide change to the browser history history: false, @@ -981,7 +984,18 @@ dom.controls.style.display = config.controls ? 'block' : 'none'; dom.progress.style.display = config.progress ? 'block' : 'none'; - dom.slideNumber.style.display = config.slideNumber && !isPrintingPDF() ? 'block' : 'none'; + + var slideNumberDisplay = 'none'; + if (config.slideNumber && !isPrintingPDF()) { + if (config.showSlideNumber === 'all') { + slideNumberDisplay = 'block'; + } + else if (config.showSlideNumber === 'notes' && isSpeakerNotes()) { + slideNumberDisplay = 'block'; + } + } + + dom.slideNumber.style.display = slideNumberDisplay; if( config.shuffle ) { shuffle(); |