Files
ohif-viewer/platform/viewer/src/connectedComponents/ConnectedToolContextMenu.js
T

24 lines
511 B
JavaScript
Raw Normal View History

2019-05-29 08:39:54 -04:00
import { connect } from 'react-redux';
import ToolContextMenu from './ToolContextMenu';
2019-05-02 17:12:06 -04:00
const mapStateToProps = (state, ownProps) => {
if (!state.ui || !state.ui.contextMenu) {
return {
visible: false,
2019-05-29 08:39:54 -04:00
};
2019-05-02 17:12:06 -04:00
}
2019-05-29 08:39:54 -04:00
const { viewportIndex } = ownProps;
const toolContextMenuData = state.ui.contextMenu[viewportIndex];
2019-05-02 17:12:06 -04:00
return {
...toolContextMenuData,
2019-05-29 08:39:54 -04:00
};
};
2019-05-02 17:12:06 -04:00
const ConnectedToolContextMenu = connect(
mapStateToProps,
null
2019-05-29 08:39:54 -04:00
)(ToolContextMenu);
2019-05-02 17:12:06 -04:00
2019-05-29 08:39:54 -04:00
export default ConnectedToolContextMenu;