Add validation for shapes.

This commit is contained in:
Andrey Antukh 2015-12-29 23:40:01 +02:00
parent 3fcd21635e
commit e07ada5ad4
2 changed files with 4 additions and 4 deletions

View file

@ -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