From 30a98559c60cf17dd703e86ce30a0119bf30a82d Mon Sep 17 00:00:00 2001 From: Leonardo Campos Date: Tue, 7 Mar 2017 18:32:42 -0300 Subject: [PATCH] image tools: event handlers should not return 'false' when it's disabled or toolData is unavailable (PR #190) Pull request https://github.com/chafey/cornerstoneTools/pull/190 --- .../ohif-cornerstone/client/cornerstoneTools.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Packages/ohif-cornerstone/client/cornerstoneTools.js b/Packages/ohif-cornerstone/client/cornerstoneTools.js index 98fa53254..1cd4506ab 100644 --- a/Packages/ohif-cornerstone/client/cornerstoneTools.js +++ b/Packages/ohif-cornerstone/client/cornerstoneTools.js @@ -2424,7 +2424,7 @@ if (typeof cornerstoneTools === 'undefined') { } if (e.data && e.data.mouseButtonMask && !cornerstoneTools.isMouseButtonEnabled(eventData.which, e.data.mouseButtonMask)) { - return false; + return; } var config = cornerstoneTools.arrowAnnotate.getConfiguration(); @@ -2473,7 +2473,7 @@ if (typeof cornerstoneTools === 'undefined') { } if (e.data && e.data.mouseButtonMask && !cornerstoneTools.isMouseButtonEnabled(eventData.which, e.data.mouseButtonMask)) { - return false; + return; } var config = cornerstoneTools.arrowAnnotate.getConfiguration(); @@ -2483,7 +2483,7 @@ if (typeof cornerstoneTools === 'undefined') { // now check to see if there is a handle we can move if (!toolData) { - return false; + return; } if (eventData.handlePressed) { @@ -5787,7 +5787,7 @@ if (typeof cornerstoneTools === 'undefined') { } if (e.data && e.data.mouseButtonMask && !cornerstoneTools.isMouseButtonEnabled(eventData.which, e.data.mouseButtonMask)) { - return false; + return; } var config = cornerstoneTools.seedAnnotate.getConfiguration(); @@ -5797,7 +5797,7 @@ if (typeof cornerstoneTools === 'undefined') { // now check to see if there is a handle we can move if (!toolData) { - return false; + return; } for (var i = 0; i < toolData.data.length; i++) { @@ -6440,7 +6440,7 @@ if (typeof cornerstoneTools === 'undefined') { } if (e.data && e.data.mouseButtonMask && !cornerstoneTools.isMouseButtonEnabled(eventData.which, e.data.mouseButtonMask)) { - return false; + return; } var config = cornerstoneTools.textMarker.getConfiguration(); @@ -6450,7 +6450,7 @@ if (typeof cornerstoneTools === 'undefined') { // now check to see if there is a handle we can move if (!toolData) { - return false; + return; } for (var i = 0; i < toolData.data.length; i++) { @@ -6502,7 +6502,7 @@ if (typeof cornerstoneTools === 'undefined') { // now check to see if there is a handle we can move if (!toolData) { - return false; + return; } if (eventData.handlePressed) {