         (.. current-node -classList (add "highlight-element"))
         (reset! last-node current-node)))))
 
-(defn inspect-element [{:keys [node-clone]}]
+(defn inspect-element [{:keys [node-clone select-file]}]
   (fn [evt]
+    ;TODO: ?? disable all other clicks?
     ;(let [e (.getBrowserEvent evt)]
     ;  (.preventDefault e)
     ;  (.stopPropagation e)
     ;  (.stopImmediatePropagation e))
     (js/console.log @node-clone)
-    (let [{:keys [file line column]} (cljs.reader/read-string (.getAttribute @node-clone "data-untangled-ui"))]
-      (heads-up-event-dispatch
-        #js {:figwheelEvent "file-selected"
-             :fileName file
-             :fileLine (str line)
-             :fileColumn (str column)}))))
+    (select-file (cljs.reader/read-string (.getAttribute @node-clone "data-untangled-ui")))))
 
 (defn toggle-devtools [{:keys [last-node node-clone prev-on-click remove-all-listeners install-listeners]}]
   (fn [e]

             :node-clone (atom #js {})
             :prev-on-click (atom #js {})
             :remove-all-listeners remove-all-listeners
             :install-listeners install-listeners}]
    (remove-all-listeners)
    (add-listener EventType.MOUSEMOVE (highlight-element ctx))
    (add-listener EventType.CLICK (inspect-element ctx))
    (add-and-remove-listener EventType.KEYPRESS (toggle-devtools ctx))))

(defn wrap-render [meta-info {:keys [this class]} body]
  (dom/div #js {:data-untangled-ui meta-info}
    body))

    [om.dom :as dom]
    [goog.object :as gobj]
    [goog.dom :as gdom]
    [goog.events :as gevt])
  (:import
    goog.events.EventType))

