fix: jump to measurement forever (#4867)
This commit is contained in:
1 parent
eafa2efda5
commit
d7bd36544a
39 files changed
+731
-448
No files matched your search
@@ -38,7 +38,7 @@ const EVENTS = {
|
||||
VIEWPORT_VOLUMES_CHANGED: 'event::cornerstoneViewportService:viewportVolumesChanged',
|
||||
};
|
||||
|
||||
export const WITH_NAVIGATION = { withNavigation: true, withOrientation: true };
|
||||
export const WITH_NAVIGATION = { withNavigation: true, withOrientation: false };
|
||||
|
||||
/**
|
||||
* Handles cornerstone viewport logic including enabling, disabling, and
|
||||
@@ -851,14 +851,18 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi
|
||||
viewport.setProperties(properties, volumeId);
|
||||
});
|
||||
|
||||
viewport.render();
|
||||
|
||||
this.setPresentations(viewport.id, presentations, viewportInfo);
|
||||
|
||||
const imageIndex = this._getInitialImageIndexForViewport(viewportInfo);
|
||||
if (!presentations.positionPresentation) {
|
||||
const imageIndex = this._getInitialImageIndexForViewport(viewportInfo);
|
||||
|
||||
if (imageIndex !== undefined) {
|
||||
csUtils.jumpToSlice(viewport.element, {
|
||||
imageIndex,
|
||||
});
|
||||
if (imageIndex !== undefined) {
|
||||
csUtils.jumpToSlice(viewport.element, {
|
||||
imageIndex,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
viewport.render();
|
||||
@@ -1177,6 +1181,20 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the display sets for a given viewport
|
||||
* @param viewportId - The ID of the viewport to get display sets for
|
||||
* @returns Array of display sets for the viewport
|
||||
*/
|
||||
public getViewportDisplaySets(viewportId: string): OhifTypes.DisplaySet[] {
|
||||
const { displaySetService } = this.servicesManager.services;
|
||||
const displaySetInstanceUIDs = this.viewportsDisplaySets.get(viewportId) || [];
|
||||
|
||||
return displaySetInstanceUIDs
|
||||
.map(uid => displaySetService.getDisplaySetByUID(uid))
|
||||
.filter(Boolean);
|
||||
}
|
||||
}
|
||||
|
||||
export default CornerstoneViewportService;
|
||||
Reference in new issue
Block a user