merge full screen key binding (f)
This commit is contained in:
commit
e15beb47f0
22
js/reveal.js
22
js/reveal.js
|
@ -439,6 +439,8 @@ var Reveal = (function(){
|
|||
case 13: isOverviewActive() ? deactivateOverview() : triggered = false; break;
|
||||
// b, period
|
||||
case 66: case 190: togglePause(); break;
|
||||
// f
|
||||
case 70: enterFullscreen(); break;
|
||||
default:
|
||||
triggered = false;
|
||||
}
|
||||
|
@ -740,6 +742,26 @@ var Reveal = (function(){
|
|||
return dom.wrapper.classList.contains( 'overview' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Handling the fullscreen functionality via the fullscreen API
|
||||
*
|
||||
* @see http://fullscreen.spec.whatwg.org/
|
||||
* @see https://developer.mozilla.org/en-US/docs/DOM/Using_fullscreen_mode
|
||||
*/
|
||||
function enterFullscreen() {
|
||||
var element = document.body;
|
||||
|
||||
// Check which implementation is available
|
||||
var requestMethod = element.requestFullScreen ||
|
||||
element.webkitRequestFullScreen ||
|
||||
element.mozRequestFullScreen ||
|
||||
element.msRequestFullScreen;
|
||||
|
||||
if( requestMethod ) {
|
||||
requestMethod.apply( element );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enters the paused mode which fades everything on screen to
|
||||
* black.
|
||||
|
|
131
js/reveal.min.js
vendored
131
js/reveal.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user