mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 10:38:13 -05:00
Reimplement deselect-all event.
This commit is contained in:
parent
4b6ad74f6b
commit
f4ba1f4fdb
1 changed files with 10 additions and 3 deletions
|
@ -301,9 +301,16 @@
|
|||
"Mark a shape selected for drawing in the canvas."
|
||||
[]
|
||||
(reify
|
||||
rs/UpdateEvent
|
||||
(-apply-update [_ state]
|
||||
(assoc-in state [:workspace :selected] #{}))))
|
||||
rs/WatchEvent
|
||||
(-apply-watch [_ state]
|
||||
(let [selected (get-in state [:workspace :selected])
|
||||
mevent (rs/swap-state #(assoc-in state [:workspace :selected] #{}))]
|
||||
(->> (map #(get-in state [:shapes-by-id %]) selected)
|
||||
(rx/from-coll)
|
||||
(rx/filter :group)
|
||||
(rx/map :group)
|
||||
(rx/map rebuild-group-size)
|
||||
(rx/merge (rx/just mevent)))))))
|
||||
|
||||
(defn copy-selected
|
||||
"Copy the selected shapes."
|
||||
|
|
Loading…
Add table
Reference in a new issue