Provide store to commands manager; hard code active contexts

This commit is contained in:
dannyrb 2019-06-03 12:22:25 -04:00
parent 9326b5e63d
commit 9b838ab326

View File

@ -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);