make all slides 'present' while printing
This commit is contained in:
		
							parent
							
								
									a3d4afeeed
								
							
						
					
					
						commit
						731598f7c8
					
				
					 1 changed files with 13 additions and 5 deletions
				
			
		
							
								
								
									
										18
									
								
								js/reveal.js
									
										
									
									
									
								
							
							
						
						
									
										18
									
								
								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
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue