Added other required definitions.

This commit is contained in:
James A. Petts committed 2020-05-15 14:04:51 +02:00
1 parent 41c508b2da
commit 07ca72d0df
5 files changed
+112 -50

No files matched your search

+55 -43
View File
@@ -35,15 +35,7 @@ const enums = {
};
const definitions = [
{
id: 'StackScroll',
label: 'Stack Scroll',
icon: 'bars',
//
type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
commandName: 'setToolActive',
commandOptions: { toolName: 'StackScroll' },
},
// UPDATED
{
id: 'Zoom',
label: 'Zoom',
@@ -56,7 +48,7 @@ const definitions = [
{
id: 'Wwwc',
label: 'Levels',
icon: 'level',
icon: 'tool-window-level',
//
type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
commandName: 'setToolActive',
@@ -65,30 +57,70 @@ const definitions = [
{
id: 'Pan',
label: 'Pan',
icon: 'arrows',
icon: 'tool-move',
//
type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
commandName: 'setToolActive',
commandOptions: { toolName: 'Pan' },
},
{
id: 'Length',
label: 'Length',
icon: 'measure-temp',
id: 'Capture',
label: 'Capture',
icon: 'tool-capture',
//
type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
commandName: 'setToolActive',
commandOptions: { toolName: 'Length' },
type: TOOLBAR_BUTTON_TYPES.BUILT_IN,
options: {
behavior: TOOLBAR_BUTTON_BEHAVIORS.DOWNLOAD_SCREEN_SHOT,
togglable: true,
},
},
{
id: 'ArrowAnnotate',
id: 'Annotate',
label: 'Annotate',
icon: 'measure-non-target',
icon: 'tool-annotate',
//
type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
commandName: 'setToolActive',
commandOptions: { toolName: 'ArrowAnnotate' },
},
{
id: 'Bidirectional',
label: 'Bidirectional',
icon: 'tool-bidirectional',
//
type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
commandName: 'setToolActive',
commandOptions: { toolName: 'Bidirectional' },
},
{
id: 'Ellipse',
label: 'Ellipse',
icon: 'tool-elipse',
//
type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
commandName: 'setToolActive',
commandOptions: { toolName: 'EllipticalRoi' },
},
{
id: 'Length',
label: 'Length',
icon: 'tool-length',
//
type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
commandName: 'setToolActive',
commandOptions: { toolName: 'Length' },
},
// OLD
{
id: 'StackScroll',
label: 'Stack Scroll',
icon: 'bars',
//
type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
commandName: 'setToolActive',
commandOptions: { toolName: 'StackScroll' },
},
{
id: 'Angle',
label: 'Angle',
@@ -148,15 +180,6 @@ const definitions = [
commandName: 'setToolActive',
commandOptions: { toolName: 'DragProbe' },
},
{
id: 'EllipticalRoi',
label: 'Ellipse',
icon: 'circle-o',
//
type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
commandName: 'setToolActive',
commandOptions: { toolName: 'EllipticalRoi' },
},
{
id: 'RectangleRoi',
label: 'Rectangle',
@@ -207,24 +230,13 @@ const definitions = [
commandName: 'clearAnnotations',
},
{
id: 'Bidirectional',
label: 'Bidirectional',
icon: 'measure-target',
id: 'Eraser',
label: 'Eraser',
icon: 'eraser',
//
type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
commandName: 'setToolActive',
commandOptions: { toolName: 'Bidirectional' },
},
{
id: 'Download',
label: 'Download',
icon: 'create-screen-capture',
//
type: TOOLBAR_BUTTON_TYPES.BUILT_IN,
options: {
behavior: TOOLBAR_BUTTON_BEHAVIORS.DOWNLOAD_SCREEN_SHOT,
togglable: true,
},
commandOptions: { toolName: 'Eraser' },
},
],
},
@@ -30,6 +30,7 @@ const Header = ({ tools, moreTools }) => {
{ name: 'Bone', value: '2500 / 480' },
{ name: 'Brain', value: '80 / 40' },
];
/*
const tools = [
{
@@ -0,0 +1,19 @@
const TOOLBAR_BUTTON_TYPES = {
COMMAND: 'command',
SET_TOOL_ACTIVE: 'setToolActive',
BUILT_IN: 'builtIn',
};
const definitions = [
{
id: 'Layout',
label: 'Layout',
icon: 'tool-layout',
commandName: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
commandOptions: { toolName: 'Layout' }, // TODO
},
];
export default function getToolbarModule() {
return { definitions, defaultContext: 'ACTIVE_VIEWPORT::CORNERSTONE' };
}
+2
View File
@@ -3,6 +3,7 @@ import getDataSourcesModule from './getDataSourcesModule.js';
import getLayoutTemplateModule from './getLayoutTemplateModule.js';
import getPanelModule from './getPanelModule.js';
import getSopClassHandlerModule from './getSopClassHandlerModule.js';
import getToolbarModule from './getToolbarModule.js';
import id from './id';
export default {
@@ -15,4 +16,5 @@ export default {
getLayoutTemplateModule,
getPanelModule,
getSopClassHandlerModule,
getToolbarModule,
};