0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 00:10:11 -05:00

Add update-shape event just for shape inplace update.

This commit is contained in:
Andrey Antukh 2016-04-09 23:14:21 +03:00
parent d976afda30
commit 89a21d7abb
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -94,6 +94,14 @@
(let [shape (get-in state [:shapes-by-id id])]
(stsh/dissoc-shape state shape)))))
(defn update-shape
"Just updates in place the shape."
[{:keys [id] :as shape}]
(reify
rs/UpdateEvent
(-apply-update [_ state]
(update-in state [:shapes-by-id id] merge shape))))
(defn move-shape
"Mark a shape selected for drawing in the canvas."
[sid delta]