mirror of
https://github.com/penpot/penpot.git
synced 2025-03-28 15:41:25 -05:00
🐛 Fix problem with layout child properties
This commit is contained in:
parent
4fb1247045
commit
2942f28880
2 changed files with 16 additions and 15 deletions
|
@ -94,7 +94,8 @@
|
|||
:layout-item-max-w :layout-item-max-w
|
||||
:layout-item-min-w :layout-item-min-w
|
||||
:layout-item-absolute :layout-item-absolute
|
||||
:layout-item-z-index :layout-item-z-index})
|
||||
:layout-item-z-index :layout-item-z-index
|
||||
:layout-item-align-self :layout-item-align-self})
|
||||
|
||||
(def swap-keep-attrs
|
||||
#{:layout-item-margin
|
||||
|
@ -106,7 +107,8 @@
|
|||
:layout-item-max-w
|
||||
:layout-item-min-w
|
||||
:layout-item-absolute
|
||||
:layout-item-z-index})
|
||||
:layout-item-z-index
|
||||
:layout-item-align-self})
|
||||
|
||||
(defn instance-root?
|
||||
"Check if this shape is the head of a top instance."
|
||||
|
|
|
@ -1445,19 +1445,18 @@
|
|||
(defn- update-flex-child-copy-attrs
|
||||
"Synchronizes the attributes inside the flex-child items (main->copy)"
|
||||
[changes _shape-main shape-copy main-container main-component copy-container omit-touched?]
|
||||
(let [do-changes
|
||||
(fn [cc]
|
||||
(-> cc
|
||||
(pcb/with-container copy-container)
|
||||
(pcb/with-objects (:objects copy-container))
|
||||
(pcb/update-shapes
|
||||
(:shapes shape-copy)
|
||||
(fn [child-copy]
|
||||
(let [child-main (ctf/get-ref-shape main-container main-component child-copy)]
|
||||
(-> child-copy
|
||||
(propagate-attrs child-main ctk/swap-keep-attrs omit-touched?))))
|
||||
{:ignore-touched true})))]
|
||||
(pcb/concat-changes changes (do-changes (pcb/empty-changes)))))
|
||||
(let [new-changes
|
||||
(-> (pcb/empty-changes)
|
||||
(pcb/with-container copy-container)
|
||||
(pcb/with-objects (:objects copy-container))
|
||||
(pcb/update-shapes
|
||||
(:shapes shape-copy)
|
||||
(fn [child-copy]
|
||||
(let [child-main (ctf/get-ref-shape main-container main-component child-copy)]
|
||||
(-> child-copy
|
||||
(propagate-attrs child-main ctk/swap-keep-attrs omit-touched?))))
|
||||
{:ignore-touched true}))]
|
||||
(pcb/concat-changes changes new-changes)))
|
||||
|
||||
(defn- update-flex-child-main-attrs
|
||||
"Synchronizes the attributes inside the flex-child items (copy->main)"
|
||||
|
|
Loading…
Add table
Reference in a new issue