   (doseq [action (om/value actions)]
     (-draw action context)))
 
+(defn start-drawing [canvas]
+  (-> canvas
+    (update-in [:actions] (partial -start line-tool))
+    (assoc :drawing? true)))
+
+(defn stop-drawing [canvas]
+  (-> canvas
+    (update-in [:actions] (partial -end line-tool))
+    (assoc :drawing? false)))
+
 (defn canvas [data owner]
   (reify
     om/IDidMount

(.bind js/Mousetrap #js ["u" "ctrl+z" "command+z"] #(undo/do-undo app-state))
(.bind js/Mousetrap #js ["ctrl+r"] #(undo/do-redo app-state))

(comment

(swap! app-state update-in [:canvas :actions 0 :props] assoc :strokeStyle "#999999")

           {:onSelectStart (fn [_])
            :onMouseDown (fn [e]
                           (.preventDefault e)
                           (om/transact! data [] start-drawing))
            :onMouseUp (fn [_]
                         (om/transact! data [] stop-drawing :add-to-undo))
            :onMouseMove (fn [e]
                           (when (:drawing? @data)
                             (let [dom (om/get-node owner)
