Add all action

This commit is contained in:
Florian Schroedl
2024-07-08 15:19:48 +02:00
parent 77fe4d556f
commit 9bf763efb3

View File

@@ -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"))}