From 3dd0d840d908cc1b6b36ba9fbefc11ff2c51b12a Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sat, 30 Jan 2016 19:38:34 +0200 Subject: [PATCH] Minor code cleaning. --- src/uxbox/ui/workspace/base.cljs | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/uxbox/ui/workspace/base.cljs b/src/uxbox/ui/workspace/base.cljs index 39d701eea7..bc2d365df8 100644 --- a/src/uxbox/ui/workspace/base.cljs +++ b/src/uxbox/ui/workspace/base.cljs @@ -31,14 +31,14 @@ (as-> (l/in [:workspace]) $ (l/focus-atom $ st/state))) -(def ^:static toolboxes-l - (as-> (l/in [:workspace :toolboxes]) $ - (l/focus-atom $ st/state))) - (def ^:static selected-shapes-l (as-> (l/in [:workspace :selected]) $ (l/focus-atom $ st/state))) +(def ^:static toolboxes-l + (as-> (l/in [:workspace :toolboxes]) $ + (l/focus-atom $ st/state))) + (def ^:static flags-l (as-> (l/in [:workspace :flags]) $ (l/focus-atom $ st/state))) @@ -75,8 +75,6 @@ ;; Interactions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (defonce shapes-dragging? (atom false)) -;; (defonce selrect-dragging? (atom false)) (defonce interactions-b (rx/bus)) (defn emit-interaction! @@ -93,8 +91,6 @@ (rx/filter #(= (:id %) (:id @page-l))) (rx/map :coords))) -;; Deltas - (defn- coords-delta [[old new]] (let [[oldx oldy] old @@ -108,11 +104,9 @@ (rx/buffer 2 1) (rx/map coords-delta))) -;; Materialized views - (defonce mouse-position (->> mouse-s - (rx/sample 50) + (rx/sample 10) (rx/to-atom))) (defonce bounding-rect (atom {}))