From 9bf763efb35802e79579152f43977561cacc5d04 Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Mon, 8 Jul 2024 15:19:48 +0200 Subject: [PATCH] Add all action --- .../src/app/main/ui/workspace/tokens/context_menu.cljs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 e7216161b..ebe3e0483 100644 --- a/frontend/src/app/main/ui/workspace/tokens/context_menu.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/context_menu.cljs @@ -220,7 +220,14 @@ (seq (% ids-by-attributes)))] [{:title "All" :selected? all? - :action (when all? #(js/console.log "all"))} + :action #(if all? + (st/emit! (wtc/unapply-token {:token {:id token-id} + :attributes all-attributes + :shape-ids shape-ids})) + (st/emit! (wtc/apply-token {:token {:id token-id} + :attributes all-attributes + :on-update-shape wtc/update-shape-radius + :shape-ids shape-ids})))} {:title "Top Left" :selected? (selected? :r1) :action (when all? #(js/console.log "all"))}