feat(actions): simplify action corner api through the toolbarService (#5033)
This commit is contained in:
1 parent
f71b88e639
commit
7c15bb8901
246 files changed
+7930
-4270
No files matched your search
@@ -10,13 +10,13 @@ import {
|
||||
} from '../types/Colorbar';
|
||||
import { ColorMapPreset } from '../types/Colormap';
|
||||
|
||||
const defaultPosition: ColorbarPositionType = 'right';
|
||||
const defaultPosition: ColorbarPositionType = 'bottom';
|
||||
const DefaultColormap = 'Grayscale';
|
||||
|
||||
const positionStyles: PositionStylesMapType = {
|
||||
left: { left: '5%', width: '15px' },
|
||||
right: { right: '5%', width: '15px' },
|
||||
bottom: { bottom: '1%', height: '18px' },
|
||||
left: { width: '15px' },
|
||||
right: { width: '15px' },
|
||||
bottom: { height: '15px' },
|
||||
};
|
||||
|
||||
// Typed position-specific tick styles
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
import { getWindowLevelActionMenu } from '../components/WindowLevelActionMenu/getWindowLevelActionMenu';
|
||||
import { getViewportDataOverlaySettingsMenu } from '../components/ViewportDataOverlaySettingMenu';
|
||||
import { getViewportOrientationMenu } from '../components/ViewportOrientationMenu';
|
||||
import { ViewportActionCorners } from '@ohif/ui-next';
|
||||
import { MENU_IDS } from '../components/menus/menu-ids';
|
||||
|
||||
// Generate component renderer functions for each component type
|
||||
const createOrientationMenu = ({ viewportId, element, location }) => {
|
||||
return getViewportOrientationMenu({
|
||||
viewportId,
|
||||
element,
|
||||
location,
|
||||
});
|
||||
};
|
||||
|
||||
const createDataOverlay = ({ viewportId, element, displaySets, location }) => {
|
||||
return getViewportDataOverlaySettingsMenu({
|
||||
viewportId,
|
||||
element,
|
||||
displaySets,
|
||||
location,
|
||||
});
|
||||
};
|
||||
|
||||
const createWindowLevelMenu = ({ viewportId, element, displaySets, location }) => {
|
||||
return getWindowLevelActionMenu({
|
||||
viewportId,
|
||||
element,
|
||||
displaySets,
|
||||
location,
|
||||
});
|
||||
};
|
||||
|
||||
export default {
|
||||
'ui.viewportActionCorner': ViewportActionCorners,
|
||||
'viewportActionMenu.topLeft': [
|
||||
{
|
||||
id: MENU_IDS.ORIENTATION_MENU,
|
||||
component: createOrientationMenu,
|
||||
},
|
||||
{
|
||||
id: MENU_IDS.DATA_OVERLAY_MENU,
|
||||
component: createDataOverlay,
|
||||
},
|
||||
{
|
||||
id: MENU_IDS.WINDOW_LEVEL_MENU,
|
||||
component: createWindowLevelMenu,
|
||||
},
|
||||
],
|
||||
'viewportActionMenu.topRight': [],
|
||||
'viewportActionMenu.bottomLeft': [],
|
||||
'viewportActionMenu.bottomRight': [],
|
||||
};
|
||||
Reference in new issue
Block a user