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;
|
||||
if (lutPresentation) {
|
||||
const { presentation } = lutPresentation;
|
||||
|
||||
if (viewport instanceof BaseVolumeViewport) {
|
||||
Object.entries(presentation).forEach(
|
||||
([volumeId, properties]: [string, Types.ViewportProperties]) => {
|
||||
if (viewport instanceof VolumeViewport) {
|
||||
if (presentation instanceof Map) {
|
||||
presentation.forEach((properties, volumeId) => {
|
||||
viewport.setProperties(properties, volumeId);
|
||||
}
|
||||
);
|
||||
});
|
||||
} else {
|
||||
viewport.setProperties(presentation);
|
||||
}
|
||||
} else {
|
||||
viewport.setProperties(presentation);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user