Update dependents to use new exposed service

This commit is contained in:
dannyrb committed 2020-06-26 13:28:30 -04:00
1 parent dfbf32fe43
commit 3993c12701
5 files changed
+12 -25

No files matched your search

@@ -10,11 +10,13 @@ function ViewerViewportGrid(props) {
const { servicesManager, viewportComponents, dataSource } = props;
const [
{ numCols, numRows, activeViewportIndex, viewports },
dispatch,
viewportGridService,
] = useViewportGrid();
debugger;
const setActiveViewportIndex = index => {
dispatch({ type: 'SET_ACTIVE_VIEWPORT_INDEX', payload: index });
viewportGridService.setActiveViewportIndex(index);
};
// TODO -> Need some way of selecting which displaySets hit the viewports.
@@ -71,12 +73,9 @@ function ViewerViewportGrid(props) {
// ]);
const onDropHandler = (viewportIndex, { displaySetInstanceUID }) => {
console.warn(`DROPPED: ${displaySetInstanceUID}`);
dispatch({
type: 'SET_DISPLAYSET_FOR_VIEWPORT',
payload: {
viewportIndex,
displaySetInstanceUID,
},
viewportGridService.setDisplaysetForViewport({
viewportIndex,
displaySetInstanceUID,
});
};