Provide store to commands manager; hard code active contexts
This commit is contained in:
parent
9326b5e63d
commit
9b838ab326
12
src/App.js
12
src/App.js
@ -31,7 +31,7 @@ import setupTools from './setupTools';
|
|||||||
import store from './store';
|
import store from './store';
|
||||||
|
|
||||||
// ~~~~ APP SETUP
|
// ~~~~ APP SETUP
|
||||||
const _commandsManager = new CommandsManager();
|
const _commandsManager = new CommandsManager(store);
|
||||||
const _hotkeysManager = new HotkeysManager(_commandsManager);
|
const _hotkeysManager = new HotkeysManager(_commandsManager);
|
||||||
|
|
||||||
appCommands.init(_commandsManager);
|
appCommands.init(_commandsManager);
|
||||||
@ -43,6 +43,16 @@ Object.keys(window.config.hotkeys).forEach(commandName => {
|
|||||||
_hotkeysManager.registerHotkeys(commandName, keys);
|
_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
|
// ~~~~ END EPP SETUP
|
||||||
|
|
||||||
setupTools(store);
|
setupTools(store);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user