From b96a30c19293b145537ba517514e329ef1bd55c4 Mon Sep 17 00:00:00 2001 From: Paul Elliott Date: Fri, 15 Sep 2023 17:33:06 -0400 Subject: [PATCH] refactor(pointState): use ANNOTATION_TOOL_HANDLE_RADIUS everywhere --- src/components/tools/BoundingRectangle.vue | 3 ++- src/components/tools/polygon/PolygonSVG2D.vue | 6 +++--- src/vtk/ToolWidgetUtils/pointState.js | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/tools/BoundingRectangle.vue b/src/components/tools/BoundingRectangle.vue index ac53f72d0..65d786a5e 100644 --- a/src/components/tools/BoundingRectangle.vue +++ b/src/components/tools/BoundingRectangle.vue @@ -45,7 +45,8 @@ const updateRectangle = () => { }); const [x, y] = vtkBoundingBox.getMinPoint(screenBounds); const [maxX, maxY] = vtkBoundingBox.getMaxPoint(screenBounds); - const handleRadius = ANNOTATION_TOOL_HANDLE_RADIUS / devicePixelRatio; + // Plus 2 to account for the stroke width + const handleRadius = (ANNOTATION_TOOL_HANDLE_RADIUS + 2) / devicePixelRatio; const handleDiameter = 2 * handleRadius; rectangle.value = { x: x - handleRadius, diff --git a/src/components/tools/polygon/PolygonSVG2D.vue b/src/components/tools/polygon/PolygonSVG2D.vue index 0b80ed199..b2625321b 100644 --- a/src/components/tools/polygon/PolygonSVG2D.vue +++ b/src/components/tools/polygon/PolygonSVG2D.vue @@ -23,7 +23,7 @@