                          (math-vec (- (.-x e1-center) (.-x e2-center))
                                    (- (.-y e1-center) (.-y e2-center)))))))))
 
-(defn move-camera-on-pan! [manager current-state]
-  (.subscribe
-    (pan-deltas-observable manager (:svg @current-state))
-    (partial move-camera! current-state)))
+(defn move-camera-on-pan! [manager current-state animation-observable]
+  (-> (pan-deltas-observable manager (:svg @current-state))
+      (suppress-while-animating animation-observable)
+      (.subscribe (partial move-camera! current-state))))
 
 ;; Gestures - swipe
 

(defn move-camera! [current-state d]
  (update-state! current-state :camera-pos add-vec d))

(defn set-projection! [current-state projection]
  (swap! current-state assoc :projection projection)
  (sync-graph! @current-state :animate true))

;; Layout


        height (.-clientHeight element)
        svg (setup-svg! selector width height)
        current-state (atom (initial-state svg width height))
        gesture-manager (hammer-manager svg)
        [animation-observable
         animation-signaller] (animation-observable-and-signaller)]
    (sync-graph! @current-state)
    (load-graph "miserables.json"
                (fn [graph]
                  (let [{:keys [nodes links]} graph]
                    (swap-state! current-state assoc :nodes nodes :links links))))
                (move-camera-on-arrow-keys! current-state animation-observable)
                (move-camera-on-pan! gesture-manager current-state animation-observable)
                (move-camera-on-swipe! gesture-manager current-state animation-observable)
                (zoom-out-on-pinch! gesture-manager current-state animation-observable)
                (zoom-in-out-on-interval! current-state animation-signaller)))
