0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-15 17:21:17 -05:00

🐛 Fix line break on flex/grid options

This commit is contained in:
alonso.torres 2024-02-08 17:58:14 +01:00 committed by Andrés Moya
parent ed9ee210e4
commit b6be1c2e1a
2 changed files with 10 additions and 10 deletions

View file

@ -1367,9 +1367,6 @@
attr-group (get ctk/sync-attrs attr)]
(and (not= (get origin-shape attr) (get dest-shape attr))
(or (not (touched attr-group)) (not omit-touched?)))
(if (or (= (get origin-shape attr) (get dest-shape attr))
(and (touched attr-group) omit-touched?))
(recur (next attrs)
@ -1380,18 +1377,18 @@
(conj uoperations uoperation)))))))))
(defn- propagate-attrs
"Helper that puts the src-shape attributes (attrs) into tgt-shape but only if
"Helper that puts the origin attributes (attrs) into dest but only if
not touched the group or if omit-touched? flag is true"
[tgt-shape src-shape attrs omit-touched?]
(let [touched (get tgt-shape :touched #{})]
[dest origin attrs omit-touched?]
(let [touched (get dest :touched #{})]
(->> attrs
(reduce
(fn [tgt-shape attr]
(fn [dest attr]
(let [attr-group (get ctk/sync-attrs attr)]
(cond-> tgt-shape
(cond-> dest
(or (not (touched attr-group)) (not omit-touched?))
(assoc attr (get src-shape attr)))))
tgt-shape))))
(assoc attr (get origin attr)))))
dest))))
(defn- update-flex-child-copy-attrs
"Synchronizes the attributes inside the flex-child items (main->copy)"

View file

@ -24,6 +24,9 @@
.layout-options {
width: $s-92;
}
.layout-option {
white-space: nowrap;
}
.remove-layout,
.add-layout {
@extend .button-tertiary;