merge in reset of vertical slides when returning to first slide #291
This commit is contained in:
		
							
								
								
									
										15
									
								
								js/reveal.js
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								js/reveal.js
									
									
									
									
									
								
							| @@ -12,6 +12,7 @@ var Reveal = (function(){ | |||||||
| 	var SLIDES_SELECTOR = '.reveal .slides section', | 	var SLIDES_SELECTOR = '.reveal .slides section', | ||||||
| 		HORIZONTAL_SLIDES_SELECTOR = '.reveal .slides>section', | 		HORIZONTAL_SLIDES_SELECTOR = '.reveal .slides>section', | ||||||
| 		VERTICAL_SLIDES_SELECTOR = '.reveal .slides>section.present>section', | 		VERTICAL_SLIDES_SELECTOR = '.reveal .slides>section.present>section', | ||||||
|  | 		HOME_SLIDE_SELECTOR = '.reveal .slides>section:first-child', | ||||||
|  |  | ||||||
| 		// Configurations defaults, can be overridden at initialization time | 		// Configurations defaults, can be overridden at initialization time | ||||||
| 		config = { | 		config = { | ||||||
| @@ -880,17 +881,17 @@ var Reveal = (function(){ | |||||||
|  |  | ||||||
|             // Reset all slides upon navigate to home |             // Reset all slides upon navigate to home | ||||||
|             // Issue: #285 |             // Issue: #285 | ||||||
|             if ( document.querySelector(HOME_SLIDE_SELECTOR).classList.contains('present') ) { |             if ( document.querySelector( HOME_SLIDE_SELECTOR ).classList.contains( 'present' ) ) { | ||||||
|                 // Launch async task |                 // Launch async task | ||||||
|                 setTimeout(function () { |                 setTimeout( function () { | ||||||
|                     var slides = toArray( document.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR + '.stack')), i; |                     var slides = toArray( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR + '.stack') ), i; | ||||||
|                     for ( i in slides ) { |                     for( i in slides ) { | ||||||
|                         if (slides[i]) { |                         if( slides[i] ) { | ||||||
|                             // Reset stack |                             // Reset stack | ||||||
|                             setPreviousVerticalIndex(slides[i], 0); |                             setPreviousVerticalIndex( slides[i], 0 ); | ||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
|                 }, 0); |                 }, 0 ); | ||||||
|             } |             } | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								js/reveal.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								js/reveal.min.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Reference in New Issue
	
	Block a user