mirror of
https://github.com/penpot/penpot.git
synced 2025-03-12 07:41:43 -05:00
🐛 Fix problem with align and flex layout
This commit is contained in:
parent
38fe6e856a
commit
6b225a10b5
1 changed files with 6 additions and 2 deletions
|
@ -899,9 +899,13 @@
|
|||
(align-objects-list objects selected axis))
|
||||
moved-objects (->> moved (group-by :id))
|
||||
ids (keys moved-objects)
|
||||
update-fn (fn [shape] (first (get moved-objects (:id shape))))]
|
||||
update-fn (fn [shape] (first (get moved-objects (:id shape))))
|
||||
undo-id (js/Symbol)]
|
||||
(when (can-align? selected objects)
|
||||
(rx/of (dch/update-shapes ids update-fn {:reg-objects? true})))))))
|
||||
(rx/of (dwu/start-undo-transaction undo-id)
|
||||
(dch/update-shapes ids update-fn {:reg-objects? true})
|
||||
(ptk/data-event :layout/update ids)
|
||||
(dwu/commit-undo-transaction undo-id)))))))
|
||||
|
||||
(defn align-object-to-parent
|
||||
[objects object-id axis]
|
||||
|
|
Loading…
Add table
Reference in a new issue