[OHIF-309] - Users should be able to delete an SR from the side panel when the behavior is supported by the data source (#1952)
* Remove trailing zeroes from patient age * WIP reject + remove displaySet. * ohif-316: Update DICOM SR thumbnail design to include a delete action (#1948) * add "supportsReject" to netlify config Co-authored-by: Igor Octaviano <igoroctaviano@gmail.com> Co-authored-by: Danny Brown <danny.ri.brown@gmail.com>
This commit is contained in:
15 files changed
+236
-41
No files matched your search
@@ -43,6 +43,23 @@ function OHIFCornerstoneSRViewport({
|
||||
const [isHydrated, setIsHydrated] = useState(displaySet.isHydrated);
|
||||
const { viewports, activeViewportIndex } = viewportGrid;
|
||||
|
||||
useEffect(() => {
|
||||
const onDisplaySetsRemovedSubscription = DisplaySetService.subscribe(
|
||||
DisplaySetService.EVENTS.DISPLAY_SETS_REMOVED, ({ displaySetInstanceUIDs }) => {
|
||||
const activeViewport = viewports[activeViewportIndex];
|
||||
if (displaySetInstanceUIDs.includes(activeViewport.displaySetInstanceUID)) {
|
||||
viewportGridService.setDisplaysetForViewport({
|
||||
viewportIndex: activeViewportIndex,
|
||||
displaySetInstanceUID: undefined,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return () => {
|
||||
onDisplaySetsRemovedSubscription.unsubscribe();
|
||||
};
|
||||
}, []);
|
||||
|
||||
// Optional hook into tracking extension, if present.
|
||||
let trackedMeasurements;
|
||||
let sendTrackedMeasurementsEvent;
|
||||
|
||||
Reference in new issue
Block a user