From 953b3caf3d175f0b40fabd36f7012d96504c985f Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.nz> Date: Thu, 16 Apr 2020 08:45:30 +0200 Subject: [PATCH] :fire: Remove unused change event impl (:mov-obj). --- common/uxbox/common/pages.cljc | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/common/uxbox/common/pages.cljc b/common/uxbox/common/pages.cljc index c2a064ea5..c2435a4e8 100644 --- a/common/uxbox/common/pages.cljc +++ b/common/uxbox/common/pages.cljc @@ -149,10 +149,6 @@ (s/keys :req-un [::id] :opt-un [::session-id])) -(defmethod change-spec-impl :mov-obj [_] - (s/keys :req-un [::id ::frame-id] - :opt-un [::session-id])) - (defmethod change-spec-impl :mov-objects [_] (s/keys :req-un [::parent-id ::shapes] :opt-un [::index])) @@ -228,16 +224,6 @@ (assoc objects id (reduce process-operation obj operations)) objects)))) -(defmethod process-change :mov-obj - [data {:keys [id frame-id] :as change}] - (assert (contains? (:objects data) frame-id)) - (let [frame-id' (get-in data [:objects id :frame-id])] - (when (not= frame-id frame-id') - (-> data - (update-in [:objects frame-id' :shapes] (fn [s] (filterv #(not= % id) s))) - (update-in [:objects id] assoc :frame-id frame-id) - (update-in [:objects frame-id :shapes] conj id))))) - (defmethod process-change :del-obj [data {:keys [id] :as change}] (when-let [{:keys [frame-id shapes] :as obj} (get-in data [:objects id])]