Applied JSCS and added JSCS/jsHint config files

This commit is contained in:
Erik Ziegler committed 2016-01-11 11:32:20 +01:00
1 parent a9266608d2
commit 90a16a8059
68 files changed
+24956 -6399

No files matched your search

+8 -8
View File
@@ -1,15 +1,15 @@
clearTools = function() {
var patientId = Session.get("patientId");
var toolTypes = ["lesion", "nonTarget"];
var patientId = Session.get('patientId');
var toolTypes = [ 'lesion', 'nonTarget' ];
var toolState = cornerstoneTools.globalImageIdSpecificToolStateManager.toolState;
var toolStateKeys = Object.keys(toolState).slice(0);
// Set null array for toolState data found by imageId and toolType
toolStateKeys.forEach(function (imageId) {
toolTypes.forEach(function (toolType) {
toolStateKeys.forEach(function(imageId) {
toolTypes.forEach(function(toolType) {
var toolTypeData = toolState[imageId][toolType];
if(toolTypeData && toolTypeData.data.length > 0) {
if(toolTypeData.data[0].patientId === patientId) {
if (toolTypeData && toolTypeData.data.length > 0) {
if (toolTypeData.data[0].patientId === patientId) {
toolState[imageId][toolType] = {
data: []
};
@@ -19,11 +19,11 @@ clearTools = function() {
});
// Update imageViewerViewport elements to remove lesions on current image
var viewportElements = $(".imageViewerViewport").not('.empty');
var viewportElements = $('.imageViewerViewport').not('.empty');
viewportElements.each(function(index, element) {
cornerstone.updateImage(element);
});
// Remove patient's measurements
Meteor.call('removeMeasurementsByPatientId', patientId);
};
};