This commit is contained in:
Ross
2025-06-23 15:15:58 +01:00
parent d5046659fd
commit c063a3a6f3
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -1570,7 +1570,6 @@ function App({ container_id, imageStacks, autoCacheStack, annotationJson, viewer
return;
}
console.log("HELLO");
// Now safe to restore state for ALL viewports
for (let i = 0; i < numActive; i++) {
console.log("Restoring state for viewport", i);
@@ -1635,6 +1634,7 @@ function App({ container_id, imageStacks, autoCacheStack, annotationJson, viewer
state.props[i] &&
typeof viewport.setProperties === "function"
) {
console.log("Restoring properties for viewport", i, state.props[i]);
const propsToRestore = { ...state.props[i] };
if (
propsToRestore.colormap !== undefined &&
@@ -1646,6 +1646,8 @@ function App({ container_id, imageStacks, autoCacheStack, annotationJson, viewer
}
viewport.setProperties(propsToRestore);
viewport.render();
} else {
console.warn("No properties to restore for viewport", i);
}
// Restore camera