fix(presentation-state): Iterate over map properly to restore the presentation state (#4013)
This commit is contained in:
parent
d8f66856cc
commit
fa38e6a07a
@ -182,13 +182,14 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi
|
|||||||
const { lutPresentation, positionPresentation } = presentations;
|
const { lutPresentation, positionPresentation } = presentations;
|
||||||
if (lutPresentation) {
|
if (lutPresentation) {
|
||||||
const { presentation } = lutPresentation;
|
const { presentation } = lutPresentation;
|
||||||
|
if (viewport instanceof VolumeViewport) {
|
||||||
if (viewport instanceof BaseVolumeViewport) {
|
if (presentation instanceof Map) {
|
||||||
Object.entries(presentation).forEach(
|
presentation.forEach((properties, volumeId) => {
|
||||||
([volumeId, properties]: [string, Types.ViewportProperties]) => {
|
|
||||||
viewport.setProperties(properties, volumeId);
|
viewport.setProperties(properties, volumeId);
|
||||||
}
|
});
|
||||||
);
|
} else {
|
||||||
|
viewport.setProperties(presentation);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
viewport.setProperties(presentation);
|
viewport.setProperties(presentation);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user