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

This commit is contained in:
Salim Kanoun authored and GitHub committed 2024-12-02 08:53:46 -05:00
1 parent 0a81ddb6da
commit 878a1f8af8
2 files changed
+2 -2

No files matched your search

@@ -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 // 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. // a larger issue regarding the definition of slice index with slab thickness.
// We need to revisit this to make it more robust and understandable. // 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); this.beforeResizePositionPresentations.set(viewportId, presentation);
}); });
@@ -187,7 +187,7 @@ export function ViewportGridProvider({ children, service }: ViewportGridProvider
updatedViewport?.viewportOptions updatedViewport?.viewportOptions
); );
const displaySetOptions = updatedViewport.displaySetOptions || []; const displaySetOptions = updatedViewport?.displaySetOptions || [];
if (!displaySetOptions.length) { if (!displaySetOptions.length) {
// Copy all the display set options, assuming a full set of displaySet UID's is provided. // Copy all the display set options, assuming a full set of displaySet UID's is provided.
if (state.isHangingProtocolLayout) { if (state.isHangingProtocolLayout) {