mirror of
https://github.com/penpot/penpot.git
synced 2025-08-03 01:18:27 +02:00
Add validation for shapes.
This commit is contained in:
parent
3fcd21635e
commit
e07ada5ad4
2 changed files with 4 additions and 4 deletions
|
@ -91,11 +91,10 @@
|
|||
(-apply-update [_ state]
|
||||
(assoc-in state [:workspace :selected] #{}))))
|
||||
|
||||
;; TODO: validate shape
|
||||
|
||||
(defn add-shape
|
||||
"Mark a shape selected for drawing in the canvas."
|
||||
[shape props]
|
||||
(sc/validate! +shape-schema+ shape)
|
||||
(sc/validate! +shape-props-schema+ props)
|
||||
(reify
|
||||
rs/UpdateEvent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue