leave the progress bar empty if there's < 2 slides
This commit is contained in:
		
							parent
							
								
									d272628f58
								
							
						
					
					
						commit
						ac79c7cd8b
					
				
					 3 changed files with 10 additions and 3 deletions
				
			
		|  | @ -55,7 +55,14 @@ export default class Progress { | |||
| 		// Update progress if enabled
 | ||||
| 		if( this.Reveal.getConfig().progress && this.bar ) { | ||||
| 
 | ||||
| 			this.bar.style.transform = 'scaleX('+ this.Reveal.getProgress() +')'; | ||||
| 			let scale = this.Reveal.getProgress(); | ||||
| 
 | ||||
| 			// Don't fill the progress bar if there's only one slide
 | ||||
| 			if( this.Reveal.getTotalSlides() < 2 ) { | ||||
| 				scale = 0; | ||||
| 			} | ||||
| 
 | ||||
| 			this.bar.style.transform = 'scaleX('+ scale +')'; | ||||
| 
 | ||||
| 		} | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue