🐛 Fix active area for interactive shapes in view mode

This commit is contained in:
Andrés Moya 2021-04-28 17:28:09 +02:00 committed by Alonso Torres
parent 907f39c73f
commit 3a4f63848d
2 changed files with 4 additions and 3 deletions

View file

@ -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 <g> otherwise some can break
[:& component {:shape shape