summaryrefslogtreecommitdiffhomepage
path: root/js/reveal.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/reveal.js')
-rw-r--r--js/reveal.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/js/reveal.js b/js/reveal.js
index b2869c0..f6edd45 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -2215,6 +2215,25 @@ var Reveal = (function(){
}
+ if( currentSlide ) {
+
+ var allFragments = currentSlide.querySelectorAll( '.fragment' );
+
+ // If there are fragments in the current slide those should be
+ // accounted for in the progress.
+ if( allFragments.length > 0 ) {
+ var visibleFragments = currentSlide.querySelectorAll( '.fragment.visible' );
+
+ // This value represents how big a portion of the slide progress
+ // that is made up by its fragments (0-1)
+ var fragmentWeight = 0.9;
+
+ // Add fragment progress to the past slide count
+ pastCount += ( visibleFragments.length / allFragments.length ) * fragmentWeight;
+ }
+
+ }
+
return pastCount / ( totalCount - 1 );
}
@@ -2519,6 +2538,7 @@ var Reveal = (function(){
}
updateControls();
+ updateProgress();
return !!( fragmentsShown.length || fragmentsHidden.length );