From 82d4c942554f932d91ec6a640762b2bb5491ae38 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 22 Sep 2025 11:03:30 +0100 Subject: [PATCH] Refactor right-side stack panel to simplify open state management and remove pinning functionality --- dicom-viewer/src/App.tsx | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/dicom-viewer/src/App.tsx b/dicom-viewer/src/App.tsx index 894bd85..4fba525 100644 --- a/dicom-viewer/src/App.tsx +++ b/dicom-viewer/src/App.tsx @@ -176,9 +176,7 @@ function App({ container_id, imageStacks, autoCacheStack, annotationJson, viewer // Settings open state // (top bar removed; stack browser moved to right-side panel) - // Right-side stack panel pinned state (false = auto-hide, true = pinned open) - const [stackPanelPinned, setStackPanelPinned] = useState(false); - // Local open state toggled by small button (replaces hover-to-open) + // Right-side stack panel open state (toggled by button) const [stackPanelOpen, setStackPanelOpen] = useState(false); const [fullscreenHoverIdx, setFullscreenHoverIdx] = useState(null); @@ -2995,7 +2993,7 @@ function App({ container_id, imageStacks, autoCacheStack, annotationJson, viewer {/* Right-side stack panel is implemented in the main content flex container below */} {/* Floating right-edge toggle — always visible so users can open the panel */} - {! (stackPanelPinned || stackPanelOpen) && ( + {!stackPanelOpen && ( )} -
+
{/* Side menu toggle button */}