       (assoc-in [:drawing :moving?] true)
       (assoc-in [:drawing :starting-mouse-position] [rx ry]))))
 
+(defn handle-menu-opened [state]
+  (-> state
+    (update-in [:menu] assoc
+               :open? true
+               :x (get-in state [:mouse :x])
+               :y (get-in state [:mouse :y]))
+    (assoc-in [:drawing :in-progress?] false)
+    (assoc-in state/right-click-learned-path true)))
+
 (defmethod control-event :menu-opened
   [browser-state message _ state]
-  (print "menu opened")
-  (-> state
-      (update-in [:menu] assoc
-                 :open? true
-                 :x (get-in state [:mouse :x])
-                 :y (get-in state [:mouse :y]))
-      (assoc-in [:drawing :in-progress?] false)
-      (assoc-in state/right-click-learned-path true)))
-
-(defmethod post-control-event! :menu-opened
-  [browser-state message _ previous-state current-state]
+  (handle-menu-opened state))
+
+(defn handle-menu-opened-after [previous-state current-state]
   (when (and (not (get-in previous-state state/right-click-learned-path))
              (get-in current-state state/right-click-learned-path))
     (analytics/track "Radial menu learned")))
+
+(defmethod post-control-event! :menu-opened
+  [browser-state message _ previous-state current-state]
+  (handle-menu-opened-after previous-state current-state))
 
 (defmethod control-event :menu-closed
   [browser-state message _ state]

  (let [points (map js/parseInt (str/split (subs path 1) #" "))]
    (map (fn [[rx ry]] {:rx rx :ry ry}) (partition 2 points))))

(defmethod control-event :drawing-started
  [browser-state message [x y] state]
  (let [[rx ry] (cameras/screen->point (:camera state) x y)
        [snap-x snap-y] (cameras/snap-to-grid (:camera state) rx ry)
        {:keys [entity-id state]} (frontend.db/get-entity-id state)


     :else nil)))

(defn handle-text-layer-finished [state bbox]
  (-> state
    (update-in [:drawing :layers 0 :bbox] #(or bbox %))
    (finalize-layer)))

(defmethod control-event :text-layer-finished
  [browser-state message {:keys [bbox]} state]
  (handle-text-layer-finished state bbox))

(defn handle-text-layer-finished-after [current-state]
  (let [db (:db current-state)
        layer (utils/remove-map-nils (get-in current-state [:drawing :finished-layers 0]))]
    (when (layer-model/detectable? layer)
      (d/transact! db [layer] {:can-undo? true}))
    (maybe-notify-subscribers! current-state nil nil)))

(defmethod post-control-event! :text-layer-finished
  [browser-state message _ previous-state current-state]
  (handle-text-layer-finished-after current-state))

(defmethod control-event :deleted-selected
  [browser-state message _ state]
