mirror of
https://github.com/penpot/penpot.git
synced 2025-04-01 09:31:26 -05:00
🐛 Fix problem with gradients and borders
This commit is contained in:
parent
94f9551b92
commit
33c12117cc
2 changed files with 6 additions and 4 deletions
|
@ -209,7 +209,8 @@
|
|||
|
||||
props #js {:id (dm/str "stroke-color-gradient-" render-id "-" index)
|
||||
:gradient gradient
|
||||
:shape shape}
|
||||
:shape shape
|
||||
:force-transform (cfh/path-shape? shape)}
|
||||
stroke-image (:stroke-image stroke)
|
||||
uri (when stroke-image (cf/resolve-file-media stroke-image))
|
||||
|
||||
|
@ -248,7 +249,8 @@
|
|||
:width (/ w (dm/get-prop selrect :width))
|
||||
:height (/ h (dm/get-prop selrect :height))
|
||||
:viewBox "0 0 1 1"
|
||||
:preserveAspectRatio "xMidYMid slice"}
|
||||
:preserveAspectRatio "xMidYMid slice"
|
||||
:patternTransform (when (cfh/path-shape? shape) (gsh/transform-str shape))}
|
||||
[:> :image image-props]])
|
||||
|
||||
(cond
|
||||
|
|
|
@ -30,9 +30,9 @@
|
|||
|
||||
(mf/defc linear-gradient
|
||||
{::mf/wrap-props false}
|
||||
[{:keys [id gradient shape]}]
|
||||
[{:keys [id gradient shape force-transform]}]
|
||||
(let [transform (mf/with-memo [shape]
|
||||
(when (cfh/frame-shape? shape)
|
||||
(when force-transform
|
||||
(gsh/transform-matrix shape nil (gpt/point 0.5 0.5))))
|
||||
|
||||
metadata? (mf/use-ctx ed/include-metadata-ctx)
|
||||
|
|
Loading…
Add table
Reference in a new issue