mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
🐛 Fix problem with snap points
This commit is contained in:
parent
e474accb61
commit
188f5c6167
1 changed files with 10 additions and 9 deletions
|
@ -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]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue