diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2013-11-26 09:00:04 -0500 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2013-11-26 09:00:04 -0500 |
commit | e947f0f21694fefbdd38cd1a79a572041e17f870 (patch) | |
tree | e96a40f198ba434b3060ffddbb532231986ddf45 /plugin/zoom-js | |
parent | adbf36ad47d06107e7b805df7a045de0d16eeb3e (diff) | |
download | perl-software-in-gnu-guix-e947f0f21694fefbdd38cd1a79a572041e17f870.tar perl-software-in-gnu-guix-e947f0f21694fefbdd38cd1a79a572041e17f870.tar.gz |
add zoomKey option for #700
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 }); } |