* Enable study prefetcher and expose configs * Fix progress for all images * Enable study loading listener * Add new default for displaying progress bar for series * Use events instead of redux to improve performance * Add documentation, resolve issues with different datasets * CR Updates * CR Updates * CR Updates & Resolve issue when activating both stack and study prefetch * Add upward and update display set logic * Add new behavior to prefetching orders * Rollback display set check and activate cache check * Remove prefetch check * Check if displayset has images * Debounce check cache events * Remove usued debounce flags * Ignore prefetching same image * Use new image instead of image rendered * Continue prefetch after cache check * Update prefetch logic after checking cache * Remove log * Update displayset count default to 3 * Update netlify config Co-authored-by: Alireza <ar.sedghi@gmail.com>
24 lines
519 B
JavaScript
24 lines
519 B
JavaScript
import { useEffect } from 'react';
|
|
import OHIF from '@ohif/core';
|
|
|
|
const { StudyLoadingListener } = OHIF.classes;
|
|
|
|
const StudyLoadingMonitor = ({ studies }) => {
|
|
useEffect(() => {
|
|
const studyLoadingListener = StudyLoadingListener.getInstance();
|
|
|
|
if (studies && studies.length > 0) {
|
|
studyLoadingListener.clear();
|
|
studyLoadingListener.addStudies(studies);
|
|
}
|
|
|
|
return () => {
|
|
studyLoadingListener.clear();
|
|
};
|
|
}, [studies]);
|
|
|
|
return null;
|
|
};
|
|
|
|
export default StudyLoadingMonitor;
|