diff options
author | Frazer Kirkman <frazer@unitedvisions.org> | 2017-02-05 18:42:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-05 18:42:59 +0100 |
commit | bede9a22e86bb1c8debb945ccdfb22265393297d (patch) | |
tree | 628dae36c749bdf38748502673e55c13beca9607 /js | |
parent | 1413cbc1a9344a6366c30fb0e83d5b6afc18f6d3 (diff) | |
download | perl-software-in-gnu-guix-bede9a22e86bb1c8debb945ccdfb22265393297d.tar perl-software-in-gnu-guix-bede9a22e86bb1c8debb945ccdfb22265393297d.tar.gz |
added toggleHelp function
this way a key can be given ability to toggleHelp on and off. Previously Reveal.showHelp could open the help screen, but no way to close it.
Diffstat (limited to 'js')
-rw-r--r-- | js/reveal.js | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/js/reveal.js b/js/reveal.js index 9251dc0..290097f 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1629,6 +1629,18 @@ } /** + * Open or close help overlay window. + */ + function toggleHelp(){ + if( dom.overlay ) { + closeOverlay(); + } + else { + showHelp( true ); + } + } + + /** * Opens an overlay window with help material. */ function showHelp() { @@ -4113,12 +4125,7 @@ // Check if the pressed key is question mark if( event.shiftKey && event.charCode === 63 ) { - if( dom.overlay ) { - closeOverlay(); - } - else { - showHelp( true ); - } + toggleHelp(); } } @@ -4818,6 +4825,7 @@ // Shows a help overlay with keyboard shortcuts showHelp: showHelp, + toggleHelp: toggleHelp, // Forces an update in slide layout layout: layout, |