fix(viewports): The display of linked viewports during drag and drop has a race (#3286)
* fix: The display of linked viewports during drag and drop has a race * PR review comments * fix: Segmentation display two up * Removing console logs * Fix the blank viewport can have stuff added to it * Fix the null name on HP module * Fix the navigate to initial image * Fix the nth interleave loader * Fix the unit tests * PR comments - docs mostly * fix: Exception thrown on change displayset after double click
This commit is contained in:
1 parent
ca3b83b2b6
commit
5e42a42b5f
13 files changed
+215
-195
No files matched your search
@@ -206,40 +206,40 @@ describe('ExtensionManager.ts', () => {
|
||||
const extension = {
|
||||
id: 'hello-world',
|
||||
getViewportModule: () => {
|
||||
return [{}];
|
||||
return [{ name: 'test' }];
|
||||
},
|
||||
getSopClassHandlerModule: () => {
|
||||
return [{}];
|
||||
return [{ name: 'test' }];
|
||||
},
|
||||
getPanelModule: () => {
|
||||
return [{}];
|
||||
return [{ name: 'test' }];
|
||||
},
|
||||
getToolbarModule: () => {
|
||||
return [{}];
|
||||
return [{ name: 'test' }];
|
||||
},
|
||||
getCommandsModule: () => {
|
||||
return [{}];
|
||||
return [{ name: 'test' }];
|
||||
},
|
||||
getLayoutTemplateModule: () => {
|
||||
return [{}];
|
||||
return [{ name: 'test' }];
|
||||
},
|
||||
getDataSourcesModule: () => {
|
||||
return [{}];
|
||||
return [{ name: 'test' }];
|
||||
},
|
||||
getHangingProtocolModule: () => {
|
||||
return [{}];
|
||||
return [{ name: 'test' }];
|
||||
},
|
||||
getContextModule: () => {
|
||||
return [{}];
|
||||
return [{ name: 'test' }];
|
||||
},
|
||||
getUtilityModule: () => {
|
||||
return [{}];
|
||||
return [{ name: 'test' }];
|
||||
},
|
||||
getCustomizationModule: () => {
|
||||
return [{}];
|
||||
return [{ name: 'test' }];
|
||||
},
|
||||
getStateSyncModule: () => {
|
||||
return [{}];
|
||||
return [{ name: 'test' }];
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -283,6 +283,11 @@ export default class ExtensionManager {
|
||||
// Default for most extension points,
|
||||
// Just adds each entry ready for consumption by mode.
|
||||
extensionModule.forEach(element => {
|
||||
if (!element.name) {
|
||||
throw new Error(
|
||||
`Extension ID ${extensionId} module ${moduleType} element has no name`
|
||||
);
|
||||
}
|
||||
const id = `${extensionId}.${moduleType}.${element.name}`;
|
||||
element.id = id;
|
||||
this.modulesMap[id] = element;
|
||||
@@ -366,10 +371,10 @@ export default class ExtensionManager {
|
||||
|
||||
_initHangingProtocolsModule = (extensionModule, extensionId) => {
|
||||
const { hangingProtocolService } = this._servicesManager.services;
|
||||
extensionModule.forEach(({ id, protocol }) => {
|
||||
extensionModule.forEach(({ name, protocol }) => {
|
||||
if (protocol) {
|
||||
// Only auto-register if protocol specified, otherwise let mode register
|
||||
hangingProtocolService.addProtocol(id, protocol);
|
||||
hangingProtocolService.addProtocol(name, protocol);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user