LT-251: Making studies clickable to trigger series state
This commit is contained in:
1 parent
b6e95b567b
commit
0d9afa3557
6 files changed
+46
-34
No files matched your search
+5
-3
@@ -48,12 +48,14 @@ Template.studyTimepointStudy.events({
|
||||
},
|
||||
|
||||
// Changes the current study selection for the clicked study
|
||||
'click .studySidebarTimepoint .studyModality'(event, instance) {
|
||||
'click .studyModality'(event, instance) {
|
||||
const $study = $(event.currentTarget).closest('.studyTimepointStudy');
|
||||
|
||||
const studyData = instance.data.study;
|
||||
const studyInstanceUid = studyData.studyInstanceUid;
|
||||
|
||||
const isQuickSwitch = !_.isUndefined(instance.data.viewportIndex);
|
||||
|
||||
// Check if the study already has series data,
|
||||
// and if not, retrieve it.
|
||||
if (!studyData.seriesList) {
|
||||
@@ -65,13 +67,13 @@ Template.studyTimepointStudy.events({
|
||||
$study.addClass('loading');
|
||||
getStudyMetadata(studyInstanceUid, studyData => {
|
||||
ViewerStudies.insert(studyData);
|
||||
instance.select();
|
||||
instance.select(isQuickSwitch);
|
||||
});
|
||||
} else {
|
||||
studyData.seriesList = alreadyLoaded.seriesList;
|
||||
}
|
||||
} else {
|
||||
instance.select();
|
||||
instance.select(isQuickSwitch);
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user