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