fix(sr): rendering issue by running loadSR before updateSR (#4226)
This commit is contained in:
parent
a97666ea4e
commit
6971287460
@ -270,17 +270,23 @@ function OHIFCornerstoneSRViewport(props: withAppTypes) {
|
|||||||
updateViewport(measurementSelected);
|
updateViewport(measurementSelected);
|
||||||
};
|
};
|
||||||
loadSR();
|
loadSR();
|
||||||
}, [dataSource, srDisplaySet]);
|
}, [srDisplaySet]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hook to update the tracking identifiers when the selected measurement changes or
|
* Hook to update the tracking identifiers when the selected measurement changes or
|
||||||
* the element changes
|
* the element changes
|
||||||
*/
|
*/
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
const updateSR = async () => {
|
||||||
|
if (!srDisplaySet.isLoaded) {
|
||||||
|
await srDisplaySet.load();
|
||||||
|
}
|
||||||
if (!element || !srDisplaySet.isLoaded) {
|
if (!element || !srDisplaySet.isLoaded) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setTrackingIdentifiers(measurementSelected);
|
setTrackingIdentifiers(measurementSelected);
|
||||||
|
}
|
||||||
|
updateSR();
|
||||||
}, [measurementSelected, element, setTrackingIdentifiers, srDisplaySet]);
|
}, [measurementSelected, element, setTrackingIdentifiers, srDisplaySet]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user