From 270c93f75960b362b7f1f65fc812989c67a94513 Mon Sep 17 00:00:00 2001 From: Bill Wallace Date: Thu, 21 Sep 2023 14:25:18 -0400 Subject: [PATCH] Reducing number of changed lines --- modes/longitudinal/src/toolbarButtons.ts | 101 +++++++++++------------ 1 file changed, 47 insertions(+), 54 deletions(-) diff --git a/modes/longitudinal/src/toolbarButtons.ts b/modes/longitudinal/src/toolbarButtons.ts index c3ff33ff43..7ee554dad7 100644 --- a/modes/longitudinal/src/toolbarButtons.ts +++ b/modes/longitudinal/src/toolbarButtons.ts @@ -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', @@ -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 { @@ -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', @@ -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;