🚧 More work on data and forms validation.

This commit is contained in:
Andrey Antukh 2019-09-09 12:34:31 +02:00
parent 2477b289e2
commit a009961a58
15 changed files with 464 additions and 314 deletions

View file

@ -41,14 +41,12 @@
(watch [_ state stream]
(let [pid (get-in state [:workspace :current])
selected (get-in state [:workspace pid :selected])]
(prn "start-move-selected" selected)
(rx/from-coll (map start-move selected))))))
(defn on-mouse-down
[event {:keys [id type] :as shape} selected]
(let [selected? (contains? selected id)
drawing? @refs/selected-drawing-tool]
(prn "on-mouse-down" id type selected? (= type :canvas))
(when-not (:blocked shape)
(cond
drawing?

View file

@ -29,7 +29,6 @@
(common/on-mouse-down event shape selected))
(on-double-click [event]
(when selected?
(prn "path-component$on-double-click")
(st/emit! (dw/start-edition-mode (:id shape)))))]
[:g.shape {:class (when selected? "selected")
:on-double-click on-double-click