Prechádzať zdrojové kódy

docs for #1816 and remove showHelp

Hakim El Hattab 7 rokov pred
rodič
commit
5ad66f3779
2 zmenil súbory, kde vykonal 11 pridanie a 12 odobranie
  1. 4 3
      README.md
  2. 7 9
      js/reveal.js

+ 4 - 3
README.md

@@ -466,14 +466,15 @@ Reveal.nextFragment();
 // Randomize the order of slides
 Reveal.shuffle();
 
-// Shows a help overlay with keyboard shortcuts
-Reveal.showHelp();
-
 // Toggle presentation states, optionally pass true/false to force on/off
 Reveal.toggleOverview();
 Reveal.togglePause();
 Reveal.toggleAutoSlide();
 
+// Shows a help overlay with keyboard shortcuts, optionally pass true/false
+// to force on/off
+Reveal.toggleHelp();
+
 // Change a config value at runtime
 Reveal.configure({ controls: true });
 

+ 7 - 9
js/reveal.js

@@ -1641,21 +1641,20 @@
 	 * help is open, false means it's closed.
 	 */
 	function toggleHelp( override ){
-		
+
 		if( typeof override === 'boolean' ) {
-			override ? showHelp( true ) : closeOverlay();
+			override ? showHelp() : closeOverlay();
 		}
-		else {		
+		else {
 			if( dom.overlay ) {
 				closeOverlay();
 			}
 			else {
-				showHelp( true );
+				showHelp();
 			}
 		}
 	}
 
-	
 	/**
 	 * Opens an overlay window with help material.
 	 */
@@ -4878,10 +4877,6 @@
 		navigatePrev: navigatePrev,
 		navigateNext: navigateNext,
 
-		// Shows a help overlay with keyboard shortcuts
-		showHelp: showHelp,
-		toggleHelp: toggleHelp,
-
 		// Forces an update in slide layout
 		layout: layout,
 
@@ -4894,6 +4889,9 @@
 		// Returns an object with the available fragments as booleans (prev/next)
 		availableFragments: availableFragments,
 
+		// Toggles a help overlay with keyboard shortcuts
+		toggleHelp: toggleHelp,
+
 		// Toggles the overview mode on/off
 		toggleOverview: toggleOverview,