From e6f64a6a97187005f1045f9f39d16a7341e622b3 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 30 Jun 2025 09:40:50 +0100 Subject: [PATCH] allow annotation navigation disabling --- dicom-viewer/src/App.tsx | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/dicom-viewer/src/App.tsx b/dicom-viewer/src/App.tsx index 2ac5a02..6e34425 100644 --- a/dicom-viewer/src/App.tsx +++ b/dicom-viewer/src/App.tsx @@ -166,6 +166,7 @@ function App({ container_id, imageStacks, autoCacheStack, annotationJson, viewer const restoringStateRef = useRef(false); + const [annotationNavEnabled, setAnnotationNavEnabled] = useState(true); const [availableStacks, setAvailableStacks] = useState([]); const [activeViewport, setActiveViewport] = useState(0); @@ -2177,7 +2178,7 @@ function App({ container_id, imageStacks, autoCacheStack, annotationJson, viewer )} - {viewportModes[i] === "stack" && (() => { + {viewportModes[i] === "stack" && annotationNavEnabled && (() => { // Get all annotations for this stack const imageIds = viewportImageIds[i]; const allAnnotations = cornerstoneTools.annotation.state.getAllAnnotations() || []; @@ -3079,6 +3080,23 @@ function App({ container_id, imageStacks, autoCacheStack, annotationJson, viewer ? "Disable Alt Key for Reference Cursors" : "Enable Alt Key for Reference Cursors"} + {/* Add more menu items here if needed */}