                        (when (< distance-sq @closest-distance-sq)
                          (reset! closest-distance-sq distance-sq)
                          (reset! closest-node node)))))))
-    {:node @closest-node
+    {:pos pos
+     :node @closest-node
      :distance (js/Math.sqrt @closest-distance-sq)}))
 
 (defn zoom-and-select-on-tap! [manager current-state animation-observable]

        svg-y (.-top svg-box)]
    (v/create (- center-x svg-x) (- center-y svg-y))))

;; Gestures - tap on node

(defn closest-node
  "Returns the node closest to the given position and its distance"
  [state pos]
  (let [closest-node (atom nil)
        closest-distance-sq (atom js/Infinity)

            (.map #(closest-node @current-state %))
            (.partition #(< (:distance %) (/ hitbox-size 2))))
        node-taps (aget partitions 0)
        space-taps (.map (aget partitions 1) #(:pos %))]
        (.subscribe node-taps
                    (fn [{:keys [node]}]
                        (select-and-zoom-to-node! current-state node)))
