feat(OHIFStandaloneViewer.js): adding NProgress loading bar on top of the page

This commit is contained in:
biharck authored and Erik Ziegler committed 2019-06-27 15:28:37 +02:00
1 parent 5a3f3e3eff
commit edb0db349b
14 files changed
+271 -52

No files matched your search

+19 -3
View File
@@ -165,9 +165,25 @@ class Viewer extends Component {
onMeasurementsUpdated: this.onMeasurementsUpdated,
});
const patientId = studies[0] && studies[0].patientId;
timepointApi.retrieveTimepoints({ patientId });
measurementApi.retrieveMeasurements(patientId, [currentTimepointId]);
this.currentTimepointId = currentTimepointId;
this.timepointApi = timepointApi;
this.measurementApi = measurementApi;
if (studies) {
const patientId = studies[0] && studies[0].patientId;
timepointApi.retrieveTimepoints({ patientId });
measurementApi.retrieveMeasurements(patientId, [currentTimepointId]);
}
}
componentDidUpdate(prevProps) {
if (this.props.studies !== prevProps.studies) {
const { studies } = this.props;
const patientId = studies[0] && studies[0].patientId;
const currentTimepointId = this.currentTimepointId;
this.timepointApi.retrieveTimepoints({ patientId });
this.measurementApi.retrieveMeasurements(patientId, [currentTimepointId]);
}
}
render() {