LT-288: Fixing viewer crash for non associated studies
This commit is contained in:
1 parent
0eeb05e72b
commit
396f83b449
7 files changed
+88
-38
No files matched your search
+10
@@ -15,6 +15,11 @@ Template.toolbarSectionButton.helpers({
|
||||
|
||||
Template.toolbarSectionButton.events({
|
||||
'click .imageViewerTool'(event, instance) {
|
||||
// Stop here if the tool is disabled
|
||||
if ($(event.currentTarget).hasClass('disabled')) {
|
||||
return;
|
||||
}
|
||||
|
||||
const tool = event.currentTarget.id;
|
||||
const elements = instance.$('.imageViewerViewport');
|
||||
|
||||
@@ -29,6 +34,11 @@ Template.toolbarSectionButton.events({
|
||||
}
|
||||
},
|
||||
'click .imageViewerCommand'(event, instance) {
|
||||
// Stop here if the tool is disabled
|
||||
if ($(event.currentTarget).hasClass('disabled')) {
|
||||
return;
|
||||
}
|
||||
|
||||
const command = event.currentTarget.id;
|
||||
if (!OHIF.viewer.functionList || !OHIF.viewer.functionList.hasOwnProperty(command)) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user