feat(tmtv-mode): Add Brush tools and move SUV peak calculation to web worker (#4053)

This commit is contained in:
Alireza authored and GitHub committed 2024-04-19 15:11:31 -04:00
1 parent 8c5ab942b9
commit 8192e348ec
27 files changed
+593 -212

No files matched your search

+11 -12
View File
@@ -279,19 +279,18 @@ export default async function init({
eventTarget.addEventListener(EVENTS.ELEMENT_DISABLED, elementDisabledHandler.bind(null));
colormaps.forEach(registerColormap);
// Create a debounced function that shows the notification
const debouncedShowNotification = debounce(detail => {
uiNotificationService.show({
title: detail.type,
message: detail.message,
type: 'error',
});
}, 300);
// Event listener
eventTarget.addEventListener(EVENTS.ERROR_EVENT, ({ detail }) => {
debouncedShowNotification(detail);
});
eventTarget.addEventListenerDebounced(
EVENTS.ERROR_EVENT,
({ detail }) => {
uiNotificationService.show({
title: detail.type,
message: detail.message,
type: 'error',
});
},
1000
);
}
function CPUModal() {