Remove dead comments from commandsModule

This commit is contained in:
dannyrb 2019-06-16 14:08:38 -04:00
parent 6e4dba7a10
commit ffae67dc99

View File

@ -1,14 +1,6 @@
import cornerstone from 'cornerstone-core'; import cornerstone from 'cornerstone-core';
import cornerstoneTools from 'cornerstone-tools'; import cornerstoneTools from 'cornerstone-tools';
// TODO: Just emit the tool's name?
// TODO: Let local context handle the active tool propogation to redux?
// import { redux } from 'ohif-core';
// import store from './../store/';
// const { setToolActive } = redux.actions;
const actions = { const actions = {
rotateViewport: ({ viewports, rotation }) => { rotateViewport: ({ viewports, rotation }) => {
const enabledElement = _getActiveViewportEnabledElement( const enabledElement = _getActiveViewportEnabledElement(
@ -85,14 +77,13 @@ const actions = {
cornerstone.setViewport(enabledElement, viewport); cornerstone.setViewport(enabledElement, viewport);
} }
}, },
// This has a weird hard dependency on the tools that are available as toolbar // TODO: this is receiving `evt` from `ToolbarRow`. We could use it to have
// buttons. You can see this in `ohif-core/src/redux/reducers/tools.js` // better mouseButtonMask sets.
// the `toolName` needs to equal the button's `command` property. setToolActive: ({ toolName }) => {
// NOTE: It would be nice if `hotkeys` could set this, instead of creating a command per tool if (!toolName) {
setCornerstoneToolActive: ({ toolName }) => { console.warn('No toolname provided to setToolActive command');
console.warn(toolName); }
cornerstoneTools.setToolActive(toolName, { mouseButtonMask: 1 }); cornerstoneTools.setToolActive(toolName, { mouseButtonMask: 1 });
// store.dispatch(setToolActive(toolName));
}, },
updateViewportDisplaySet: ({ direction }) => { updateViewportDisplaySet: ({ direction }) => {
// TODO // TODO
@ -173,13 +164,8 @@ const definitions = {
options: { direction: -1 } options: { direction: -1 }
}, },
// TOOLS // TOOLS
setZoomTool: {
commandFn: actions.setCornerstoneToolActive,
storeContexts: [],
options: { toolName: 'Zoom' }
},
setToolActive: { setToolActive: {
commandFn: actions.setCornerstoneToolActive, commandFn: actions.setToolActive,
storeContexts: [], storeContexts: [],
options: {} options: {}
} }