Merge pull request #1829 from OHIF/feat/ohif-165-fix
OHIF-165: Fix broken solution after recent merge
This commit is contained in:
commit
4c7e3f95fe
@ -5,14 +5,6 @@ import {
|
|||||||
useViewportGrid,
|
useViewportGrid,
|
||||||
} from '@ohif/ui';
|
} from '@ohif/ui';
|
||||||
|
|
||||||
const DEFAULT_LAYOUT = {
|
|
||||||
type: 'SET_LAYOUT',
|
|
||||||
payload: {
|
|
||||||
numCols: 1,
|
|
||||||
numRows: 1,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
function LayoutSelector() {
|
function LayoutSelector() {
|
||||||
const [isOpen, setIsOpen] = useState(false);
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
const [viewportGridState, viewportGridService] = useViewportGrid();
|
const [viewportGridState, viewportGridService] = useViewportGrid();
|
||||||
@ -33,7 +25,7 @@ function LayoutSelector() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
/* Reset to default layout when component unmounts */
|
/* Reset to default layout when component unmounts */
|
||||||
return () => {
|
return () => {
|
||||||
dispatch(DEFAULT_LAYOUT);
|
viewportGridService.setLayout({ numCols: 1, numRows: 1 });
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user