zoom.js works on main wrapper element

This commit is contained in:
Hakim El Hattab 2017-06-19 11:06:58 +02:00
parent 76eea30083
commit b04489b129
1 changed files with 19 additions and 14 deletions

View File

@ -1,6 +1,9 @@
// Custom reveal.js integration // Custom reveal.js integration
(function(){ (function(){
document.querySelector( '.reveal .slides' ).addEventListener( 'mousedown', function( event ) { var revealElement = document.querySelector( '.reveal' );
if( revealElement ) {
revealElement.addEventListener( 'mousedown', function( event ) {
var defaultModifier = /Linux/.test( window.navigator.platform ) ? 'ctrl' : 'alt'; var defaultModifier = /Linux/.test( window.navigator.platform ) ? 'ctrl' : 'alt';
var modifier = ( Reveal.getConfig().zoomKey ? Reveal.getConfig().zoomKey : defaultModifier ) + 'Key'; var modifier = ( Reveal.getConfig().zoomKey ? Reveal.getConfig().zoomKey : defaultModifier ) + 'Key';
@ -17,6 +20,8 @@
}); });
} }
} ); } );
}
})(); })();
/*! /*!