From 7ed90a280f2d39205a00dacff37c6330d00cab20 Mon Sep 17 00:00:00 2001 From: dannyrb Date: Sun, 16 Jun 2019 22:15:44 -0400 Subject: [PATCH] Escape hatch note --- .../src/ConnectedCornerstoneViewport.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/extensions/ohif-cornerstone-extension/src/ConnectedCornerstoneViewport.js b/extensions/ohif-cornerstone-extension/src/ConnectedCornerstoneViewport.js index 9095ab2e5..bb6e690ab 100644 --- a/extensions/ohif-cornerstone-extension/src/ConnectedCornerstoneViewport.js +++ b/extensions/ohif-cornerstone-extension/src/ConnectedCornerstoneViewport.js @@ -1,6 +1,6 @@ -import { connect } from 'react-redux'; import CornerstoneViewport from 'react-cornerstone-viewport'; import OHIF from 'ohif-core'; +import { connect } from 'react-redux'; import throttle from 'lodash.throttle'; const { @@ -10,7 +10,6 @@ const { } = OHIF.redux.actions; const mapStateToProps = (state, ownProps) => { - const activeButton = state.tools.buttons.find(tool => tool.active === true); let dataFromStore; if (state.extensions && state.extensions.cornerstone) { @@ -26,7 +25,9 @@ const mapStateToProps = (state, ownProps) => { return { layout: state.viewports.layout, isActive, - activeTool: activeButton && activeButton.command, + // TODO: Need a cleaner and more versatile way. + // Currently justing using escape hatch + commands + // activeTool: activeButton && activeButton.command, ...dataFromStore, enableStackPrefetch: isActive, //stack: viewportSpecificData.stack,