Simplify has-point? impl for non-path shapes

This commit is contained in:
Andrey Antukh 2023-08-25 10:21:48 +02:00 committed by Andrés Moya
parent 266e1c7142
commit 64accaa842
3 changed files with 40 additions and 7 deletions

View file

@ -318,8 +318,7 @@
;; We need to reverse the children because if two children
;; overlap we want to select the one that's over (and it's
;; in the later vector position
selected (->> children
reverse
selected (->> (reverse children)
(d/seek #(gsh/has-point? % position)))]
(when selected
(rx/of (select-shape (:id selected))))))))