From 784c822fd41dca450f421dad1e0085bd8fb3cdcf Mon Sep 17 00:00:00 2001 From: stockiNail Date: Wed, 18 Sep 2024 13:26:04 +0200 Subject: [PATCH] Update src/helpers/helpers.core.js Co-authored-by: Jacco van den Berg --- src/helpers/helpers.core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/helpers.core.js b/src/helpers/helpers.core.js index 9b1bfbe81..64076832a 100644 --- a/src/helpers/helpers.core.js +++ b/src/helpers/helpers.core.js @@ -51,7 +51,7 @@ export function inPointRange(point, center, radius, hitSize) { * @returns {boolean} */ export function inBoxRange(point, {x, y, x2, y2}, axis, {borderWidth, hitTolerance}) { - const hitSize = borderWidth / 2 + hitTolerance / 2; + const hitSize = (borderWidth + hitTolerance) / 2; const inRangeX = point.x >= x - hitSize - EPSILON && point.x <= x2 + hitSize + EPSILON; const inRangeY = point.y >= y - hitSize - EPSILON && point.y <= y2 + hitSize + EPSILON; if (axis === 'x') {