From 56e422e278742279e7f5cee2d10b842117b69b64 Mon Sep 17 00:00:00 2001 From: Leyan Lo Date: Thu, 9 Jun 2016 03:55:33 -0700 Subject: [PATCH] Fix #211: Expose whether the cheatsheet is visible in the API --- build/hotkeys.js | 6 ++++++ src/hotkeys.js | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/build/hotkeys.js b/build/hotkeys.js index 7eb55f4..ffe780a 100644 --- a/build/hotkeys.js +++ b/build/hotkeys.js @@ -325,6 +325,11 @@ } } + // Helper function to expose helpVisible for the public API + function helpVisible() { + return scope.helpVisible; + } + /** * Creates a new Hotkey and creates the Mousetrap binding * @@ -584,6 +589,7 @@ bindTo : bindTo, template : this.template, toggleCheatSheet : toggleCheatSheet, + helpVisible : helpVisible, includeCheatSheet : this.includeCheatSheet, cheatSheetHotkey : this.cheatSheetHotkey, cheatSheetDescription : this.cheatSheetDescription, diff --git a/src/hotkeys.js b/src/hotkeys.js index 5b27ec1..d0107e5 100644 --- a/src/hotkeys.js +++ b/src/hotkeys.js @@ -319,6 +319,11 @@ } } + // Helper function to expose helpVisible for the public API + function helpVisible() { + return scope.helpVisible; + } + /** * Creates a new Hotkey and creates the Mousetrap binding * @@ -578,6 +583,7 @@ bindTo : bindTo, template : this.template, toggleCheatSheet : toggleCheatSheet, + helpVisible : helpVisible, includeCheatSheet : this.includeCheatSheet, cheatSheetHotkey : this.cheatSheetHotkey, cheatSheetDescription : this.cheatSheetDescription,