minor formatting tweaks
This commit is contained in:
		
							
								
								
									
										15
									
								
								js/reveal.js
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								js/reveal.js
									
									
									
									
									
								
							| @@ -1265,9 +1265,11 @@ | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Add a custom key binding with optional description to be added to the help screen | 	 * Add a custom key binding with optional description to | ||||||
|  | 	 * be added to the help screen. | ||||||
| 	 */ | 	 */ | ||||||
| 	function addKeyBinding( binding, callback ) { | 	function addKeyBinding( binding, callback ) { | ||||||
|  |  | ||||||
| 		if( typeof binding === 'object' && binding.keyCode ) { | 		if( typeof binding === 'object' && binding.keyCode ) { | ||||||
| 			registeredKeyBindings[binding.keyCode] = { | 			registeredKeyBindings[binding.keyCode] = { | ||||||
| 				callback: callback, | 				callback: callback, | ||||||
| @@ -1282,13 +1284,16 @@ | |||||||
| 				description: null | 				description: null | ||||||
| 			}; | 			}; | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Removes the specified custom key binding | 	 * Removes the specified custom key binding. | ||||||
| 	 */ | 	 */ | ||||||
| 	function removeKeyBinding(binding) { | 	function removeKeyBinding( keyCode ) { | ||||||
| 		delete registeredKeyBindings[binding]; |  | ||||||
|  | 		delete registeredKeyBindings[keyCode]; | ||||||
|  |  | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -1778,7 +1783,7 @@ | |||||||
| 				html += '<tr><td>' + key + '</td><td>' + keyboardShortcuts[ key ] + '</td></tr>'; | 				html += '<tr><td>' + key + '</td><td>' + keyboardShortcuts[ key ] + '</td></tr>'; | ||||||
| 			} | 			} | ||||||
|  |  | ||||||
| 			// add custom key bindings that have associated descriptions | 			// Add custom key bindings that have associated descriptions | ||||||
| 			for( var binding in registeredKeyBindings ) { | 			for( var binding in registeredKeyBindings ) { | ||||||
| 				if( registeredKeyBindings[binding].key && registeredKeyBindings[binding].description ) { | 				if( registeredKeyBindings[binding].key && registeredKeyBindings[binding].description ) { | ||||||
| 					html += '<tr><td>' + registeredKeyBindings[binding].key + '</td><td>' + registeredKeyBindings[binding].description + '</td></tr>'; | 					html += '<tr><td>' + registeredKeyBindings[binding].key + '</td><td>' + registeredKeyBindings[binding].description + '</td></tr>'; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user