 (def run-world-hover
   (atom nil))
 
+; -------------------------------------------------------------------
+
 (defn render-world [app owner]
   (apply dom/ul nil
          (map (fn [[k v]] (dom/li nil (str k ":" v))) app)))

(defn render-snapshot [app owner ss-ts]
  (render-world (get-in app [:snapshots ss-ts] nil) owner))

(defn event-focus [snapshot-ts event-ts]
  (when-let [ss (get-in @run-history [:snapshots snapshot-ts])]
    (reset! run-world-hover ss)))

(defn event-blur [snapshot-ts event-ts]
  (reset! run-world-hover nil))

(defn render-events [app owner]

             (if (= kind :snapshot)
               [ts
                (conj res
                      (dom/li #js {:onMouseEnter #(on-event-focus ts nil)
                                   :onMouseLeave #(on-event-blur ts nil)}
                              (str ts)
                              (render-snapshot app owner ts)))]
               [(or last-snapshot-ts ts)
                (conj res
                      (dom/li #js {:onMouseEnter
                                   #(on-event-focus last-snapshot-ts ts)
                                   :onMouseLeave
                                   #(on-event-blur last-snapshot-ts ts)}
                              (str ts (pr-str args))))]))
           [nil []]
           (:events app)))))
