                                                 :y (get-in payload [:layer-properties-menu :y])}))
 
                   (when-let [sels (cond
-                                   (settings/moving-drawing? payload) (remove #(= :layer.type/group (:layer/type %))
-                                                                              (settings/drawing payload))
-                                   (= :layer.type/text (get-in payload [:drawing :layers 0 :layer/type])) nil
-                                   (settings/drawing-in-progress? payload) (settings/drawing payload)
-                                   :else nil)]
+                                    (settings/moving-drawing? payload) (remove #(= :layer.type/group (:layer/type %))
+                                                                               (settings/drawing payload))
+                                    (= :layer.type/text (get-in payload [:drawing :layers 0 :layer/type])) nil
+                                    (settings/drawing-in-progress? payload) (settings/drawing payload)
+                                    :else nil)]
                     (apply dom/g #js {:className "layers"}
                            (map (fn [sel]
                                   (let [sel (if (:force-even? sel)

                                         :onClick #(do (cast! :layer-ui-target-edited {:value target})
                                                       (om/set-state! owner :input-expanded false)
                                                       (.focus (om/get-node owner "target-input")))}
                               target)))))))))

(defn svg-canvas [payload owner opts]
  (reify
    om/IRender
    (render [_]
      (let [{:keys [cast! handlers]} (om/get-shared owner)
            camera (:camera payload)
            subs-layers (reduce (fn [acc [id subscriber]]
                                  (if-let [layers (seq (:layers subscriber))]
                                    (concat acc (map (fn [layer]
                                                       (assoc layer
                                                         :layer/end-x (:layer/current-x layer)
                                                         :layer/end-y (:layer/current-y layer)
                                                         :subscriber-color (:color subscriber)
                                                         :layer/stroke (apply str "#" (take 6 id))))
                                                     layers))
                                    acc))
                                [] (:subscribers payload))]

                  #js {:transform (cameras/->svg-transform camera)}
                  (om/build cursors (select-keys payload [:subscribers :client-id]))
                  (om/build svg-layers (assoc (select-keys payload [:selected-eids :document/id])
                                              :editing-eids (set (concat (when (or (settings/drawing-in-progress? payload)
                                                                                   (settings/moving-drawing? payload))
                                                                           (concat [(:db/id (settings/drawing payload))]
                                                                                   (map :db/id (get-in payload [:drawing :layers]))))
                                                                         (remove nil? (map :db/id subs-layers))))
                                              :tool (get-in payload state/current-tool-path)))
                  (om/build subscriber-layers {:layers subs-layers})
                  (when (and (settings/drawing-in-progress? payload)
                             (= :layer.type/text (get-in payload [:drawing :layers 0 :layer/type])))
