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 element = mouseEventData.element;
|
||||||
var lesionCounter = "";
|
var lesionCounter = "";
|
||||||
|
|
||||||
//setting name of lesion
|
// Subscribe CornerstoneMouseup event, when mouse is up, call lesionDialog
|
||||||
$(element).on("LesionNameSet", function(e,counter){
|
$(element).on("CornerstoneToolsMouseUp", function (e) {
|
||||||
lesionCounter = counter;
|
|
||||||
|
// 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);
|
$(element).on("LesionToolModified", measurementModified);
|
||||||
|
|
||||||
|
// Subscribe LesionMeasurementCreated
|
||||||
$(element).trigger("LesionMeasurementCreated");
|
$(element).trigger("LesionMeasurementCreated");
|
||||||
|
|
||||||
// create the measurement data for this tool with the end handle activated
|
// create the measurement data for this tool with the end handle activated
|
||||||
|
|||||||
@ -1,6 +1,22 @@
|
|||||||
Template.lesionDialog.onRendered(function () {
|
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
|
// Listen lesionMeaurementCreated Event and when this event is triggered, show lesionLocationDialog Box
|
||||||
|
/*
|
||||||
$(document).on("lesionMeasurementCreated",function(e,eventCaller,data){
|
$(document).on("lesionMeasurementCreated",function(e,eventCaller,data){
|
||||||
|
console.log("Lesion measurement xreated");
|
||||||
var element = data.element;
|
var element = data.element;
|
||||||
var tabId = data.tabId;
|
var tabId = data.tabId;
|
||||||
var viewports = $("#content"+tabId).find(".imageViewerViewport");
|
var viewports = $("#content"+tabId).find(".imageViewerViewport");
|
||||||
@ -27,5 +43,4 @@ Template.lesionDialog.onRendered(function () {
|
|||||||
data.rowIndex = returnVal.rowIndex;
|
data.rowIndex = returnVal.rowIndex;
|
||||||
$(document).trigger("addLesionToExistedRow",data);
|
$(document).trigger("addLesionToExistedRow",data);
|
||||||
}
|
}
|
||||||
});
|
});*/
|
||||||
});
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user