 ;; define your app data so that it doesn't get over-written on reload
 
 (defonce mouse-down (atom false))
-(defonce strokes [])
+(defonce strokes (atom []))
+(defonce curr-stroke (atom "["))
 
 (defn handle-mouseup [evt]
+  (swap! strokes (fn [arr] (conj arr (str @curr-stroke "]"))))
+  (swap! curr-stroke (fn [_] "["))
   (swap! mouse-down (fn [_] false)))
 
 (defn handle-mousedown [evt]

  ;; optionally touch your app-state to force rerendering depending on
  ;; your application
  ;; (swap! app-state update-in [:__figwheel_counter] inc)
  (start))

(set! (.-onload js/window) start)

(ns handwrite_strokes.core
  (:require [goog.dom :as dom]
            [goog.graphics :as graphics]
            [clojure.string :as string]
            [ajax.core :refer [GET POST]]))

(enable-console-print!)

