* fix: 🐛 Make Plugin switch part of ToolbarModule Closes: #1241 * Move setCornerstoneViewport command into cornerstone extension * Exposing extensionManager into extension's get modules functions * Remove Plugin switch * Updating set cornerstonelayout to work on VIEWER context * Creating a customComponent for 2D MPR button * Use extensionManager to show or not buttons Adding isHidden option into toolbarModules * Make buttons hidden depending on extension registration * Fix unit test after changes on extensionManager * Remove workaround for extensionManager * Use studyMeatadataManager and remove TODO's * Remove storeContext not needed * Moving Exit 2D MPR into cornerstone extension with VTK context * Remove PluginSwitch files * Fix E2E tests * Adding cypress screenshots into gitignore * Remove extensionManager from getModuleFn functions and moving CustomComponent for VTK button to VTK extension Co-authored-by: Danny Brown <danny.ri.brown@gmail.com>
23 lines
412 B
JavaScript
23 lines
412 B
JavaScript
import { redux } from '@ohif/core';
|
|
|
|
const { setLayout } = redux.actions;
|
|
|
|
/**
|
|
* Update the current layout with a simple Cornerstone one
|
|
*
|
|
* @return void
|
|
*/
|
|
const setCornerstoneLayout = () => {
|
|
const layout = {
|
|
numRows: 1,
|
|
numColumns: 1,
|
|
viewports: [{ plugin: 'cornerstone' }],
|
|
};
|
|
|
|
const action = setLayout(layout);
|
|
|
|
window.store.dispatch(action);
|
|
}
|
|
|
|
export default setCornerstoneLayout;
|