LT-40: Recalculating text call-outs position when creating measurments without dragging
This commit is contained in:
1 parent
8df077f046
commit
888c337f84
4 files changed
+119
-121
No files matched your search
@@ -38,6 +38,8 @@ import { toolManager } from 'meteor/ohif:viewerbase';
|
||||
return;
|
||||
}
|
||||
|
||||
delete measurementData.isCreating;
|
||||
|
||||
OHIF.ui.showFormDialog('dialogNonTargetMeasurement', {
|
||||
position: getPosition(eventData),
|
||||
title: 'Select Lesion Location',
|
||||
@@ -142,6 +144,7 @@ import { toolManager } from 'meteor/ohif:viewerbase';
|
||||
|
||||
// create the measurement data for this tool with the end handle activated
|
||||
var measurementData = {
|
||||
isCreating: true,
|
||||
visible: true,
|
||||
active: true,
|
||||
handles: {
|
||||
@@ -178,8 +181,6 @@ import { toolManager } from 'meteor/ohif:viewerbase';
|
||||
toolType: 'nonTarget'
|
||||
};
|
||||
|
||||
OHIF.cornerstone.repositionTextBoxWhileDragging(mouseEventData, measurementData);
|
||||
|
||||
return measurementData;
|
||||
}
|
||||
///////// END ACTIVE TOOL ///////
|
||||
@@ -255,6 +256,8 @@ import { toolManager } from 'meteor/ohif:viewerbase';
|
||||
var boundingBox = cornerstoneTools.drawTextBox(context, 'Non-Target ' + data.measurementNumber, canvasTextLocation.x, canvasTextLocation.y, color);
|
||||
data.handles.textBox.boundingBox = boundingBox;
|
||||
|
||||
OHIF.cornerstone.repositionTextBox(eventData, data);
|
||||
|
||||
// Draw linked line as dashed
|
||||
var link = {
|
||||
start: {},
|
||||
|
||||
Reference in new issue
Block a user