feat(toolbox): Refactor Toolbar and Toolbox to enable sections (#4825)
This commit is contained in:
1 parent
86c12246ac
commit
cc5cdfb081
79 files changed
+3527
-2992
No files matched your search
@@ -38,8 +38,6 @@ const extensionDependencies = {
|
||||
|
||||
function modeFactory({ modeConfiguration }) {
|
||||
return {
|
||||
// TODO: We're using this as a route segment
|
||||
// We should not be.
|
||||
id,
|
||||
routeName: 'microscopy',
|
||||
displayName: i18n.t('Modes:Microscopy'),
|
||||
@@ -47,11 +45,21 @@ function modeFactory({ modeConfiguration }) {
|
||||
/**
|
||||
* Lifecycle hooks
|
||||
*/
|
||||
onModeEnter: ({ servicesManager, extensionManager, commandsManager }: withAppTypes) => {
|
||||
onModeEnter: ({ servicesManager }: withAppTypes) => {
|
||||
const { toolbarService } = servicesManager.services;
|
||||
|
||||
toolbarService.addButtons(toolbarButtons);
|
||||
toolbarService.createButtonSection('primary', ['MeasurementTools', 'dragPan', 'TagBrowser']);
|
||||
|
||||
toolbarService.createButtonSection('measurementSection', [
|
||||
'line',
|
||||
'point',
|
||||
'polygon',
|
||||
'circle',
|
||||
'box',
|
||||
'freehandpolygon',
|
||||
'freehandline',
|
||||
]);
|
||||
},
|
||||
|
||||
onModeExit: ({ servicesManager }: withAppTypes) => {
|
||||
@@ -79,9 +87,6 @@ function modeFactory({ modeConfiguration }) {
|
||||
routes: [
|
||||
{
|
||||
path: 'microscopy',
|
||||
/*init: ({ servicesManager, extensionManager }) => {
|
||||
//defaultViewerRouteInit
|
||||
},*/
|
||||
layoutTemplate: ({ location, servicesManager }) => {
|
||||
return {
|
||||
id: ohif.layout,
|
||||
|
||||
Reference in new issue
Block a user