Only call embedded content bits if the slide actually changed.
This commit is contained in:
parent
396d531770
commit
d3ebbf1be7
|
@ -1128,7 +1128,8 @@ var Reveal = (function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dispatch an event if the slide changed
|
// Dispatch an event if the slide changed
|
||||||
if( indexh !== indexhBefore || indexv !== indexvBefore ) {
|
var slideChanged = (indexh !== indexhBefore || indexv !== indexvBefore);
|
||||||
|
if( slideChanged ) {
|
||||||
dispatchEvent( 'slidechanged', {
|
dispatchEvent( 'slidechanged', {
|
||||||
'indexh': indexh,
|
'indexh': indexh,
|
||||||
'indexv': indexv,
|
'indexv': indexv,
|
||||||
|
@ -1165,8 +1166,10 @@ var Reveal = (function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle embedded content
|
// Handle embedded content
|
||||||
|
if (slideChanged) {
|
||||||
stopEmbeddedContent( previousSlide );
|
stopEmbeddedContent( previousSlide );
|
||||||
startEmbeddedContent( currentSlide );
|
startEmbeddedContent( currentSlide );
|
||||||
|
}
|
||||||
|
|
||||||
updateControls();
|
updateControls();
|
||||||
updateProgress();
|
updateProgress();
|
||||||
|
|
Loading…
Reference in New Issue