Update dependents to use new exposed service
This commit is contained in:
1 parent
dfbf32fe43
commit
3993c12701
5 files changed
+12
-25
No files matched your search
@@ -7,7 +7,7 @@ import {
|
||||
|
||||
function LayoutSelector() {
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const [viewportGridState, dispatch] = useViewportGrid();
|
||||
const [viewportGridState, viewportGridService] = useViewportGrid();
|
||||
|
||||
useEffect(() => {
|
||||
function closeOnOutsideClick() {
|
||||
@@ -35,13 +35,7 @@ function LayoutSelector() {
|
||||
DropdownContent !== null && (
|
||||
<DropdownContent
|
||||
onSelection={({ numRows, numCols }) => {
|
||||
dispatch({
|
||||
type: 'SET_LAYOUT',
|
||||
payload: {
|
||||
numCols,
|
||||
numRows,
|
||||
},
|
||||
});
|
||||
viewportGridService.setLayout({ numCols, numRows });
|
||||
}}
|
||||
/>
|
||||
)
|
||||
|
||||
@@ -25,7 +25,7 @@ function OHIFCornerstoneSRViewport({
|
||||
viewportIndex,
|
||||
DisplaySetService,
|
||||
}) {
|
||||
const [viewportGrid, dispatchViewportGrid] = useViewportGrid();
|
||||
const [viewportGrid, viewportGridService] = useViewportGrid();
|
||||
const [measurementSelected, setMeasurementSelected] = useState(0);
|
||||
const [measurementCount, setMeasurementCount] = useState(1);
|
||||
const [viewportData, setViewportData] = useState(null);
|
||||
|
||||
+1
-4
@@ -19,10 +19,7 @@ function PanelStudyBrowserTracking({
|
||||
// doesn't have to have such an intense shape. This works well enough for now.
|
||||
// Tabs --> Studies --> DisplaySets --> Thumbnails
|
||||
const [{ StudyInstanceUIDs }, dispatchImageViewer] = useImageViewer();
|
||||
const [
|
||||
{ activeViewportIndex, viewports },
|
||||
dispatchViewportGrid,
|
||||
] = useViewportGrid();
|
||||
const [{ activeViewportIndex, viewports }] = useViewportGrid();
|
||||
const [
|
||||
trackedMeasurements,
|
||||
sendTrackedMeasurementsEvent,
|
||||
|
||||
@@ -41,10 +41,7 @@ function TrackedCornerstoneViewport({
|
||||
}) {
|
||||
const [trackedMeasurements] = useTrackedMeasurements();
|
||||
|
||||
const [
|
||||
{ activeViewportIndex, viewports },
|
||||
dispatchViewportGrid,
|
||||
] = useViewportGrid();
|
||||
const [{ activeViewportIndex, viewports }] = useViewportGrid();
|
||||
// viewportIndex, onSubmit
|
||||
const [viewportDialogState, viewportDialogApi] = useViewportDialog();
|
||||
const [viewportData, setViewportData] = useState(null);
|
||||
|
||||
Reference in new issue
Block a user