Bug fixing: The code block which activates first measurement is moved outside of if statement that checks whether toolDataInsertedManually is true.
This commit is contained in:
parent
6423751291
commit
a14973be04
@ -139,15 +139,17 @@ Template.viewer.onCreated(function() {
|
|||||||
added: function (data) {
|
added: function (data) {
|
||||||
if (data.toolDataInsertedManually === true) {
|
if (data.toolDataInsertedManually === true) {
|
||||||
|
|
||||||
// Activate first measurements in image box as default if exists
|
|
||||||
if (!firstMeasurementsActivated) {
|
|
||||||
var templateData = {contentId: Session.get("activeContentId")};
|
|
||||||
// Activate measurement
|
|
||||||
activateLesion(data._id, templateData);
|
|
||||||
firstMeasurementsActivated = true;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Activate first measurements in image box as default if exists
|
||||||
|
if (!firstMeasurementsActivated) {
|
||||||
|
var templateData = {contentId: Session.get("activeContentId")};
|
||||||
|
// Activate measurement
|
||||||
|
activateLesion(data._id, templateData);
|
||||||
|
firstMeasurementsActivated = true;
|
||||||
|
}
|
||||||
|
|
||||||
log.info('Measurement added');
|
log.info('Measurement added');
|
||||||
|
|
||||||
addMeasurementAsToolData(data);
|
addMeasurementAsToolData(data);
|
||||||
|
|||||||
@ -4,7 +4,10 @@
|
|||||||
* @param measurementId The unique key for a specific Measurement
|
* @param measurementId The unique key for a specific Measurement
|
||||||
*/
|
*/
|
||||||
activateLesion = function(measurementId, templateData) {
|
activateLesion = function(measurementId, templateData) {
|
||||||
// Find Measurement data for this lesion
|
|
||||||
|
// Set background color of selected row
|
||||||
|
$("tr[data-measurementid="+measurementId+"]").addClass("selectedRow").siblings().removeClass("selectedRow");
|
||||||
|
|
||||||
var measurementData = Measurements.findOne(measurementId);
|
var measurementData = Measurements.findOne(measurementId);
|
||||||
|
|
||||||
// If there is no measurement with this ID, stop here
|
// If there is no measurement with this ID, stop here
|
||||||
@ -221,9 +224,6 @@ Template.lesionTable.events({
|
|||||||
// Retrieve the lesion id from the DOM data for this row
|
// Retrieve the lesion id from the DOM data for this row
|
||||||
var measurementId = $(e.currentTarget).data('measurementid');
|
var measurementId = $(e.currentTarget).data('measurementid');
|
||||||
|
|
||||||
// Set background color of selected row
|
|
||||||
$(e.currentTarget).addClass("selectedRow").siblings().removeClass("selectedRow");
|
|
||||||
|
|
||||||
activateLesion(measurementId,template.data);
|
activateLesion(measurementId,template.data);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,6 @@
|
|||||||
#dragbar
|
#dragbar
|
||||||
width: 100%
|
width: 100%
|
||||||
height: 3px
|
height: 3px
|
||||||
postion: absolute
|
|
||||||
top: 0
|
top: 0
|
||||||
left: 0
|
left: 0
|
||||||
right: 0
|
right: 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user