mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
🎉 Add option to save the layouts
This commit is contained in:
parent
8d9e772dca
commit
1d2ae6d5eb
17 changed files with 310 additions and 271 deletions
|
@ -74,11 +74,12 @@
|
|||
(case type
|
||||
:square (let [{:keys [x y width height]} shape
|
||||
size (-> params :size)]
|
||||
(if (= coord :x)
|
||||
(mapcat #(vector (gpt/point (+ x %) y)
|
||||
(gpt/point (+ x %) (+ y height))) (range size width size))
|
||||
(mapcat #(vector (gpt/point x (+ y %))
|
||||
(gpt/point (+ x width) (+ y %))) (range size height size))))
|
||||
(when (> size 0)
|
||||
(if (= coord :x)
|
||||
(mapcat #(vector (gpt/point (+ x %) y)
|
||||
(gpt/point (+ x %) (+ y height))) (range size width size))
|
||||
(mapcat #(vector (gpt/point x (+ y %))
|
||||
(gpt/point (+ x width) (+ y %))) (range size height size)))))
|
||||
:column (when (= coord :x) (->> (layout-rects shape layout)
|
||||
(mapcat layout-rect-points)))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue