prevent repeated autoslidepaused/resumed events
This commit is contained in:
parent
3795ef1599
commit
4a39aecbab
@ -968,6 +968,8 @@ var Reveal = (function(){
|
||||
*/
|
||||
function dispatchEvent( type, args ) {
|
||||
|
||||
console.log('event', type);
|
||||
|
||||
var event = document.createEvent( 'HTMLEvents', 1, 2 );
|
||||
event.initEvent( type, true, true );
|
||||
extend( event, args );
|
||||
@ -2747,6 +2749,7 @@ var Reveal = (function(){
|
||||
|
||||
function pauseAutoSlide() {
|
||||
|
||||
if( autoSlide && !autoSlidePaused ) {
|
||||
autoSlidePaused = true;
|
||||
dispatchEvent( 'autoslidepaused' );
|
||||
clearTimeout( autoSlideTimeout );
|
||||
@ -2754,14 +2757,17 @@ var Reveal = (function(){
|
||||
if( autoSlidePlayer ) {
|
||||
autoSlidePlayer.setPlaying( false );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function resumeAutoSlide() {
|
||||
|
||||
if( autoSlide && autoSlidePaused ) {
|
||||
autoSlidePaused = false;
|
||||
dispatchEvent( 'autoslideresumed' );
|
||||
cueAutoSlide();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user