Skip to content

Commit

Permalink
alt-click to zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Jan 30, 2013
1 parent d7bccb0 commit bc404f7
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/cpp/session/resources/learning/slides.js
Expand Up @@ -66,3 +66,28 @@ function notifySlideChanged(indexh) {
commandsForSlide(event.indexh));
}
}

function revealEnterFullscreen() {

var element = document.body;

// Check which implementation is available
var requestMethod = element.requestFullScreen ||
element.webkitRequestFullScreen ||
element.mozRequestFullScreen ||
element.msRequestFullScreen;

if (requestMethod) {
requestMethod.apply( element );
}
}

// alt-click to zoom
(function(){
document.querySelector('.reveal').addEventListener('click',
function( event ) {
if (event.altKey) {
event.preventDefault();
revealEnterFullscreen();
}
});

0 comments on commit bc404f7

Please sign in to comment.