     (.restore context)))
 
 (defn new-line-action []
-  (->LineAction [] {:strokeStyle (get-in @app-state [:tools :strokeStyle])
-                    :lineCap "round"
-                    :lineJoin "round"
-                    :lineWidth (get-in @app-state [:tools :width])}))
+  (->LineAction [] (merge {:lineCap "round"
+                           :lineJoin "round"} (:tools @app-state))))
 (def line-tool
   (reify
     ITool


(deref app-state)

(swap! app-state update-in [:tools] assoc :width 3)

)

    (render [_]
      (dom/div nil
               (apply dom/select
                      #js {:value (:lineWidth tools)
                           :onChange (fn [e]
                                       (let [newval (.-value (.-currentTarget e))]
                                         (om/update! tools [:lineWidth] newval)))}
                      (map (fn [i]
                             (dom/option #js {:value i} i))
                           (range 1 11)))
