helper method for retrieving slide based on index (closes #293)
This commit is contained in:
		
							
								
								
									
										12
									
								
								js/reveal.js
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								js/reveal.js
									
									
									
									
									
								
							| @@ -1829,6 +1829,18 @@ var Reveal = (function(){ | |||||||
| 		// Returns the indices of the current, or specified, slide | 		// Returns the indices of the current, or specified, slide | ||||||
| 		getIndices: getIndices, | 		getIndices: getIndices, | ||||||
|  |  | ||||||
|  | 		// Returns the slide at the specified index, y is optional | ||||||
|  | 		getSlide: function( x, y ) { | ||||||
|  | 			var horizontalSlide = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR )[ x ]; | ||||||
|  | 			var verticalSlides = horizontalSlide && horizontalSlide.querySelectorAll( 'section' ); | ||||||
|  |  | ||||||
|  | 			if( typeof y !== 'undefined' ) { | ||||||
|  | 				return verticalSlides ? verticalSlides[ y ] : undefined; | ||||||
|  | 			} | ||||||
|  |  | ||||||
|  | 			return horizontalSlide; | ||||||
|  | 		}, | ||||||
|  |  | ||||||
| 		// Returns the previous slide element, may be null | 		// Returns the previous slide element, may be null | ||||||
| 		getPreviousSlide: function() { | 		getPreviousSlide: function() { | ||||||
| 			return previousSlide; | 			return previousSlide; | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								js/reveal.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								js/reveal.min.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Reference in New Issue
	
	Block a user