ohif-viewer/extensions/ohif-vtk-extension/src/ConnectedToolbarSection.js

38 lines
773 B
JavaScript
Raw Normal View History

2019-04-16 18:00:06 +02:00
import { connect } from 'react-redux';
import { ToolbarSection } from 'react-viewerbase';
2019-05-01 19:10:44 +02:00
import OHIF from 'ohif-core';
2019-04-16 18:00:06 +02:00
const { setToolActive } = OHIF.redux.actions;
const mapStateToProps = state => {
const activeButton = state.tools.buttons.find(tool => tool.active === true);
return {
2019-05-01 19:10:44 +02:00
buttons: [
{
command: 'Rotate',
type: 'tool',
text: 'Rotate',
2019-05-28 20:50:22 +02:00
icon: '3d-rotate',
2019-05-01 19:10:44 +02:00
active: true
}
],
2019-04-16 18:00:06 +02:00
activeCommand: 'Rotate'
};
};
const mapDispatchToProps = dispatch => {
return {
setToolActive: tool => {
//dispatch(setToolActive(tool.command))
}
};
};
const ConnectedToolbarSection = connect(
mapStateToProps,
mapDispatchToProps
)(ToolbarSection);
export default ConnectedToolbarSection;