mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -05:00
🐛 Fixes problem with outline and zoom
This commit is contained in:
parent
d10863d928
commit
9fb6744ee8
1 changed files with 5 additions and 3 deletions
|
@ -13,13 +13,15 @@
|
||||||
[uxbox.common.geom.shapes :as gsh]
|
[uxbox.common.geom.shapes :as gsh]
|
||||||
[uxbox.util.object :as obj]
|
[uxbox.util.object :as obj]
|
||||||
[rumext.util :refer [map->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/defc outline
|
||||||
{::mf/wrap-props false}
|
{::mf/wrap-props false}
|
||||||
[props]
|
[props]
|
||||||
(let [shape (unchecked-get props "shape")
|
(let [zoom (mf/deref refs/selected-zoom)
|
||||||
|
shape (unchecked-get props "shape")
|
||||||
transform (gsh/transform-matrix shape)
|
transform (gsh/transform-matrix shape)
|
||||||
{:keys [id x y width height]} shape
|
{:keys [id x y width height]} shape
|
||||||
|
|
||||||
|
@ -30,7 +32,7 @@
|
||||||
|
|
||||||
common {:fill "transparent"
|
common {:fill "transparent"
|
||||||
:stroke "#31EFB8"
|
:stroke "#31EFB8"
|
||||||
:strokeWidth "1px"
|
:strokeWidth (/ 1 zoom)
|
||||||
:pointerEvents "none"
|
:pointerEvents "none"
|
||||||
:transform transform}
|
:transform transform}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue