aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Denehy <greg@inclose.com.au>2017-11-25 11:07:09 +1030
committerGreg Denehy <greg@inclose.com.au>2017-11-25 11:07:09 +1030
commit8579fc773d4e0a735e808635f12a2782d9e9623f (patch)
tree185362ee1baac86596fffe1ee1df24c10154c49e
parenta0a9aa78219ad54c1a8be2c478b91bc4ccfa36c1 (diff)
downloadperl-software-in-gnu-guix-8579fc773d4e0a735e808635f12a2782d9e9623f.tar
perl-software-in-gnu-guix-8579fc773d4e0a735e808635f12a2782d9e9623f.tar.gz
Fixed issue with getProgress() when called from slidechanged event on edge case
-rw-r--r--js/reveal.js21
1 files changed, 11 insertions, 10 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 9a43903..1a98ac9 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -2411,16 +2411,7 @@
// Dispatch an event if the slide changed
var slideChanged = ( indexh !== indexhBefore || indexv !== indexvBefore );
- if( slideChanged ) {
- dispatchEvent( 'slidechanged', {
- 'indexh': indexh,
- 'indexv': indexv,
- 'previousSlide': previousSlide,
- 'currentSlide': currentSlide,
- 'origin': o
- } );
- }
- else {
+ if (!slideChanged) {
// Ensure that the previous slide is never the same as the current
previousSlide = null;
}
@@ -2448,6 +2439,16 @@
}
}
+ if( slideChanged ) {
+ dispatchEvent( 'slidechanged', {
+ 'indexh': indexh,
+ 'indexv': indexv,
+ 'previousSlide': previousSlide,
+ 'currentSlide': currentSlide,
+ 'origin': o
+ } );
+ }
+
// Handle embedded content
if( slideChanged || !previousSlide ) {
stopEmbeddedContent( previousSlide );