pre mouse changes
This commit is contained in:
@@ -255,6 +255,7 @@ function App() {
|
|||||||
Primary: StackScrollTool.toolName,
|
Primary: StackScrollTool.toolName,
|
||||||
Auxiliary: PanTool.toolName,
|
Auxiliary: PanTool.toolName,
|
||||||
Secondary: WindowLevelTool.toolName,
|
Secondary: WindowLevelTool.toolName,
|
||||||
|
Primary_and_Secondary: ZoomTool.toolName, // 1 (left) + 2 (right) = 3
|
||||||
})
|
})
|
||||||
const [ctrlMouseToolBindings, setCtrlMouseToolBindings] = useState({
|
const [ctrlMouseToolBindings, setCtrlMouseToolBindings] = useState({
|
||||||
Primary: LengthTool.toolName,
|
Primary: LengthTool.toolName,
|
||||||
@@ -377,11 +378,9 @@ function App() {
|
|||||||
// Helper to apply all mouse tool bindings (normal or ctrl)
|
// Helper to apply all mouse tool bindings (normal or ctrl)
|
||||||
const applyMouseToolBindings = useCallback(() => {
|
const applyMouseToolBindings = useCallback(() => {
|
||||||
// Apply to both stack and volume tool groups
|
// Apply to both stack and volume tool groups
|
||||||
const stackToolGroup = cornerstoneTools.ToolGroupManager.getToolGroup(STACK_TOOL_GROUP_ID);
|
|
||||||
const volumeToolGroup = cornerstoneTools.ToolGroupManager.getToolGroup(VOLUME_TOOL_GROUP_ID);
|
|
||||||
const mainToolGroup = cornerstoneTools.ToolGroupManager.getToolGroup(MAIN_TOOL_GROUP_ID);
|
const mainToolGroup = cornerstoneTools.ToolGroupManager.getToolGroup(MAIN_TOOL_GROUP_ID);
|
||||||
|
|
||||||
[stackToolGroup, volumeToolGroup, mainToolGroup].forEach(toolGroup => {
|
[mainToolGroup].forEach(toolGroup => {
|
||||||
if (toolGroup) {
|
if (toolGroup) {
|
||||||
// Set all tools to passive first, removing all bindings
|
// Set all tools to passive first, removing all bindings
|
||||||
TOOL_OPTIONS.forEach(opt => {
|
TOOL_OPTIONS.forEach(opt => {
|
||||||
@@ -417,6 +416,7 @@ function App() {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, [mouseToolBindings, ctrlMouseToolBindings]);
|
}, [mouseToolBindings, ctrlMouseToolBindings]);
|
||||||
|
|||||||
Reference in New Issue
Block a user