Remove dead code: ConnectedToolbarSection and setToolActive

This commit is contained in:
dannyrb 2019-06-16 14:23:03 -04:00
parent 3ed602a40a
commit fc6f7446d0
5 changed files with 1 additions and 53 deletions

View File

@ -2,8 +2,6 @@ import { connect } from 'react-redux';
import { ToolbarSection } from 'react-viewerbase';
import OHIF from 'ohif-core';
const { setToolActive } = OHIF.redux.actions;
const mapStateToProps = state => {
const activeButton = state.tools.buttons.find(tool => tool.active === true);
@ -23,9 +21,7 @@ const mapStateToProps = state => {
const mapDispatchToProps = dispatch => {
return {
setToolActive: tool => {
//dispatch(setToolActive(tool.command))
}
setToolActive: tool => {}
};
};

View File

@ -101,12 +101,6 @@ class App extends Component {
constructor(props) {
super(props);
//
const defaultButtons = getDefaultToolbarButtons(this.props.routerBasename);
const buttonsAction = redux.actions.setAvailableButtons(defaultButtons);
store.dispatch(buttonsAction);
if (this.props.oidc.length) {
const firstOpenIdClient = this.props.oidc[0];

View File

@ -1,29 +0,0 @@
import { connect } from 'react-redux';
import { ToolbarSection } from 'react-viewerbase';
import OHIF from 'ohif-core';
const { setToolActive } = OHIF.redux.actions;
const mapStateToProps = state => {
const activeButton = state.tools.buttons.find(tool => tool.active === true);
return {
buttons: state.tools.buttons,
activeCommand: activeButton && activeButton.command,
};
};
const mapDispatchToProps = dispatch => {
return {
setToolActive: tool => {
dispatch(setToolActive(tool.command));
},
};
};
const ConnectedToolbarSection = connect(
mapStateToProps,
mapDispatchToProps
)(ToolbarSection);
export default ConnectedToolbarSection;

View File

@ -5,7 +5,6 @@ import { connect } from 'react-redux';
const {
setViewportSpecificData,
clearViewportSpecificData,
// setToolActive,
// setActiveViewportSpecificData,
} = OHIF.redux.actions;
@ -28,9 +27,6 @@ const mapDispatchToProps = dispatch => {
clearViewportSpecificData: () => {
dispatch(clearViewportSpecificData());
},
// setToolActive: tool => {
// dispatch(setToolActive(tool));
// },
// setActiveViewportSpecificData: viewport => {
// dispatch(setActiveViewportSpecificData(viewport));
// },

View File

@ -19,15 +19,6 @@ class ViewerMain extends Component {
constructor(props) {
super(props);
// Initialize hotkeys
// new OHIF.HotkeysUtil('viewer', {
// setViewportSpecificData: props.setViewportSpecificData,
// clearViewportSpecificData: props.clearViewportSpecificData,
// setToolActive: props.setToolActive,
// setActiveViewportSpecificData: props.setActiveViewportSpecificData,
// });
// hotkeys.init();
this.state = {
displaySets: [],
};