Update extension manager to ingest each module type. Add toolbar Manager.

This commit is contained in:
James A. Petts committed 2020-05-15 14:04:06 +02:00
1 parent a8340b9b69
commit c42aa37d7f
9 files changed
+186 -85

No files matched your search

+19 -6
View File
@@ -12,12 +12,25 @@ export default function mode({ modeConfiguration }) {
routes: [
{
path: 'viewer',
preInit: ({ toolbarManager }) => {
toolbarManager &&
toolbarManager.setDefaultLoadOut([
[], // Primary
[], // Secondary
]);
init: ({ toolbarManager }) => {
toolbarManager.addButtons([
{
id: 'StackScroll', // If id not given will use default in button definition.
namespace: 'org.ohif.cornerstone.toolbarModule.StackScroll',
},
{
id: 'Zoom',
namespace: 'org.ohif.cornerstone.toolbarModule.Zoom',
},
]);
// Could import layout selector here from org.ohif.default (when it exists!)
toolbarManager.setToolBarLayout([
// Primary
['StackScroll', { label: 'More', subMenu: ['Zoom'] }],
// Secondary
['StackScroll'],
]);
},
layoutTemplate: ({ routeProps }) => {
return {