0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 00:40:30 -05:00

🐛 Fixes problem with outline and zoom

This commit is contained in:
alonso.torres 2020-06-04 15:24:56 +02:00
parent d10863d928
commit 9fb6744ee8

View file

@ -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}