add zoomKey option for #700

edit
Hakim El Hattab 2013-11-26 09:00:04 -05:00
parent adbf36ad47
commit e947f0f216
1 changed files with 3 additions and 1 deletions

View File

@ -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 });
} }