LT-288: Fixing viewer crash for non associated studies

This commit is contained in:
Bruno Alves de Faria committed 2016-08-29 09:10:51 -03:00
1 parent 0eeb05e72b
commit 396f83b449
7 files changed
+88 -38

No files matched your search

@@ -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;