feat: add customization to PanelStudyBrowser dbl click callback (#4871)

This commit is contained in:
Pedro Köhler authored and GitHub committed 2025-03-20 12:06:26 -04:00
1 parent f73c485821
commit 01c3726ced
4 files changed
+154 -27

No files matched your search

@@ -44,4 +44,33 @@ export default {
},
],
'studyBrowser.studyMode': 'all',
'studyBrowser.thumbnailDoubleClickCallback': {
callbacks: [
({ activeViewportId, servicesManager, isHangingProtocolLayout }) =>
async displaySetInstanceUID => {
const { hangingProtocolService, viewportGridService, uiNotificationService } =
servicesManager.services;
let updatedViewports = [];
const viewportId = activeViewportId;
try {
updatedViewports = hangingProtocolService.getViewportsRequireUpdate(
viewportId,
displaySetInstanceUID,
isHangingProtocolLayout
);
} catch (error) {
console.warn(error);
uiNotificationService.show({
title: 'Thumbnail Double Click',
message: 'The selected display sets could not be added to the viewport.',
type: 'error',
duration: 3000,
});
}
viewportGridService.setDisplaySetsForViewports(updatedViewports);
},
],
},
};