mirror of
https://github.com/penpot/penpot.git
synced 2025-06-14 15:01:37 +02:00
♻️ Adds new properties to shapes
This commit is contained in:
parent
b5a6d9981d
commit
e06d8e754f
20 changed files with 288 additions and 136 deletions
|
@ -26,9 +26,8 @@
|
|||
|
||||
(defn shape-snap-points
|
||||
[shape]
|
||||
(let [modified-path (gsh/transform-apply-modifiers shape)
|
||||
shape-center (gsh/center modified-path)]
|
||||
(let [shape (gsh/transform-shape shape)
|
||||
shape-center (gsh/center shape)]
|
||||
(case (:type shape)
|
||||
:frame (-> modified-path gsh/shape->rect-shape frame-snap-points)
|
||||
(:path :curve) (into #{shape-center} (-> modified-path gsh/shape->rect-shape :segments))
|
||||
(into #{shape-center} (-> modified-path :segments)))))
|
||||
:frame (-> shape gsh/shape->rect-shape frame-snap-points)
|
||||
(into #{shape-center} (-> shape :points)))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue