Преглед на файлове

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;