 
 (defn end-edit [ text state ]
   (when (parse-query-window text)
+    (put! time-event-channel {:msg-type :query-window :window-spec text})
     (reset! query-window text)))
 
 (defn input-field [ initial-text text-valid? on-enter ]

  (:require [reagent.core :as reagent]
            [ajax.core :as ajax]
            [cljs.reader :as reader]
            [cljs.core.async :refer [put! close! chan <! dropping-buffer alts! pipeline]]
            [cljs-time.core :as time]
            [cljs-time.coerce :as time-coerce]
            [metlog-client.tsplot :as tsplot]))

      (fn [ this old-argv ]
        (let [canvas (.-firstChild @dom-node)
              ctx (.getContext canvas "2d")
              range (range-ending-at-current-window (time/now))]
          (tsplot/draw ctx (.-clientWidth canvas) (.-clientHeight canvas)
                       (:series-data @series-state)
                       (:begin-t range)
