aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2013-11-26 09:00:04 -0500
committerHakim El Hattab <hakim.elhattab@gmail.com>2013-11-26 09:00:04 -0500
commite947f0f21694fefbdd38cd1a79a572041e17f870 (patch)
treee96a40f198ba434b3060ffddbb532231986ddf45 /plugin
parentadbf36ad47d06107e7b805df7a045de0d16eeb3e (diff)
downloadfosdem-2018-presentation-e947f0f21694fefbdd38cd1a79a572041e17f870.tar
fosdem-2018-presentation-e947f0f21694fefbdd38cd1a79a572041e17f870.tar.gz
add zoomKey option for #700
Diffstat (limited to 'plugin')
-rw-r--r--plugin/zoom-js/zoom.js4
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 });
}