0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-22 22:49:01 -05:00

🐛 Fix selection of paths without background

This commit is contained in:
alonso.torres 2023-12-04 12:03:36 +01:00 committed by Andrey Antukh
parent 10324b13ca
commit b5a9e28d0a
2 changed files with 4 additions and 3 deletions

View file

@ -183,7 +183,7 @@
(mf/deps page-id)
(fn [point]
(let [zoom (mf/ref-val zoom-ref)
rect (grc/center->rect point (/ 5 zoom) (/ 5 zoom))]
rect (grc/center->rect point (/ 5 zoom))]
(if (mf/ref-val hover-disabled-ref)
(rx/of nil)

View file

@ -185,8 +185,9 @@
(fn [shape]
(let [padding (->> (:strokes shape)
(map :stroke-width)
(reduce d/max 0))
rect (grc/center->rect rect padding padding)]
(reduce d/max 5))
center (grc/rect->center rect)
rect (grc/center->rect center padding)]
(gsh/overlaps-path? shape rect false)))
overlaps?