                                             (cast! :cancel-drawing)
                                             (reset! (om/get-state owner :touches) (touches->clj touches)))
 
-                                          :else nil)))
+                                          :else (js/clearInterval (om/get-state owner :touch-timer)))))
                       :onTouchEnd (fn [event]
                                     (.preventDefault event)
                                     (js/clearInterval (om/get-state owner :touch-timer))

        ;; touches aren't seqable
        (js/Array.prototype.slice.call touches)))

(defn svg-canvas [payload owner opts]
  (reify
    om/IInitState (init-state [_]

                                               (when in-progress?
                                                 (cast! :cancel-drawing))
                                               (let [touches-atom (om/get-state owner :touches)
                                                     [p-a p-b :as previous-touches] @touches-atom
                                                     [c-a c-b :as current-touches] (touches->clj touches)

                                                     p-center (center [(:page-x p-a) (:page-y p-a)]
                                                                      [(:page-x p-b) (:page-y p-b)])

                                                     c-center (center [(:page-x c-a) (:page-y c-a)]
                                                                      [(:page-x c-b) (:page-y c-b)])

                                                     drift-x (- (first c-center) (first p-center))
                                                     drift-y (- (second c-center) (second p-center))

                                                     spread (- (measure [(:page-x p-a) (:page-y p-a)]
                                                                        [(:page-x p-b) (:page-y p-b)])
                                                               (measure [(:page-x c-a) (:page-y c-a)]
                                                                        [(:page-x c-b) (:page-y c-b)]))]
                                                 (reset! touches-atom current-touches)
                                                 (om/transact! payload (fn [state]
                                                                         (-> state
                                                                           (cameras/set-zoom (partial + (* -0.004 spread)))
                                                                           (cameras/move-camera drift-x drift-y))))))
                                             :else nil)))
                      :onMouseDown (fn [event]
                                     ((:handle-mouse-down handlers) event)
