Skip to content

Commit

Permalink
Reducing number of changed lines
Browse files Browse the repository at this point in the history
  • Loading branch information
wayfarer3130 committed Sep 21, 2023
1 parent c7ae0d5 commit 270c93f
Showing 1 changed file with 47 additions and 54 deletions.
101 changes: 47 additions & 54 deletions modes/longitudinal/src/toolbarButtons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,42 +59,6 @@ function _createSetToolActiveCommands(toolName) {
return temp;
}

const StackImageSync = _createToggleButton(
'StackImageSync',
'link',
'Stack Image Sync',
[
{
commandName: 'toggleStackImageSync',
},
],
'Enable position synchronization on stack viewports',
{
listeners: {
newStack: {
commandName: 'toggleStackImageSync',
commandOptions: { toggledState: true },
},
},
}
);

const StackPrefetch = _createToggleButton(
'StackPrefetch',
'link',
'Stack Prefetch',
[],
'Enable Complete Stack Prefetch',
{
listeners: {
newStack: {
commandName: 'stackPrefetch',
},
},
isActive: true,
}
);

const ReferenceLinesCommands = [
{
commandName: 'setSourceViewportForReferenceLinesTool',
Expand All @@ -109,20 +73,6 @@ const ReferenceLinesCommands = [
},
];

const ReferenceLines = _createToggleButton(
'ReferenceLines',
'tool-referenceLines', // change this with the new icon
'Reference Lines',
ReferenceLinesCommands,
'Show reference lines',
{
listeners: {
activeViewportIdChanged: ReferenceLinesCommands,
newStack: ReferenceLinesCommands,
},
}
);

const toolbarButtons: Button[] = [
// Measurement
{
Expand Down Expand Up @@ -469,8 +419,38 @@ const toolbarButtons: Button[] = [
],
'Flip Horizontal'
),
StackImageSync,
ReferenceLines,
_createToggleButton(
'StackImageSync',
'link',
'Stack Image Sync',
[
{
commandName: 'toggleStackImageSync',
},
],
'Enable position synchronization on stack viewports',
{
listeners: {
newStack: {
commandName: 'toggleStackImageSync',
commandOptions: { toggledState: true },
},
},
}
),
_createToggleButton(
'ReferenceLines',
'tool-referenceLines', // change this with the new icon
'Reference Lines',
ReferenceLinesCommands,
'Show reference lines',
{
listeners: {
activeViewportIdChanged: ReferenceLinesCommands,
newStack: ReferenceLinesCommands,
},
}
),
_createToggleButton(
'ImageOverlayViewer',
'toggle-dicom-overlay',
Expand Down Expand Up @@ -652,8 +632,21 @@ const toolbarButtons: Button[] = [
},
},

// Register buttons that are used for top level actions
StackPrefetch,
_createToggleButton(
'StackPrefetch',
'link',
'Stack Prefetch',
[],
'Enable Complete Stack Prefetch',
{
listeners: {
newStack: {
commandName: 'stackPrefetch',
},
},
isActive: true,
}
),
];

export default toolbarButtons;

0 comments on commit 270c93f

Please sign in to comment.