disable zoom plugin while in overview mode

edit
Hakim El Hattab 2013-02-03 13:21:42 -05:00
parent c21e6bbfed
commit 080fb3cd33
1 changed files with 26 additions and 21 deletions

View File

@ -1,11 +1,16 @@
// Custom reveal.js integration // Custom reveal.js integration
(function(){ (function(){
document.querySelector( '.reveal' ).addEventListener( 'click', function( event ) { var isEnabled = true;
if( event.altKey ) {
document.querySelector( '.reveal' ).addEventListener( 'mousedown', function( event ) {
if( event.altKey && isEnabled ) {
event.preventDefault(); event.preventDefault();
zoom.to({ element: event.target, pan: false }); zoom.to({ element: event.target, pan: false });
} }
} ); } );
Reveal.addEventListener( 'overviewshown', function() { isEnabled = false; } );
Reveal.addEventListener( 'overviewhidden', function() { isEnabled = true; } );
})(); })();
/*! /*!