 (defn projectors-for-state [state]
   (if (= (:projection state) :fisheye) fisheye-projectors zoom-out-projectors))
 
+;; Button syncing
+
+(defn center-detail-button! [detail-button]
+  (let [width (-> detail-button .node .-offsetWidth)]
+    (.style detail-button "margin-left" (str (/ width -2) "px"))))
+
+(defn sync-detail-button! [state]
+  (let [{:keys [detail-button selected-node]} state]
+    (.classed detail-button "hidden" (nil? selected-node))
+    (when-not (nil? selected-node)
+      (.text detail-button (str "View \"" (:title selected-node) "\""))
+      (center-detail-button! detail-button))))
+
 ;; D3 magic
-
-(defn add-tap-listener [elem callback]
-  (let [manager (js/Hammer.Manager. elem)]
-    (.add manager (js/Hammer.Tap.))
-    (.on manager "tap" callback)))
 
 (defn sync-graph! [state & {:keys [animate?]}]
   (let [{:keys [svg

    (add-background! svg)
    svg))

(defn center-detail-button! [detail-button]
  (let [width (-> detail-button .node .-offsetWidth)]
    (.style detail-button "margin-left" (str (/ width -2) "px"))))

(defn prevent-focus-on-detail-button! [detail-button]
  (.on detail-button "mouseup" #(-> detail-button .node .blur)))

(defn setup-detail-button! [detail-button]
  (center-detail-button! detail-button)
  (prevent-focus-on-detail-button! detail-button))

;; Geometry


          (.attr "font-weight" (fn [node]
                                 (if (identical? node selected-node) "bold" "normal")))
          (.text #(:title %))))
    (when animate?
      (.onNext animation-subject :animation-start)
      (js/setTimeout
