fix(hydration): Maintain the same slice that the user was on pre hydration in post hydration for SR and SEG. (#4200)

This commit is contained in:
Ibrahim authored and GitHub committed 2024-06-05 10:07:53 -04:00
1 parent ddc7559e16
commit 430330f7e3
8 files changed
+60 -10

No files matched your search

@@ -1,5 +1,5 @@
import { PubSubService } from '@ohif/core';
import * as OhifTypes from '@ohif/core/types';
import { Types as OhifTypes } from '@ohif/core';
import {
RenderingEngine,
StackViewport,
@@ -617,11 +617,9 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi
imageIds?: string[]
): number {
const initialImageOptions = viewportInfo.getInitialImageOptions();
if (!initialImageOptions) {
return;
}
const { index, preset } = initialImageOptions;
const viewportType = viewportInfo.getViewportType();
@@ -16,6 +16,7 @@ import { SyncGroup } from '../SyncGroupService/SyncGroupService';
export type InitialImageOptions = {
index?: number;
preset?: JumpPresets;
useOnce?: boolean;
};
export type ViewportOptions = {