From 9fb6744ee8f4329a7256fed74704fa553a65ed13 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Thu, 4 Jun 2020 15:24:56 +0200 Subject: [PATCH] :bug: Fixes problem with outline and zoom --- frontend/src/uxbox/main/ui/workspace/shapes/outline.cljs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/uxbox/main/ui/workspace/shapes/outline.cljs b/frontend/src/uxbox/main/ui/workspace/shapes/outline.cljs index f1683b94f3..fa3befe0e8 100644 --- a/frontend/src/uxbox/main/ui/workspace/shapes/outline.cljs +++ b/frontend/src/uxbox/main/ui/workspace/shapes/outline.cljs @@ -13,13 +13,15 @@ [uxbox.common.geom.shapes :as gsh] [uxbox.util.object :as obj] [rumext.util :refer [map->obj]] - [uxbox.main.ui.shapes.path :as path])) + [uxbox.main.ui.shapes.path :as path] + [uxbox.main.refs :as refs])) (mf/defc outline {::mf/wrap-props false} [props] - (let [shape (unchecked-get props "shape") + (let [zoom (mf/deref refs/selected-zoom) + shape (unchecked-get props "shape") transform (gsh/transform-matrix shape) {:keys [id x y width height]} shape @@ -30,7 +32,7 @@ common {:fill "transparent" :stroke "#31EFB8" - :strokeWidth "1px" + :strokeWidth (/ 1 zoom) :pointerEvents "none" :transform transform}