fix : Resize was broken if 3d viewport displayed in HP (#4561)

This commit is contained in:
Salim Kanoun 2024-12-02 14:53:46 +01:00 committed by GitHub
parent 0a81ddb6da
commit 878a1f8af8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -1062,7 +1062,7 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi
// During a resize, the slice index should remain unchanged. This is a temporary fix for
// a larger issue regarding the definition of slice index with slab thickness.
// We need to revisit this to make it more robust and understandable.
delete presentation.viewReference.sliceIndex;
delete presentation.viewReference?.sliceIndex;
this.beforeResizePositionPresentations.set(viewportId, presentation);
});

View File

@ -187,7 +187,7 @@ export function ViewportGridProvider({ children, service }: ViewportGridProvider
updatedViewport?.viewportOptions
);
const displaySetOptions = updatedViewport.displaySetOptions || [];
const displaySetOptions = updatedViewport?.displaySetOptions || [];
if (!displaySetOptions.length) {
// Copy all the display set options, assuming a full set of displaySet UID's is provided.
if (state.isHangingProtocolLayout) {