disable zoom plugin while in overview mode

This commit is contained in:
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
(function(){
document.querySelector( '.reveal' ).addEventListener( 'click', function( event ) {
if( event.altKey ) {
var isEnabled = true;
document.querySelector( '.reveal' ).addEventListener( 'mousedown', function( event ) {
if( event.altKey && isEnabled ) {
event.preventDefault();
zoom.to({ element: event.target, pan: false });
}
} );
Reveal.addEventListener( 'overviewshown', function() { isEnabled = false; } );
Reveal.addEventListener( 'overviewhidden', function() { isEnabled = true; } );
})();
/*!