Use bounding box when showing interactions

This commit is contained in:
Andrés Moya 2020-05-05 16:00:08 +02:00
parent 0aeb966b11
commit 54b7d04639
6 changed files with 6 additions and 31 deletions

View file

@ -52,11 +52,8 @@
{::mf/wrap-props false}
[props]
(let [shape (unchecked-get props "shape")
{:keys [x y width height]} (geom/shape->rect-shape shape)
transform (geom/transform-matrix shape)
{:keys [x y width height]} (geom/selection-rect-shape shape)
show-interactions? (mf/deref refs/show-interactions?)
on-mouse-down (mf/use-callback
(mf/deps shape)
#(common/on-mouse-down-viewer % shape))]
@ -69,7 +66,6 @@
:y (- y 1)
:width (+ width 2)
:height (+ height 2)
:transform transform
:fill "#31EFB8"
:stroke "#31EFB8"
:strokeWidth 1