 (defn viewport-render
   []
   (let [workspace (rum/react wb/workspace-state)
+        drawing? (:drawing workspace)
         zoom 1]
     (html
-     [:svg#viewport
-      {:width wb/viewport-height
-       :height wb/viewport-width}
-      [:g.zoom
-       {:transform (str "scale(" zoom ", " zoom ")")}
+     [:svg.viewport {:width wb/viewport-height
+                     :height wb/viewport-width
+                     :class (when drawing? "drawing")}
+      [:g.zoom {:transform (str "scale(" zoom ", " zoom ")")}
        (wc/canvas)
-       (grid (:grid-enabled workspace false) zoom)]])))
+       (grid zoom)]])))
 
 (def viewport
   (util/component

(def ^:static grid-color "#cccccc")

(defn grid-render
  [own enabled? zoom]
  (letfn [(vertical-line [position value padding]
            (let [ticks-mod (/ 100 zoom)
                  step-size (/ 10 zoom)]

  (util/component
   {:render grid-render
    :name "grid"
    :mixins [mx/static rum/reactive]}))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Viewport
