mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 08:20:45 -05:00
Add update-shape event just for shape inplace update.
This commit is contained in:
parent
d976afda30
commit
89a21d7abb
1 changed files with 8 additions and 0 deletions
|
@ -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…
Reference in a new issue