added override parameter to toggleHelp function
This commit is contained in:
parent
bede9a22e8
commit
2a1303f3c1
1 changed files with 16 additions and 5 deletions
21
js/reveal.js
21
js/reveal.js
|
@ -1630,15 +1630,26 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open or close help overlay window.
|
* 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(){
|
function toggleHelp( override ){
|
||||||
if( dom.overlay ) {
|
|
||||||
closeOverlay();
|
if( typeof override === 'boolean' ) {
|
||||||
|
override ? showHelp( true ) : closeOverlay();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
showHelp( true );
|
if( dom.overlay ) {
|
||||||
|
closeOverlay();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
showHelp( true );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens an overlay window with help material.
|
* Opens an overlay window with help material.
|
||||||
|
|
Loading…
Reference in a new issue