1
0
Fork 0

Merge branch 'issue_2041' of https://github.com/denehyg/reveal.js into dev

This commit is contained in:
Hakim El Hattab 2017-11-29 09:54:48 +01:00
commit 1f1f86ec73
1 changed files with 11 additions and 10 deletions

View File

@ -2453,16 +2453,7 @@
// Dispatch an event if the slide changed // Dispatch an event if the slide changed
var slideChanged = ( indexh !== indexhBefore || indexv !== indexvBefore ); var slideChanged = ( indexh !== indexhBefore || indexv !== indexvBefore );
if( slideChanged ) { if (!slideChanged) {
dispatchEvent( 'slidechanged', {
'indexh': indexh,
'indexv': indexv,
'previousSlide': previousSlide,
'currentSlide': currentSlide,
'origin': o
} );
}
else {
// Ensure that the previous slide is never the same as the current // Ensure that the previous slide is never the same as the current
previousSlide = null; previousSlide = null;
} }
@ -2490,6 +2481,16 @@
} }
} }
if( slideChanged ) {
dispatchEvent( 'slidechanged', {
'indexh': indexh,
'indexv': indexv,
'previousSlide': previousSlide,
'currentSlide': currentSlide,
'origin': o
} );
}
// Handle embedded content // Handle embedded content
if( slideChanged || !previousSlide ) { if( slideChanged || !previousSlide ) {
stopEmbeddedContent( previousSlide ); stopEmbeddedContent( previousSlide );