fix(WindowLevelActionMenu): The window level menu must show different contents for 3D volume viewports (#5113)
This commit is contained in:
1 parent
2234121a19
commit
0afb3fc753
5 files changed
+50
-37
No files matched your search
@@ -108,6 +108,15 @@ const Menu = (props: MenuProps) => {
|
||||
]);
|
||||
const [itemPanelLabels, setItemPanelLabels] = useState<Array<string>>([]);
|
||||
|
||||
// If the props change for the this top level menu then we have to update the menu path
|
||||
// because the props to be rendered are maintained in the state.
|
||||
useEffect(() => {
|
||||
setMenuPath(menuPath => [
|
||||
{ props, activePanelIndex: activePanelIndex || 0 },
|
||||
...menuPath.slice(1),
|
||||
]);
|
||||
}, [activePanelIndex, props]);
|
||||
|
||||
const hideMenu = useCallback(() => {
|
||||
if (preventHideMenu) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user