                                                    (js/console.log event)
                                                    ((:handle-mouse-up handlers) event))
                                      :onTouchMove (fn [event]
-                                                     (let [touches (.-touches event)]
-                                                       (when (= (.-length touches) 1)
-                                                         (.preventDefault event)
-                                                         (.stopPropagation event)
-                                                         (js/console.log event)
-                                                         ((:handle-mouse-move! handlers) (aget touches "0")))))
+                                                    (let [touches (.-touches event)]
+                                                      (when (= (.-length touches) 1)
+                                                        (.preventDefault event)
+                                                        (.stopPropagation event)
+                                                        (js/console.log event)
+                                                        ((:handle-mouse-move! handlers) (aget touches "0")))))
                                      :onMouseDown (fn [event]
                                                     (.preventDefault event)
                                                     (.stopPropagation event)

            [cljs.core.async :refer [put!]]
            [frontend.camera :as cameras]
            [frontend.datascript :as ds]
            [frontend.models.layer :as layer-model]
            [frontend.settings :as settings]
            [frontend.state :as state]

                                                                         (get-in sel [:layer/end-sy]))})
                                        el-type (cond
                                                 (= (get-in payload state/current-tool-path) :line) dom/line
                                                 :else dom/dom)
                                        x-direction (if (neg? (- (:layer/start-x sel) (:layer/current-x sel))) -1 1)
                                        y-direction (if (neg? (- (:layer/start-y sel) (:layer/current-y sel))) -1 1)
                                        rect (svg/layer->svg-rect (:camera payload) sel false cast!)]
                                    (if (= :line (get-in payload state/current-tool-path))
                                      (dom/line (clj->js (merge
                                                          (dissoc rect :x :y :width :height :stroke-width :fill)
                                                          ;; TODO: figure out how this actually works, right now it's just
                                                          ;;       the result of changing signs until it worked!
                                                          (let [x1 (if (neg? x-direction)
                                                                     (+ (:x rect) (:width rect))
                                                                     (:x rect))
                                                                y1 (if (neg? y-direction)
                                                                     (+ (:y rect) (:height rect))
                                                                     (:y rect))]
                                                            {:x1 x1
                                                             :y1 y1
                                                             :x2 (+ (* x-direction (:width rect)) x1)
                                                             :y2 (+ (* y-direction (:height rect)) y1)
                                                             :fill "gray"
                                                             :fillOpacity "0.25"
                                                             :strokeDasharray "5,5"
                                                             :strokeWidth 1}))))
                                      (dom/rect (clj->js (assoc rect
                                                           :fill "gray"
                                                           :fillOpacity "0.25"
                                                           :strokeDasharray "5,5"
                                                           :strokeWidth 1))))))
                                #_(dom/text #js {:x 15
                                                 :y 15} (pr-str (dissoc payload :layers)))]
                               [(when (cameras/guidelines-enabled? payload)
