Skip to content

Commit 784c822

Browse files
Update src/helpers/helpers.core.js
Co-authored-by: Jacco van den Berg <[email protected]>
1 parent 765e2e4 commit 784c822

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/helpers/helpers.core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export function inPointRange(point, center, radius, hitSize) {
5151
* @returns {boolean}
5252
*/
5353
export function inBoxRange(point, {x, y, x2, y2}, axis, {borderWidth, hitTolerance}) {
54-
const hitSize = borderWidth / 2 + hitTolerance / 2;
54+
const hitSize = (borderWidth + hitTolerance) / 2;
5555
const inRangeX = point.x >= x - hitSize - EPSILON && point.x <= x2 + hitSize + EPSILON;
5656
const inRangeY = point.y >= y - hitSize - EPSILON && point.y <= y2 + hitSize + EPSILON;
5757
if (axis === 'x') {

0 commit comments

Comments
 (0)