From 9b838ab3261b16d014976fe9a239276ae1c2a534 Mon Sep 17 00:00:00 2001 From: dannyrb Date: Mon, 3 Jun 2019 12:22:25 -0400 Subject: [PATCH] Provide store to commands manager; hard code active contexts --- src/App.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index d9a9dad86..0ccf0c513 100644 --- a/src/App.js +++ b/src/App.js @@ -31,7 +31,7 @@ import setupTools from './setupTools'; import store from './store'; // ~~~~ APP SETUP -const _commandsManager = new CommandsManager(); +const _commandsManager = new CommandsManager(store); const _hotkeysManager = new HotkeysManager(_commandsManager); appCommands.init(_commandsManager); @@ -43,6 +43,16 @@ Object.keys(window.config.hotkeys).forEach(commandName => { _hotkeysManager.registerHotkeys(commandName, keys); }); +// Force active contexts for now. These should be set in Viewer/ActiveViewer +store.dispatch({ + type: 'ADD_ACTIVE_CONTEXT', + item: 'VIEWER', +}); +store.dispatch({ + type: 'ADD_ACTIVE_CONTEXT', + item: 'VIEWER::CORNERSTONE', +}); + // ~~~~ END EPP SETUP setupTools(store);