Remove dead comments from commandsModule
This commit is contained in:
parent
6e4dba7a10
commit
ffae67dc99
@ -1,14 +1,6 @@
|
||||
import cornerstone from 'cornerstone-core';
|
||||
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 = {
|
||||
rotateViewport: ({ viewports, rotation }) => {
|
||||
const enabledElement = _getActiveViewportEnabledElement(
|
||||
@ -85,14 +77,13 @@ const actions = {
|
||||
cornerstone.setViewport(enabledElement, viewport);
|
||||
}
|
||||
},
|
||||
// This has a weird hard dependency on the tools that are available as toolbar
|
||||
// buttons. You can see this in `ohif-core/src/redux/reducers/tools.js`
|
||||
// the `toolName` needs to equal the button's `command` property.
|
||||
// NOTE: It would be nice if `hotkeys` could set this, instead of creating a command per tool
|
||||
setCornerstoneToolActive: ({ toolName }) => {
|
||||
console.warn(toolName);
|
||||
// TODO: this is receiving `evt` from `ToolbarRow`. We could use it to have
|
||||
// better mouseButtonMask sets.
|
||||
setToolActive: ({ toolName }) => {
|
||||
if (!toolName) {
|
||||
console.warn('No toolname provided to setToolActive command');
|
||||
}
|
||||
cornerstoneTools.setToolActive(toolName, { mouseButtonMask: 1 });
|
||||
// store.dispatch(setToolActive(toolName));
|
||||
},
|
||||
updateViewportDisplaySet: ({ direction }) => {
|
||||
// TODO
|
||||
@ -173,13 +164,8 @@ const definitions = {
|
||||
options: { direction: -1 }
|
||||
},
|
||||
// TOOLS
|
||||
setZoomTool: {
|
||||
commandFn: actions.setCornerstoneToolActive,
|
||||
storeContexts: [],
|
||||
options: { toolName: 'Zoom' }
|
||||
},
|
||||
setToolActive: {
|
||||
commandFn: actions.setCornerstoneToolActive,
|
||||
commandFn: actions.setToolActive,
|
||||
storeContexts: [],
|
||||
options: {}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user