🎉 Add option to save the layouts

This commit is contained in:
alonso.torres 2020-05-18 15:30:40 +02:00 committed by Andrés Moya
parent 8d9e772dca
commit 1d2ae6d5eb
17 changed files with 310 additions and 271 deletions

View file

@ -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)))