diff --git a/frontend/src/app/main/ui/workspace/tokens/changes.cljs b/frontend/src/app/main/ui/workspace/tokens/changes.cljs index 03901f54c2..915216bef9 100644 --- a/frontend/src/app/main/ui/workspace/tokens/changes.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/changes.cljs @@ -158,8 +158,11 @@ (dwsl/update-layout [shape-id] layout-update))))))) (defn update-shape-position [value shape-ids attributes] - (doseq [shape-id shape-ids] - (st/emit! (dwt/update-position shape-id {(first attributes) value})))) + (ptk/reify ::update-shape-position + ptk/WatchEvent + (watch [_ _ _] + (rx/concat + (map #(dwt/update-position % (zipmap attributes (repeat value))) shape-ids))))) (defn update-layout-sizing-limits [value shape-ids attributes] (ptk/reify ::update-layout-sizing-limits diff --git a/frontend/src/app/main/ui/workspace/tokens/context_menu.cljs b/frontend/src/app/main/ui/workspace/tokens/context_menu.cljs index 1afbcad9d7..34a6df684f 100644 --- a/frontend/src/app/main/ui/workspace/tokens/context_menu.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/context_menu.cljs @@ -198,8 +198,8 @@ {:title "Border Radius" :submenu :border-radius}] (stroke-width context-data) [:separator] - (generic-attribute-actions #{:x} "X" context-data) - (generic-attribute-actions #{:y} "Y" context-data)))})) + (generic-attribute-actions #{:x} "X" (assoc context-data :on-update-shape wtch/update-shape-position)) + (generic-attribute-actions #{:y} "Y" (assoc context-data :on-update-shape wtch/update-shape-position))))})) (defn default-actions [{:keys [token]}] (let [{:keys [modal]} (wtty/get-token-properties token)]