From 3a4f63848daad4bdc2538bb92fe530697697f9db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Wed, 28 Apr 2021 17:28:09 +0200 Subject: [PATCH] :bug: Fix active area for interactive shapes in view mode --- CHANGES.md | 1 + frontend/src/app/main/ui/viewer/shapes.cljs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index f88f801f5..a6395d0cc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -34,6 +34,7 @@ - Fix problem displaying team statistics [#859](https://github.com/penpot/penpot/issues/859) - Fix problems with text editor selection [Taiga #1546](https://tree.taiga.io/project/penpot/issue/1546) - Fix problem when opening the context menu in dashboard at the bottom [#856](https://github.com/penpot/penpot/issues/856) +- Fix problem when clicking an interactive group in view mode [#863](https://github.com/penpot/penpot/issues/863) - Fix visibility of pages in sitemap when changing page [Taiga #1618](https://tree.taiga.io/project/penpot/issue/1618) - Fix visual problem with group invite [Taiga #1290](https://tree.taiga.io/project/penpot/issue/1290) - Fix issues with promote owner panel [Taiga #763](https://tree.taiga.io/project/penpot/issue/763) diff --git a/frontend/src/app/main/ui/viewer/shapes.cljs b/frontend/src/app/main/ui/viewer/shapes.cljs index 05e5d4836..bbcc521ce 100644 --- a/frontend/src/app/main/ui/viewer/shapes.cljs +++ b/frontend/src/app/main/ui/viewer/shapes.cljs @@ -65,15 +65,15 @@ :frame frame :childs childs :is-child-selected? true}] - (when (and (:interactions shape) show-interactions?) + (when (:interactions shape) [:rect {:x (- x 1) :y (- y 1) :width (+ width 2) :height (+ height 2) :fill "#31EFB8" :stroke "#31EFB8" - :stroke-width 1 - :fill-opacity 0.2}])] + :stroke-width (if show-interactions? 1 0) + :fill-opacity (if show-interactions? 0.2 0)}])] ;; Don't wrap svg elements inside a otherwise some can break [:& component {:shape shape