Lesion Tracker Redesign so far
This commit is contained in:
1 parent
b247e89d8b
commit
a9a4f3f82b
109 files changed
+2972
-936
No files matched your search
@@ -1,9 +1,30 @@
|
||||
Template.lesionTable.helpers({
|
||||
measurement: function() {
|
||||
targets: function() {
|
||||
// All Targets shall be listed first followed by Non-Targets
|
||||
return Measurements.find({}, {
|
||||
return Measurements.find({
|
||||
isTarget: true
|
||||
}, {
|
||||
sort: {
|
||||
lesionNumberAbsolute: 1
|
||||
}
|
||||
});
|
||||
},
|
||||
nonTargets: function() {
|
||||
// All Targets shall be listed first followed by Non-Targets
|
||||
return Measurements.find({
|
||||
isTarget: false
|
||||
}, {
|
||||
sort: {
|
||||
lesionNumberAbsolute: 1
|
||||
}
|
||||
});
|
||||
},
|
||||
newLesions: function() {
|
||||
// All Targets shall be listed first followed by Non-Targets
|
||||
return Measurements.find({
|
||||
saved: false
|
||||
}, {
|
||||
sort: {
|
||||
isTarget: -1,
|
||||
lesionNumberAbsolute: 1
|
||||
}
|
||||
});
|
||||
@@ -14,59 +35,43 @@ Template.lesionTable.helpers({
|
||||
latestDate: 1
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
buttonGroupData() {
|
||||
const instance = Template.instance();
|
||||
return {
|
||||
value: instance.lesionTableLayout,
|
||||
options: [{
|
||||
key: 'comparison',
|
||||
text: 'Comparison'
|
||||
}, {
|
||||
key: 'key',
|
||||
text: 'Key Timepoints'
|
||||
}]
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
Template.lesionTable.events({
|
||||
// 'click table#tblLesion tbody tr': function(e, template) {
|
||||
// Retrieve the lesion id from the DOM data for this row
|
||||
// var measurementId = $(e.currentTarget).data('measurementid');
|
||||
|
||||
// activateLesion(measurementId, template.data);
|
||||
//},
|
||||
'mousedown div#dragbar': function(e, template) {
|
||||
var pY = e.pageY;
|
||||
var draggableParent = $(e.currentTarget).parent();
|
||||
var startHeight = draggableParent.height();
|
||||
template.dragging.set(true);
|
||||
|
||||
$(document).on('mouseup', function(e) {
|
||||
template.dragging.set(false);
|
||||
$(document).off('mouseup').off('mousemove');
|
||||
});
|
||||
|
||||
$(document).on('mousemove', function(e) {
|
||||
var topPosition = e.pageY - pY;
|
||||
var newHeight = startHeight - topPosition;
|
||||
|
||||
// Min lesion table height = 5px
|
||||
if (newHeight < 5) {
|
||||
return;
|
||||
}
|
||||
|
||||
draggableParent.css({
|
||||
top: topPosition,
|
||||
height: newHeight
|
||||
});
|
||||
|
||||
var viewportAndLesionTableHeight = $('#viewportAndLesionTable').height();
|
||||
var newPercentageHeightofLesionTable = (startHeight - topPosition) / viewportAndLesionTableHeight * 100;
|
||||
var newPercentageHeightofViewermain = 100 - newPercentageHeightofLesionTable;
|
||||
$('.viewerMain').height(newPercentageHeightofViewermain + '%');
|
||||
|
||||
// Resize viewport
|
||||
resizeViewportElements();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Template.lesionTable.onCreated(function() {
|
||||
this.dragging = new ReactiveVar(false);
|
||||
/**
|
||||
* Retrieve the lesion id from the DOM data for this row
|
||||
*/
|
||||
/*'click table#tblLesion tbody tr': function(e, template) {
|
||||
var measurementId = $(e.currentTarget).data('measurementid');
|
||||
activateLesion(measurementId, template.data);
|
||||
},*/
|
||||
});
|
||||
|
||||
// Temporary until we have a real window manager with events for series/study changed
|
||||
Session.setDefault('NewSeriesLoaded', false);
|
||||
|
||||
Template.lesionTable.onCreated(function() {
|
||||
var instance = this;
|
||||
|
||||
instance.lesionTableLayout = new ReactiveVar();
|
||||
instance.lesionTableLayout.set('comparisonTimepoints');
|
||||
});
|
||||
|
||||
Template.lesionTable.onRendered(function() {
|
||||
// Find the first measurement by Lesion Number
|
||||
var firstLesion = Measurements.findOne({}, {
|
||||
|
||||
Reference in new issue
Block a user