From c57298475af444b7db15ea52ab72c2b3a84e65a6 Mon Sep 17 00:00:00 2001 From: Tomas Zubiri Date: Tue, 24 Sep 2019 18:43:32 -0300 Subject: [PATCH] UI fix: Collapsed 2dMPR button to main toolbar --- .../src/connectedComponents/ConnectedPluginSwitch.js | 9 ++------- platform/viewer/src/connectedComponents/PluginSwitch.js | 4 ++-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/platform/viewer/src/connectedComponents/ConnectedPluginSwitch.js b/platform/viewer/src/connectedComponents/ConnectedPluginSwitch.js index 847e44481c4..24221887b0b 100644 --- a/platform/viewer/src/connectedComponents/ConnectedPluginSwitch.js +++ b/platform/viewer/src/connectedComponents/ConnectedPluginSwitch.js @@ -38,18 +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 button = - { - label: "2D MPR", - icon: "cube", - onClick: () => { + const mpr = () => { commandsManager.runCommand("mpr2d"); } - } ; return { - button + mpr }; }; diff --git a/platform/viewer/src/connectedComponents/PluginSwitch.js b/platform/viewer/src/connectedComponents/PluginSwitch.js index 740844722b8..f9437cef63c 100644 --- a/platform/viewer/src/connectedComponents/PluginSwitch.js +++ b/platform/viewer/src/connectedComponents/PluginSwitch.js @@ -5,7 +5,7 @@ import './PluginSwitch.css'; class PluginSwitch extends Component { static propTypes = { - button: PropTypes.any, + mpr: PropTypes.func, }; static defaultProps = {}; @@ -15,7 +15,7 @@ class PluginSwitch extends Component {
+ onClick = {this.props.mpr} />
); }