0
Fork 0
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:
alonso.torres 2023-01-26 13:44:40 +01:00
parent 38fe6e856a
commit 6b225a10b5

View file

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