aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2014-04-11 09:40:44 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2014-04-11 09:40:44 +0200
commit731598f7c8fdb2b5fa6ade3f3e351958a5ba1a28 (patch)
tree4f28f54c8884d28b4e2aa7b46012b085f1680e5c
parenta3d4afeeed1aec725a42cb404e62f89739c8faa3 (diff)
downloadperl-software-in-gnu-guix-731598f7c8fdb2b5fa6ade3f3e351958a5ba1a28.tar
perl-software-in-gnu-guix-731598f7c8fdb2b5fa6ade3f3e351958a5ba1a28.tar.gz
make all slides 'present' while printing
-rw-r--r--js/reveal.js18
1 files changed, 13 insertions, 5 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 6daa9f8..962a7cd 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -1744,6 +1744,8 @@ var Reveal = (function(){
var slides = toArray( document.querySelectorAll( selector ) ),
slidesLength = slides.length;
+ var printMode = isPrintingPDF();
+
if( slidesLength ) {
// Should the index loop?
@@ -1770,6 +1772,17 @@ var Reveal = (function(){
// http://www.w3.org/html/wg/drafts/html/master/editing.html#the-hidden-attribute
element.setAttribute( 'hidden', '' );
+ // If this element contains vertical slides
+ if( element.querySelector( 'section' ) ) {
+ element.classList.add( 'stack' );
+ }
+
+ // If we're printing static slides, all slides are "present"
+ if( printMode ) {
+ element.classList.add( 'present' );
+ continue;
+ }
+
if( i < index ) {
// Any element previous to index is given the 'past' class
element.classList.add( reverse ? 'future' : 'past' );
@@ -1800,11 +1813,6 @@ var Reveal = (function(){
}
}
}
-
- // If this element contains vertical slides
- if( element.querySelector( 'section' ) ) {
- element.classList.add( 'stack' );
- }
}
// Mark the current slide as present