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);
|
||||
};
|
||||
loadSR();
|
||||
}, [dataSource, srDisplaySet]);
|
||||
}, [srDisplaySet]);
|
||||
|
||||
/**
|
||||
* Hook to update the tracking identifiers when the selected measurement changes or
|
||||
* the element changes
|
||||
*/
|
||||
useEffect(() => {
|
||||
const updateSR = async () => {
|
||||
if (!srDisplaySet.isLoaded) {
|
||||
await srDisplaySet.load();
|
||||
}
|
||||
if (!element || !srDisplaySet.isLoaded) {
|
||||
return;
|
||||
}
|
||||
setTrackingIdentifiers(measurementSelected);
|
||||
}
|
||||
updateSR();
|
||||
}, [measurementSelected, element, setTrackingIdentifiers, srDisplaySet]);
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user