Bug fixing: LT-22: Move biDirectional Tool text
This commit is contained in:
parent
d5f607f141
commit
ed4fdba54e
@ -414,6 +414,10 @@ var cornerstoneTools = (function($, cornerstone, cornerstoneMath, cornerstoneToo
|
|||||||
|
|
||||||
function moveHandle(mouseEventData, toolType, data, handle, doneMovingCallback, preventHandleOutsideImage) {
|
function moveHandle(mouseEventData, toolType, data, handle, doneMovingCallback, preventHandleOutsideImage) {
|
||||||
var element = mouseEventData.element;
|
var element = mouseEventData.element;
|
||||||
|
var distanceFromTool = {
|
||||||
|
x: handle.x - mouseEventData.currentPoints.image.x,
|
||||||
|
y: handle.y - mouseEventData.currentPoints.image.y
|
||||||
|
};
|
||||||
|
|
||||||
function mouseDragCallback(e, eventData) {
|
function mouseDragCallback(e, eventData) {
|
||||||
handle.active = true;
|
handle.active = true;
|
||||||
@ -495,6 +499,11 @@ var cornerstoneTools = (function($, cornerstone, cornerstoneMath, cornerstoneToo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
handle.x = eventData.currentPoints.image.x + distanceFromTool.x;
|
||||||
|
handle.y = eventData.currentPoints.image.y + distanceFromTool.y;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (preventHandleOutsideImage) {
|
if (preventHandleOutsideImage) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user