Call showLesionDialog event from lesionTool.js
This commit is contained in:
parent
e2000480d3
commit
edc9ecf69c
@ -15,13 +15,26 @@ var cornerstoneTools = (function ($, cornerstone, cornerstoneMath, cornerstoneTo
|
||||
var element = mouseEventData.element;
|
||||
var lesionCounter = "";
|
||||
|
||||
//setting name of lesion
|
||||
$(element).on("LesionNameSet", function(e,counter){
|
||||
lesionCounter = counter;
|
||||
// Subscribe CornerstoneMouseup event, when mouse is up, call lesionDialog
|
||||
$(element).on("CornerstoneToolsMouseUp", function (e) {
|
||||
|
||||
// Unsubscribe CornerstoneToolsMouseUp event
|
||||
$(element).off("CornerstoneToolsMouseUp");
|
||||
|
||||
// Show LesionDialog
|
||||
$(document).trigger("ShowLesionDialog", e);
|
||||
|
||||
});
|
||||
|
||||
//Listens LesionToolModified event and calls measurementModified function when lesion measurement is changed or updated.
|
||||
// Set Lesion Name
|
||||
$(element).on("LesionNameSet", function(e,lesionName){
|
||||
lesionCounter = lesionName;
|
||||
});
|
||||
|
||||
// Subscribe LesionToolModified and calls measurementModified function when lesion measurement is changed or updated.
|
||||
$(element).on("LesionToolModified", measurementModified);
|
||||
|
||||
// Subscribe LesionMeasurementCreated
|
||||
$(element).trigger("LesionMeasurementCreated");
|
||||
|
||||
// create the measurement data for this tool with the end handle activated
|
||||
|
||||
@ -1,6 +1,22 @@
|
||||
Template.lesionDialog.onRendered(function () {
|
||||
// Show Lesion Dialog
|
||||
$(document).on("ShowLesionDialog", function (e, eventData) {
|
||||
var dialogPointsOnPage = eventData.currentPoints.page;
|
||||
$("#modal-dialog-container").css({
|
||||
"top": dialogPointsOnPage.y,
|
||||
"left": dialogPointsOnPage.x
|
||||
});
|
||||
|
||||
$("#lesionDialog").modal("show");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Listen lesionMeaurementCreated Event and when this event is triggered, show lesionLocationDialog Box
|
||||
/*
|
||||
$(document).on("lesionMeasurementCreated",function(e,eventCaller,data){
|
||||
console.log("Lesion measurement xreated");
|
||||
var element = data.element;
|
||||
var tabId = data.tabId;
|
||||
var viewports = $("#content"+tabId).find(".imageViewerViewport");
|
||||
@ -27,5 +43,4 @@ Template.lesionDialog.onRendered(function () {
|
||||
data.rowIndex = returnVal.rowIndex;
|
||||
$(document).trigger("addLesionToExistedRow",data);
|
||||
}
|
||||
});
|
||||
});
|
||||
});*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user