allow annotation navigation disabling
This commit is contained in:
@@ -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<StackEntry[]>([]);
|
||||
const [activeViewport, setActiveViewport] = useState<number | null>(0);
|
||||
@@ -2177,7 +2178,7 @@ function App({ container_id, imageStacks, autoCacheStack, annotationJson, viewer
|
||||
</span>
|
||||
)}
|
||||
</button>
|
||||
{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"}
|
||||
</button>
|
||||
<button
|
||||
style={{
|
||||
padding: "10px 18px",
|
||||
background: annotationNavEnabled ? "#1976d2" : "#333",
|
||||
color: "#fff",
|
||||
border: "none",
|
||||
borderRadius: "4px",
|
||||
fontWeight: "bold",
|
||||
cursor: "pointer",
|
||||
fontSize: "15px",
|
||||
marginBottom: "18px",
|
||||
width: "100%",
|
||||
}}
|
||||
onClick={() => setAnnotationNavEnabled((prev) => !prev)}
|
||||
>
|
||||
{annotationNavEnabled ? "Hide" : "Show"} Annotation Navigation
|
||||
</button>
|
||||
{/* Add more menu items here if needed */}
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user