feat(App): Loads mode extensions on demand (#3312)
* feat: Dynamic plugin imports * Remove unused file * Fix basic dev mode * Fix the modes issue that Joe requested * Merge fixes * Add the ability to publish directory contents * PR review changes ---------
This commit is contained in:
1 parent
2f355fa158
commit
a688f03fdb
11 files changed
+225
-197
No files matched your search
@@ -10,7 +10,6 @@ const configs = {
|
||||
const ohif = {
|
||||
layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout',
|
||||
sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack',
|
||||
hangingProtocol: '@ohif/extension-default.hangingProtocolModule.default',
|
||||
measurements: '@ohif/extension-default.panelModule.measure',
|
||||
thumbnailList: '@ohif/extension-default.panelModule.seriesList',
|
||||
};
|
||||
@@ -47,8 +46,8 @@ const extensionDependencies = {
|
||||
function modeFactory({ modeConfiguration }) {
|
||||
return {
|
||||
id,
|
||||
routeName: 'viewer',
|
||||
displayName: 'Basic Viewer CS3D',
|
||||
routeName: 'dev',
|
||||
displayName: 'Basic Dev Viewer',
|
||||
/**
|
||||
* Lifecycle hooks
|
||||
*/
|
||||
@@ -134,6 +133,15 @@ function modeFactory({ modeConfiguration }) {
|
||||
'MoreTools',
|
||||
]);
|
||||
},
|
||||
onModeExit: ({ servicesManager }) => {
|
||||
const {
|
||||
toolGroupService,
|
||||
measurementService,
|
||||
toolbarService,
|
||||
} = servicesManager.services;
|
||||
|
||||
toolGroupService.destroy();
|
||||
},
|
||||
validationTags: {
|
||||
study: [],
|
||||
series: [],
|
||||
@@ -177,7 +185,7 @@ function modeFactory({ modeConfiguration }) {
|
||||
},
|
||||
],
|
||||
extensions: extensionDependencies,
|
||||
hangingProtocol: [ohif.hangingProtocol],
|
||||
hangingProtocol: 'default',
|
||||
sopClassHandlers: [
|
||||
dicomvideo.sopClassHandler,
|
||||
ohif.sopClassHandler,
|
||||
|
||||
Reference in new issue
Block a user