leave the progress bar empty if there's < 2 slides
parent
d272628f58
commit
ac79c7cd8b
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -55,7 +55,14 @@ export default class Progress {
|
||||||
// Update progress if enabled
|
// Update progress if enabled
|
||||||
if( this.Reveal.getConfig().progress && this.bar ) {
|
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…
Reference in New Issue