disable zoom plugin while in overview mode
This commit is contained in:
parent
c21e6bbfed
commit
080fb3cd33
@ -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; } );
|
||||
})();
|
||||
|
||||
/*!
|
||||
|
Loading…
Reference in New Issue
Block a user