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:
1 parent
ddc7559e16
commit
430330f7e3
8 files changed
+60
-10
No files matched your search
@@ -160,6 +160,14 @@ export function ViewportGridProvider({ children, service }) {
|
||||
|
||||
const previousViewport = viewports.get(viewportId);
|
||||
|
||||
// remove options that were meant for one time usage
|
||||
if (previousViewport?.viewportOptions?.initialImageOptions) {
|
||||
const { useOnce } = previousViewport.viewportOptions.initialImageOptions;
|
||||
if (useOnce) {
|
||||
previousViewport.viewportOptions.initialImageOptions = null;
|
||||
}
|
||||
}
|
||||
|
||||
// Use the newly provide viewportOptions and display set options
|
||||
// when provided, and otherwise fall back to the previous ones.
|
||||
// That allows for easy updates of just the display set.
|
||||
|
||||
Reference in new issue
Block a user