projects
/
reveal.js.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
adbf36a
)
add zoomKey option for #700
author
Hakim El Hattab
<hakim.elhattab@gmail.com>
Tue, 26 Nov 2013 14:00:04 +0000
(09:00 -0500)
committer
Hakim El Hattab
<hakim.elhattab@gmail.com>
Tue, 26 Nov 2013 14:00:04 +0000
(09:00 -0500)
plugin/zoom-js/zoom.js
patch
|
blob
|
history
diff --git
a/plugin/zoom-js/zoom.js
b/plugin/zoom-js/zoom.js
index b67ae16641864ca64cefbdca80c086ed91221991..cd5b06ff886507d036974e99fd83bca9b3a08d8a 100644
(file)
--- 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 });
}