瀏覽代碼

fix: freedraw non-solid bg hitbox not working (#7193)

David Luzar 1 年之前
父節點
當前提交
f794b0bb90
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/element/collision.ts

+ 3 - 1
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;