refactor: layout manager to viewer (#1026)
* docs: formatting * Prefer numRows and numColumns to percentage width/height for layout * fix: LayoutManager --> ViewportGrid (get out of UI component library) * docs: remove outdated docs * Don't expose ExampleDropTarget * Revert thumnail entry drag source removal * Update screaming tests * fix drag-n-drop * fix vtk mpr2d CC: @jamesapetts * remove setSingleLayoutData * remove vtk qualifier
This commit is contained in:
1 parent
d6862e7418
commit
b01b0108b0
33 files changed
+456
-613
No files matched your search
@@ -1,9 +1,9 @@
|
||||
import OHIF from "@ohif/core";
|
||||
import PluginSwitch from "./PluginSwitch.js";
|
||||
import { commandsManager } from "./../App.js";
|
||||
import { connect } from "react-redux";
|
||||
// import OHIF from '@ohif/core';
|
||||
import PluginSwitch from './PluginSwitch.js';
|
||||
import { commandsManager } from './../App.js';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
const { setLayout } = OHIF.redux.actions;
|
||||
// const { setLayout } = OHIF.redux.actions;
|
||||
|
||||
const mapStateToProps = state => {
|
||||
const { activeViewportIndex, layout, viewportSpecificData } = state.viewports;
|
||||
@@ -11,17 +11,17 @@ const mapStateToProps = state => {
|
||||
return {
|
||||
activeViewportIndex,
|
||||
viewportSpecificData,
|
||||
layout
|
||||
layout,
|
||||
};
|
||||
};
|
||||
|
||||
const mapDispatchToProps = dispatch => {
|
||||
return {
|
||||
setLayout: data => {
|
||||
dispatch(setLayout(data));
|
||||
}
|
||||
};
|
||||
};
|
||||
// const mapDispatchToProps = dispatch => {
|
||||
// return {
|
||||
// setLayout: data => {
|
||||
// dispatch(setLayout(data));
|
||||
// }
|
||||
// };
|
||||
// };
|
||||
|
||||
/*function setSingleLayoutData(originalArray, viewportIndex, data) {
|
||||
const viewports = originalArray.slice();
|
||||
@@ -39,19 +39,17 @@ const mergeProps = (propsFromState, propsFromDispatch, ownProps) => {
|
||||
// TODO: Do not display certain options if the current display set
|
||||
// cannot be displayed using these view types
|
||||
const mpr = () => {
|
||||
commandsManager.runCommand("mpr2d");
|
||||
}
|
||||
;
|
||||
|
||||
commandsManager.runCommand('mpr2d');
|
||||
};
|
||||
return {
|
||||
mpr
|
||||
mpr,
|
||||
};
|
||||
};
|
||||
|
||||
const ConnectedPluginSwitch = connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps,
|
||||
null, // mapDispatchToProps
|
||||
mergeProps
|
||||
)(PluginSwitch);
|
||||
|
||||
export default ConnectedPluginSwitch;
|
||||
export default ConnectedPluginSwitch;
|
||||
Reference in new issue
Block a user