Merge pull request #949 from TZubiri/2dmpr-ui-fix
ui fix: Made mpr more accessible from toolbar.
This commit is contained in:
commit
246936f90b
@ -38,59 +38,13 @@ const mergeProps = (propsFromState, propsFromDispatch, ownProps) => {
|
|||||||
|
|
||||||
// TODO: Do not display certain options if the current display set
|
// TODO: Do not display certain options if the current display set
|
||||||
// cannot be displayed using these view types
|
// cannot be displayed using these view types
|
||||||
const buttons = [
|
const mpr = () => {
|
||||||
/*{
|
|
||||||
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: () => {
|
|
||||||
commandsManager.runCommand("mpr2d");
|
commandsManager.runCommand("mpr2d");
|
||||||
}
|
}
|
||||||
}
|
;
|
||||||
];
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
buttons
|
mpr
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -100,4 +54,4 @@ const ConnectedPluginSwitch = connect(
|
|||||||
mergeProps
|
mergeProps
|
||||||
)(PluginSwitch);
|
)(PluginSwitch);
|
||||||
|
|
||||||
export default ConnectedPluginSwitch;
|
export default ConnectedPluginSwitch;
|
||||||
@ -1,11 +1,11 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { ExpandableToolMenu } from '@ohif/ui';
|
import { ToolbarButton } from '@ohif/ui';
|
||||||
import './PluginSwitch.css';
|
import './PluginSwitch.css';
|
||||||
|
|
||||||
class PluginSwitch extends Component {
|
class PluginSwitch extends Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
buttons: PropTypes.array,
|
mpr: PropTypes.func,
|
||||||
};
|
};
|
||||||
|
|
||||||
static defaultProps = {};
|
static defaultProps = {};
|
||||||
@ -13,7 +13,9 @@ class PluginSwitch extends Component {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="PluginSwitch">
|
<div className="PluginSwitch">
|
||||||
<ExpandableToolMenu buttons={this.props.buttons} label={'View'} />
|
<ToolbarButton label = "2D MPR"
|
||||||
|
icon = "cube"
|
||||||
|
onClick = {this.props.mpr} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user