Nested toolbar w/ "sticky" when clicked

This commit is contained in:
dannyrb committed 2020-06-14 23:42:44 -04:00
1 parent 217d848f9f
commit 8c1a844558
11 files changed
+167 -93

No files matched your search

+11 -11
View File
@@ -55,17 +55,17 @@ export default function mode({ modeConfiguration }) {
]);
// Could import layout selector here from org.ohif.default (when it exists!)
ToolBarService.setToolBarLayout([
// Primary
{
tools: ['Zoom', 'Levels', 'Pan', 'Capture', 'Layout'],
moreTools: ['Zoom'],
},
// Secondary
{
tools: ['Annotate', 'Bidirectional', 'Ellipse', 'Length'],
},
]);
// ToolBarService.setToolBarLayout([
// // Primary
// {
// tools: ['Zoom', 'Levels', 'Pan', 'Capture', 'Layout'],
// moreTools: ['Zoom'],
// },
// // Secondary
// {
// tools: ['Annotate', 'Bidirectional', 'Ellipse', 'Length'],
// },
// ]);
},
layoutTemplate: ({ routeProps }) => {
return {
+3 -3
View File
@@ -34,10 +34,10 @@ export default function mode({ modeConfiguration }) {
'Zoom',
'Wwwc',
'Pan',
'Capture', // toggle --> command to open capture modal? needs to know when it should be off? (promise?)
'Layout', // toggle --> command to open layout dialog? needs to know when it should be off? (promise?)
'Capture',
// 'Layout', // toggle --> command to open layout dialog? needs to know when it should be off? (promise?)
'Divider',
'Zoom', // ? array of arrays?
['Zoom', 'Wwwc'],
]);
ToolBarService.createButtonSection('secondary', [
'Annotate',
+15 -4
View File
@@ -4,7 +4,7 @@ export default [
id: 'Divider',
type: 'ohif.divider',
},
// Primary
// ~~ Primary
{
id: 'Zoom',
type: 'ohif.radioGroup',
@@ -50,7 +50,19 @@ export default [
type: 'primary',
},
},
// Secondary
{
id: 'Capture',
type: 'ohif.action',
props: {
icon: 'tool-capture',
label: 'Capture',
commandName: 'showDownloadViewportModal',
type: 'primary',
},
},
// Layout
// Expanded/Nested?
// ~~ Secondary
{
id: 'Annotate',
type: 'ohif.radioGroup',
@@ -63,8 +75,7 @@ export default [
label: 'Annotate',
commandName: 'setToolActive',
commandOptions: { toolName: 'ArrowAnnotate' },
type: 'secondary', // Purely for background color/hover styles :|
// Layout Template can set this?
type: 'secondary',
},
},
{