From 774c395a7f20d2440ae3ab69dd5949d00e18a635 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sun, 31 Jan 2016 17:41:23 +0200 Subject: [PATCH] Keep ruler active until an other click. --- src/uxbox/ui/workspace/canvas/ruler.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uxbox/ui/workspace/canvas/ruler.cljs b/src/uxbox/ui/workspace/canvas/ruler.cljs index 0ac4e7411..d9d1db0d2 100644 --- a/src/uxbox/ui/workspace/canvas/ruler.cljs +++ b/src/uxbox/ui/workspace/canvas/ruler.cljs @@ -39,7 +39,7 @@ (defn- on-mouse-up [own local event] (dom/stop-propagation event) - (reset! local {:active false})) + (swap! local assoc :active false)) (defn- overlay-render [own local] @@ -53,7 +53,7 @@ [:rect {:style {:fill "transparent" :stroke "transparent" :cursor "cell"} :width wb/viewport-width :height wb/viewport-height}] - (if (and (:active @local) x1 x2) + (if (and x1 x2) [:g [:line {:x1 x1 :y1 y1 :x2 x2 :y2 y2 :style {:cursor "cell"}