added override parameter to toggleHelp function
This commit is contained in:
parent
bede9a22e8
commit
2a1303f3c1
13
js/reveal.js
13
js/reveal.js
|
@ -1630,8 +1630,17 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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( typeof override === 'boolean' ) {
|
||||||
|
override ? showHelp( true ) : closeOverlay();
|
||||||
|
}
|
||||||
|
else {
|
||||||
if( dom.overlay ) {
|
if( dom.overlay ) {
|
||||||
closeOverlay();
|
closeOverlay();
|
||||||
}
|
}
|
||||||
|
@ -1639,6 +1648,8 @@
|
||||||
showHelp( true );
|
showHelp( true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens an overlay window with help material.
|
* Opens an overlay window with help material.
|
||||||
|
|
Loading…
Reference in New Issue