diff --git a/frontend/src/app/main/data/workspace.cljs b/frontend/src/app/main/data/workspace.cljs index a6cc23087..9dde3bd30 100644 --- a/frontend/src/app/main/data/workspace.cljs +++ b/frontend/src/app/main/data/workspace.cljs @@ -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]