aboutsummaryrefslogtreecommitdiffhomepage
path: root/js/reveal.js
diff options
context:
space:
mode:
authorChris Lawrence2013-06-08 05:45:48 -0400
committerChris Lawrence2013-06-08 05:45:48 -0400
commitd3ebbf1be72dc1ea17c7c6e48f8c362feb4deb94 (patch)
tree150f961dac4b6564e691ec4132808eee9e9b8c0d /js/reveal.js
parent396d531770849dbcb37c00258fc33da3ba25d6c1 (diff)
Only call embedded content bits if the slide actually changed.
Diffstat (limited to 'js/reveal.js')
-rw-r--r--js/reveal.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/js/reveal.js b/js/reveal.js
index a4a71db..8e5fd98 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -1128,7 +1128,8 @@ var Reveal = (function(){
}
// Dispatch an event if the slide changed
- if( indexh !== indexhBefore || indexv !== indexvBefore ) {
+ var slideChanged = (indexh !== indexhBefore || indexv !== indexvBefore);
+ if( slideChanged ) {
dispatchEvent( 'slidechanged', {
'indexh': indexh,
'indexv': indexv,
@@ -1165,8 +1166,10 @@ var Reveal = (function(){
}
// Handle embedded content
- stopEmbeddedContent( previousSlide );
- startEmbeddedContent( currentSlide );
+ if (slideChanged) {
+ stopEmbeddedContent( previousSlide );
+ startEmbeddedContent( currentSlide );
+ }
updateControls();
updateProgress();