add zoomKey option for #700
This commit is contained in:
parent
adbf36ad47
commit
e947f0f216
1 changed files with 3 additions and 1 deletions
|
@ -3,7 +3,9 @@
|
||||||
var isEnabled = true;
|
var isEnabled = true;
|
||||||
|
|
||||||
document.querySelector( '.reveal' ).addEventListener( 'mousedown', function( event ) {
|
document.querySelector( '.reveal' ).addEventListener( 'mousedown', function( event ) {
|
||||||
if( event.altKey && isEnabled ) {
|
var modifier = ( Reveal.getConfig().zoomKey ? Reveal.getConfig().zoomKey : 'alt' ) + 'Key';
|
||||||
|
|
||||||
|
if( event[ modifier ] && isEnabled ) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
zoom.to({ element: event.target, pan: false });
|
zoom.to({ element: event.target, pan: false });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue