diff options
Diffstat (limited to 'plugin/zoom-js')
-rw-r--r-- | plugin/zoom-js/zoom.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugin/zoom-js/zoom.js b/plugin/zoom-js/zoom.js index b67ae16..cd5b06f 100644 --- a/plugin/zoom-js/zoom.js +++ b/plugin/zoom-js/zoom.js @@ -3,7 +3,9 @@ var isEnabled = true; 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(); zoom.to({ element: event.target, pan: false }); } |