Skip to content

Commit

Permalink
UI fix: Collapsed 2dMPR button to main toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
TZubiri committed Sep 24, 2019
1 parent 6a5ebb3 commit c572984
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
};

Expand Down
4 changes: 2 additions & 2 deletions platform/viewer/src/connectedComponents/PluginSwitch.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import './PluginSwitch.css';

class PluginSwitch extends Component {
static propTypes = {
button: PropTypes.any,
mpr: PropTypes.func,
};

static defaultProps = {};
Expand All @@ -15,7 +15,7 @@ class PluginSwitch extends Component {
<div className="PluginSwitch">
<ToolbarButton label = "2D MPR"
icon = "cube"
onClick = {this.props.button.onClick} />
onClick = {this.props.mpr} />
</div>
);
}
Expand Down

0 comments on commit c572984

Please sign in to comment.