From f794b0bb90d3b1b83ac2676dc0da7081b7612310 Mon Sep 17 00:00:00 2001 From: David Luzar Date: Wed, 25 Oct 2023 17:21:01 +0200 Subject: [PATCH] fix: freedraw non-solid bg hitbox not working (#7193) --- src/element/collision.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/element/collision.ts b/src/element/collision.ts index 103d3fd9..b1fdea60 100644 --- a/src/element/collision.ts +++ b/src/element/collision.ts @@ -494,7 +494,9 @@ const hitTestFreeDrawElement = ( // for filled freedraw shapes, support // selecting from inside if (shape && shape.sets.length) { - return hitTestCurveInside(shape, x, y, "round"); + return element.fillStyle === "solid" + ? hitTestCurveInside(shape, x, y, "round") + : hitTestRoughShape(shape, x, y, threshold); } return false;