leave the progress bar empty if there's < 2 slides
This commit is contained in:
parent
d272628f58
commit
ac79c7cd8b
2
dist/reveal.esm.js
vendored
2
dist/reveal.esm.js
vendored
File diff suppressed because one or more lines are too long
2
dist/reveal.js
vendored
2
dist/reveal.js
vendored
File diff suppressed because one or more lines are too long
|
@ -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…
Reference in New Issue
Block a user