aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorFrazer Kirkman <frazer@unitedvisions.org>2017-02-07 19:53:58 +0100
committerGitHub <noreply@github.com>2017-02-07 19:53:58 +0100
commit2a1303f3c1861d12ff27f401c0f5d421f7c5133b (patch)
tree9ce74debe8f29b2805c90542c65b4680dac55a73 /js
parentbede9a22e86bb1c8debb945ccdfb22265393297d (diff)
downloadfosdem-2018-presentation-2a1303f3c1861d12ff27f401c0f5d421f7c5133b.tar
fosdem-2018-presentation-2a1303f3c1861d12ff27f401c0f5d421f7c5133b.tar.gz
added override parameter to toggleHelp function
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js21
1 files changed, 16 insertions, 5 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 290097f..2e4e978 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -1630,15 +1630,26 @@
/**
* Open or close help overlay window.
+ *
+ * @param {Boolean} [override] Flag which overrides the
+ * toggle logic and forcibly sets the desired state. True means
+ * help is open, false means it's closed.
*/
- function toggleHelp(){
- if( dom.overlay ) {
- closeOverlay();
+ function toggleHelp( override ){
+
+ if( typeof override === 'boolean' ) {
+ override ? showHelp( true ) : closeOverlay();
}
- else {
- showHelp( true );
+ else {
+ if( dom.overlay ) {
+ closeOverlay();
+ }
+ else {
+ showHelp( true );
+ }
}
}
+
/**
* Opens an overlay window with help material.