NonTarget tool touch events
This commit is contained in:
parent
7f6a35f45d
commit
b28edb9704
@ -72,7 +72,7 @@
|
|||||||
cornerstoneTools.removeToolState(mouseEventData.element, toolType, measurementData);
|
cornerstoneTools.removeToolState(mouseEventData.element, toolType, measurementData);
|
||||||
}
|
}
|
||||||
|
|
||||||
config.getNonTargetLesionLocationCallback(measurementData, mouseEventData, doneCallback);
|
config.getNonTargetLesionLocationCallback(measurementData, mouseEventData, doneCallback);
|
||||||
|
|
||||||
$(mouseEventData.element).on('CornerstoneToolsMouseMove', eventData, cornerstoneTools.nonTarget.mouseMoveCallback);
|
$(mouseEventData.element).on('CornerstoneToolsMouseMove', eventData, cornerstoneTools.nonTarget.mouseMoveCallback);
|
||||||
$(mouseEventData.element).on('CornerstoneToolsMouseDown', eventData, cornerstoneTools.nonTarget.mouseDownCallback);
|
$(mouseEventData.element).on('CornerstoneToolsMouseDown', eventData, cornerstoneTools.nonTarget.mouseDownCallback);
|
||||||
@ -283,14 +283,10 @@
|
|||||||
function addNewMeasurementTouch(touchEventData) {
|
function addNewMeasurementTouch(touchEventData) {
|
||||||
var element = touchEventData.element;
|
var element = touchEventData.element;
|
||||||
|
|
||||||
function doneChangingTextCallback(text) {
|
function doneCallback(lesionNumber) {
|
||||||
if (text !== null) {
|
measurementData.lesionName = "Non-Target "+lesionNumber;
|
||||||
measurementData.text = text;
|
measurementData.lesionNumber = lesionNumber;
|
||||||
} else {
|
measurementData.active = true;
|
||||||
cornerstoneTools.removeToolState(element, toolType, measurementData);
|
|
||||||
}
|
|
||||||
|
|
||||||
measurementData.active = false;
|
|
||||||
cornerstone.updateImage(element);
|
cornerstone.updateImage(element);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -299,6 +295,12 @@
|
|||||||
$(element).off('CornerstoneToolsTouchDrag', cornerstoneTools.nonTargetTouch.touchMoveCallback);
|
$(element).off('CornerstoneToolsTouchDrag', cornerstoneTools.nonTargetTouch.touchMoveCallback);
|
||||||
$(element).off('CornerstoneToolsDragStartActive', cornerstoneTools.nonTargetTouch.touchDownActivateCallback);
|
$(element).off('CornerstoneToolsDragStartActive', cornerstoneTools.nonTargetTouch.touchDownActivateCallback);
|
||||||
$(element).off('CornerstoneToolsTap', cornerstoneTools.nonTargetTouch.tapCallback);
|
$(element).off('CornerstoneToolsTap', cornerstoneTools.nonTargetTouch.tapCallback);
|
||||||
|
var config = cornerstoneTools.nonTarget.getConfiguration();
|
||||||
|
|
||||||
|
// Set lesion number and lesion name
|
||||||
|
if (measurementData.lesionName === undefined) {
|
||||||
|
config.setLesionNumberCallback(measurementData, touchEventData, doneCallback);
|
||||||
|
}
|
||||||
cornerstone.updateImage(element);
|
cornerstone.updateImage(element);
|
||||||
|
|
||||||
cornerstoneTools.moveNewHandleTouch(touchEventData, measurementData.handles.end, function() {
|
cornerstoneTools.moveNewHandleTouch(touchEventData, measurementData.handles.end, function() {
|
||||||
@ -309,10 +311,8 @@
|
|||||||
cornerstoneTools.removeToolState(element, toolType, measurementData);
|
cornerstoneTools.removeToolState(element, toolType, measurementData);
|
||||||
}
|
}
|
||||||
|
|
||||||
var config = cornerstoneTools.nonTarget.getConfiguration();
|
config.getNonTargetLesionLocationCallback(measurementData, touchEventData, doneCallback);
|
||||||
if (measurementData.text === undefined) {
|
|
||||||
config.getTextCallback(doneChangingTextCallback);
|
|
||||||
}
|
|
||||||
|
|
||||||
$(element).on('CornerstoneToolsTouchDrag', cornerstoneTools.nonTargetTouch.touchMoveCallback);
|
$(element).on('CornerstoneToolsTouchDrag', cornerstoneTools.nonTargetTouch.touchMoveCallback);
|
||||||
$(element).on('CornerstoneToolsDragStartActive', cornerstoneTools.nonTargetTouch.touchDownActivateCallback);
|
$(element).on('CornerstoneToolsDragStartActive', cornerstoneTools.nonTargetTouch.touchDownActivateCallback);
|
||||||
@ -471,8 +471,8 @@
|
|||||||
createNewMeasurement: createNewMeasurement,
|
createNewMeasurement: createNewMeasurement,
|
||||||
onImageRendered: onImageRendered,
|
onImageRendered: onImageRendered,
|
||||||
pointNearTool: pointNearTool,
|
pointNearTool: pointNearTool,
|
||||||
toolType: toolType,
|
toolType: toolType
|
||||||
mouseDoubleClickCallback: doubleClickCallback
|
//mouseDoubleClickCallback: doubleClickCallback
|
||||||
});
|
});
|
||||||
|
|
||||||
cornerstoneTools.nonTarget.setConfiguration(configuration);
|
cornerstoneTools.nonTarget.setConfiguration(configuration);
|
||||||
@ -482,8 +482,8 @@
|
|||||||
createNewMeasurement: createNewMeasurement,
|
createNewMeasurement: createNewMeasurement,
|
||||||
onImageRendered: onImageRendered,
|
onImageRendered: onImageRendered,
|
||||||
pointNearTool: pointNearTool,
|
pointNearTool: pointNearTool,
|
||||||
toolType: toolType,
|
toolType: toolType
|
||||||
pressCallback: doubleClickCallback
|
// pressCallback: doubleClickCallback
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5,8 +5,6 @@
|
|||||||
background: white;
|
background: white;
|
||||||
padding: 10px 20px 10px 20px;
|
padding: 10px 20px 10px 20px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#selectNonTargetLesionLocation, #selectNonTargetLesionLocationResponse {
|
#selectNonTargetLesionLocation, #selectNonTargetLesionLocationResponse {
|
||||||
@ -26,3 +24,9 @@
|
|||||||
.locationOK {
|
.locationOK {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn{
|
||||||
|
background-color: #bbb;
|
||||||
|
border: 1px solid #888;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
<select id="selectNonTargetLesionLocationResponse">
|
<select id="selectNonTargetLesionLocationResponse">
|
||||||
<option value="-1"></option>
|
<option value="-1"></option>
|
||||||
{{ #each locationResponses}}
|
{{ #each locationResponses}}
|
||||||
<option value='{{code}}'>{{text}}</option>
|
<option value='{{code}}'>{{code}} - {{text}}</option>
|
||||||
{{ /each}}
|
{{ /each}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -46,14 +46,14 @@ function getNonTargetLesionLocationCallback(measurementData, eventData, doneCall
|
|||||||
var locationName = measurementManagerDAL.getLocationName(locationUID);
|
var locationName = measurementManagerDAL.getLocationName(locationUID);
|
||||||
selectorLocation.find('option').each(function()
|
selectorLocation.find('option').each(function()
|
||||||
{
|
{
|
||||||
if ($(this).text().trim() === locationName.trim()) {
|
if ($(this).text() === locationName) {
|
||||||
// Select location in locations dropdown list
|
// Select location in locations dropdown list
|
||||||
selectorLocation.find('option').eq($(this).index()).attr("selected", "selected");
|
selectorLocation.find('option').eq($(this).index()).prop("selected", true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
selectorLocation.attr("disabled", "disabled");
|
selectorLocation.prop("disabled", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enable selector location
|
// Enable selector location
|
||||||
@ -159,9 +159,9 @@ LocationResponses = new Meteor.Collection(null);
|
|||||||
|
|
||||||
LocationResponses.insert(
|
LocationResponses.insert(
|
||||||
{
|
{
|
||||||
text: "Complete response",
|
text: "Complete response",
|
||||||
code: "CR",
|
code: "CR",
|
||||||
description: ""
|
description: ""
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
LocationResponses.insert(
|
LocationResponses.insert(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user