commit
1749f0d019
31
js/reveal.js
31
js/reveal.js
@ -1633,6 +1633,29 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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( override ){
|
||||||
|
|
||||||
|
if( typeof override === 'boolean' ) {
|
||||||
|
override ? showHelp( true ) : closeOverlay();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if( dom.overlay ) {
|
||||||
|
closeOverlay();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
showHelp( true );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens an overlay window with help material.
|
* Opens an overlay window with help material.
|
||||||
*/
|
*/
|
||||||
@ -4157,12 +4180,7 @@
|
|||||||
|
|
||||||
// Check if the pressed key is question mark
|
// Check if the pressed key is question mark
|
||||||
if( event.shiftKey && event.charCode === 63 ) {
|
if( event.shiftKey && event.charCode === 63 ) {
|
||||||
if( dom.overlay ) {
|
toggleHelp();
|
||||||
closeOverlay();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
showHelp( true );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -4862,6 +4880,7 @@
|
|||||||
|
|
||||||
// Shows a help overlay with keyboard shortcuts
|
// Shows a help overlay with keyboard shortcuts
|
||||||
showHelp: showHelp,
|
showHelp: showHelp,
|
||||||
|
toggleHelp: toggleHelp,
|
||||||
|
|
||||||
// Forces an update in slide layout
|
// Forces an update in slide layout
|
||||||
layout: layout,
|
layout: layout,
|
||||||
|
Loading…
Reference in New Issue
Block a user