simplified getCurrentFragmentIndex impl
This commit is contained in:
		
							
								
								
									
										17
									
								
								js/reveal.js
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								js/reveal.js
									
									
									
									
									
								
							| @@ -2047,21 +2047,12 @@ var Reveal = (function(){ | ||||
|  | ||||
| 		// Returns an index (1-based) of the current fragment | ||||
| 		getCurrentFragmentIndex : function() { | ||||
| 			var visibleFragments; | ||||
| 			if( currentSlide ) { | ||||
| 				var visibleFragments = currentSlide.querySelectorAll( '.fragment.visible' ); | ||||
|  | ||||
| 			// vertical slides: | ||||
| 			if( document.querySelector( VERTICAL_SLIDES_SELECTOR + '.present' ) ) { | ||||
| 				visibleFragments = document.querySelectorAll( VERTICAL_SLIDES_SELECTOR + '.present .fragment.visible' ); | ||||
| 			} | ||||
| 			// Horizontal slides: | ||||
| 			else { | ||||
| 				visibleFragments = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR + '.present .fragment.visible' ); | ||||
| 			} | ||||
| 			 | ||||
| 			if( visibleFragments.length) { | ||||
| 				if( visibleFragments ) { | ||||
| 					return visibleFragments.length; | ||||
| 			} else { | ||||
| 				return undefined; | ||||
| 				} | ||||
| 			} | ||||
| 		}, | ||||
|  | ||||
|   | ||||
							
								
								
									
										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