diff --git a/platform/viewer/src/connectedComponents/ConnectedPluginSwitch.js b/platform/viewer/src/connectedComponents/ConnectedPluginSwitch.js index 3c5ded332f8..24221887b0b 100644 --- a/platform/viewer/src/connectedComponents/ConnectedPluginSwitch.js +++ b/platform/viewer/src/connectedComponents/ConnectedPluginSwitch.js @@ -38,59 +38,13 @@ const mergeProps = (propsFromState, propsFromDispatch, ownProps) => { // TODO: Do not display certain options if the current display set // cannot be displayed using these view types - const buttons = [ - /*{ - text: 'Acquired', - type: 'command', - icon: 'bars', - active: false, - onClick: () => { - console.warn('Original Acquisition'); - - const layoutData = setSingleLayoutData( - layout.viewports, - activeViewportIndex, - { plugin: 'cornerstone' } - ); - - setLayout({ viewports: layoutData }); - }, - }, - { - text: 'Axial', - icon: 'cube', - active: false, - onClick: () => { - commandsManager.runCommand('axial'); - }, - }, - { - text: 'Sagittal', - icon: 'cube', - active: false, - onClick: () => { - commandsManager.runCommand('sagittal'); - }, - }, - { - text: 'Coronal', - icon: 'cube', - active: false, - onClick: () => { - commandsManager.runCommand('coronal'); - }, - },*/ - { - label: "2D MPR", - icon: "cube", - onClick: () => { + const mpr = () => { commandsManager.runCommand("mpr2d"); } - } - ]; + ; return { - buttons + mpr }; }; @@ -100,4 +54,4 @@ const ConnectedPluginSwitch = connect( mergeProps )(PluginSwitch); -export default ConnectedPluginSwitch; +export default ConnectedPluginSwitch; \ No newline at end of file diff --git a/platform/viewer/src/connectedComponents/PluginSwitch.js b/platform/viewer/src/connectedComponents/PluginSwitch.js index 9865da3c0ff..f9437cef63c 100644 --- a/platform/viewer/src/connectedComponents/PluginSwitch.js +++ b/platform/viewer/src/connectedComponents/PluginSwitch.js @@ -1,11 +1,11 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { ExpandableToolMenu } from '@ohif/ui'; +import { ToolbarButton } from '@ohif/ui'; import './PluginSwitch.css'; class PluginSwitch extends Component { static propTypes = { - buttons: PropTypes.array, + mpr: PropTypes.func, }; static defaultProps = {}; @@ -13,7 +13,9 @@ class PluginSwitch extends Component { render() { return (