🐛 Fix problem with snap points

This commit is contained in:
alonso.torres 2024-01-31 13:05:02 +01:00
parent e474accb61
commit 188f5c6167

View file

@ -15,15 +15,16 @@
(defn rect->snap-points (defn rect->snap-points
[rect] [rect]
(let [x (dm/get-prop rect :x) (when (some? rect)
y (dm/get-prop rect :y) (let [x (dm/get-prop rect :x)
w (dm/get-prop rect :width) y (dm/get-prop rect :y)
h (dm/get-prop rect :height)] w (dm/get-prop rect :width)
#{(gpt/point x y) h (dm/get-prop rect :height)]
(gpt/point (+ x w) y) #{(gpt/point x y)
(gpt/point (+ x w) (+ y h)) (gpt/point (+ x w) y)
(gpt/point x (+ y h)) (gpt/point (+ x w) (+ y h))
(grc/rect->center rect)})) (gpt/point x (+ y h))
(grc/rect->center rect)})))
(defn- frame->snap-points (defn- frame->snap-points
[frame] [frame]