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