feat(ViewportActionMenu): window level per viewport / new patient info / colorbars/ 3D presets and 3D volume rendering (#3963)
Co-authored-by: Joe Boccanfuso <109477394+jbocce@users.noreply.github.com>
This commit is contained in:
1 parent
07301fc020
commit
b7f90e3951
164 files changed
+5887
-932
No files matched your search
@@ -0,0 +1,31 @@
|
||||
import log from './../log.js';
|
||||
|
||||
/**
|
||||
* The ServiceProvidersManager allows for a React context provider class to be registered
|
||||
* for a particular service. This allows for extensions to register services
|
||||
* with context providers and the providers will be instantiated and added to the
|
||||
* DOM dynamically.
|
||||
*/
|
||||
export default class ServiceProvidersManager {
|
||||
public providers = {};
|
||||
|
||||
public constructor() {
|
||||
this.providers = {};
|
||||
}
|
||||
|
||||
registerProvider(serviceName, provider) {
|
||||
if (!serviceName) {
|
||||
log.warn(
|
||||
'Attempting to register a provider to a null/undefined service name. Exiting early.'
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!provider) {
|
||||
log.warn('Attempting to register a null/undefined provider. Exiting early.');
|
||||
return;
|
||||
}
|
||||
|
||||
this.providers[serviceName] = provider;
|
||||
}
|
||||
}
|
||||
@@ -42,6 +42,9 @@ class UIModalService {
|
||||
closeButton = true,
|
||||
title = null,
|
||||
customClassName = null,
|
||||
movable = false,
|
||||
containerDimensions = null,
|
||||
contentDimensions = null,
|
||||
}) {
|
||||
return serviceImplementation._show({
|
||||
content,
|
||||
@@ -51,6 +54,9 @@ class UIModalService {
|
||||
closeButton,
|
||||
title,
|
||||
customClassName,
|
||||
movable,
|
||||
containerDimensions,
|
||||
contentDimensions,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import MeasurementService from './MeasurementService';
|
||||
import ServicesManager from './ServicesManager';
|
||||
import ServiceProvidersManager from './ServiceProvidersManager';
|
||||
import UIDialogService from './UIDialogService';
|
||||
import UIModalService from './UIModalService';
|
||||
import UINotificationService from './UINotificationService';
|
||||
@@ -22,6 +23,7 @@ export {
|
||||
Services,
|
||||
MeasurementService,
|
||||
ServicesManager,
|
||||
ServiceProvidersManager,
|
||||
CustomizationService,
|
||||
StateSyncService,
|
||||
UIDialogService,
|
||||
|
||||
Reference in new issue
Block a user