2020-07-03 19:18:59 +02:00
|
|
|
import { SOPClassHandlerId } from './id';
|
|
|
|
|
|
|
|
|
|
export default function onModeEnter({ servicesManager }) {
|
2023-02-10 22:46:09 +01:00
|
|
|
const { displaySetService } = servicesManager.services;
|
|
|
|
|
const displaySetCache = displaySetService.getDisplaySetCache();
|
2020-07-03 19:18:59 +02:00
|
|
|
|
2023-04-25 23:25:10 +02:00
|
|
|
const srDisplaySets = [...displaySetCache.values()].filter(
|
2020-07-03 19:18:59 +02:00
|
|
|
ds => ds.SOPClassHandlerId === SOPClassHandlerId
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
srDisplaySets.forEach(ds => {
|
|
|
|
|
// New mode route, allow SRs to be hydrated again
|
|
|
|
|
ds.isHydrated = false;
|
|
|
|
|
});
|
|
|
|
|
}
|