mirror of
https://github.com/penpot/penpot.git
synced 2026-08-06 12:58:55 +00:00
Add update-shape event just for shape inplace update.
This commit is contained in:
parent
d976afda30
commit
89a21d7abb
@ -94,6 +94,14 @@
|
|||||||
(let [shape (get-in state [:shapes-by-id id])]
|
(let [shape (get-in state [:shapes-by-id id])]
|
||||||
(stsh/dissoc-shape state shape)))))
|
(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
|
(defn move-shape
|
||||||
"Mark a shape selected for drawing in the canvas."
|
"Mark a shape selected for drawing in the canvas."
|
||||||
[sid delta]
|
[sid delta]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user