mirror of
https://github.com/penpot/penpot.git
synced 2025-02-08 16:18:11 -05:00
🐛 Fix selection of paths without background
This commit is contained in:
parent
10324b13ca
commit
b5a9e28d0a
2 changed files with 4 additions and 3 deletions
|
@ -183,7 +183,7 @@
|
||||||
(mf/deps page-id)
|
(mf/deps page-id)
|
||||||
(fn [point]
|
(fn [point]
|
||||||
(let [zoom (mf/ref-val zoom-ref)
|
(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)
|
(if (mf/ref-val hover-disabled-ref)
|
||||||
(rx/of nil)
|
(rx/of nil)
|
||||||
|
|
|
@ -185,8 +185,9 @@
|
||||||
(fn [shape]
|
(fn [shape]
|
||||||
(let [padding (->> (:strokes shape)
|
(let [padding (->> (:strokes shape)
|
||||||
(map :stroke-width)
|
(map :stroke-width)
|
||||||
(reduce d/max 0))
|
(reduce d/max 5))
|
||||||
rect (grc/center->rect rect padding padding)]
|
center (grc/rect->center rect)
|
||||||
|
rect (grc/center->rect center padding)]
|
||||||
(gsh/overlaps-path? shape rect false)))
|
(gsh/overlaps-path? shape rect false)))
|
||||||
|
|
||||||
overlaps?
|
overlaps?
|
||||||
|
|
Loading…
Add table
Reference in a new issue