mirror of
https://github.com/penpot/penpot.git
synced 2025-07-30 15:48:32 +02:00
✨ Changes to the flex UI
This commit is contained in:
parent
f2fe1dd6f8
commit
de6cba8c0b
7 changed files with 127 additions and 54 deletions
|
@ -15,13 +15,9 @@
|
|||
(def conjv (fnil conj []))
|
||||
|
||||
(defn layout-bounds
|
||||
[{:keys [layout-padding layout-padding-type] :as shape} shape-bounds]
|
||||
[{:keys [layout-padding] :as shape} shape-bounds]
|
||||
(let [;; Add padding to the bounds
|
||||
{pad-top :p1 pad-right :p2 pad-bottom :p3 pad-left :p4} layout-padding
|
||||
[pad-top pad-right pad-bottom pad-left]
|
||||
(if (= layout-padding-type :multiple)
|
||||
[pad-top pad-right pad-bottom pad-left]
|
||||
[pad-top pad-top pad-top pad-top])]
|
||||
{pad-top :p1 pad-right :p2 pad-bottom :p3 pad-left :p4} layout-padding]
|
||||
(gpo/pad-points shape-bounds pad-top pad-right pad-bottom pad-left)))
|
||||
|
||||
(defn init-layout-lines
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue