mirror of
https://github.com/penpot/penpot.git
synced 2025-03-13 00:01:51 -05:00
Merge pull request #4047 from penpot/niwinz-staging-bugfix-7
🐛 Fix incorrect props transformation on custom strokes component
This commit is contained in:
commit
3c07416c48
2 changed files with 19 additions and 19 deletions
|
@ -7,6 +7,7 @@
|
|||
(ns app.main.ui.dashboard.grid
|
||||
(:require-macros [app.main.style :as stl])
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.data.macros :as dm]
|
||||
[app.common.geom.point :as gpt]
|
||||
[app.common.logging :as log]
|
||||
|
@ -446,8 +447,9 @@
|
|||
[:& loading-placeholder]
|
||||
|
||||
(seq files)
|
||||
(for [slice (partition-all limit files)]
|
||||
[:ul {:class (stl/css :grid-row)}
|
||||
(for [[index slice] (d/enumerate (partition-all limit files))]
|
||||
|
||||
[:ul {:class (stl/css :grid-row) :key (dm/str index)}
|
||||
(when @dragging?
|
||||
[:li {:class (stl/css :grid-item)}])
|
||||
(for [item slice]
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
suffix (if (some? index) (dm/str "-" index) "")
|
||||
clip-id (dm/str "inner-stroke-" render-id "-" shape-id suffix)
|
||||
href (dm/str "#stroke-shape-" render-id "-" shape-id suffix)]
|
||||
[:> "clipPath" #js {:id clip-id}
|
||||
[:> "clipPath" {:id clip-id}
|
||||
[:use {:href href}]]))
|
||||
|
||||
(mf/defc outer-stroke-mask
|
||||
|
@ -473,7 +473,7 @@
|
|||
shape-blur (get shape :blur)
|
||||
shape-fills (get shape :fills)
|
||||
shape-shadow (get shape :shadow)
|
||||
shape-strokes (get shape :strokes)
|
||||
shape-strokes (not-empty (get shape :strokes))
|
||||
|
||||
svg-attrs (attrs/get-svg-props shape render-id)
|
||||
|
||||
|
@ -481,24 +481,22 @@
|
|||
(obj/clone)
|
||||
(attrs/add-layer-styles! shape))
|
||||
|
||||
props (-> svg-attrs
|
||||
(obj/merge!
|
||||
{:id stroke-id
|
||||
:className "strokes"
|
||||
:style style}))
|
||||
props (mf/spread-props svg-attrs
|
||||
{:id stroke-id
|
||||
:className "strokes"
|
||||
:style style})]
|
||||
|
||||
props (if ^boolean (cfh/frame-shape? shape)
|
||||
props
|
||||
(cond-> props
|
||||
(and (some? shape-blur)
|
||||
(not ^boolean (:hidden shape-blur)))
|
||||
(obj/set! "filter" (dm/fmt "url(#filter-blur-%)" render-id))
|
||||
|
||||
(and (empty? shape-fills)
|
||||
(some? (->> shape-shadow (remove :hidden) seq)))
|
||||
(obj/set! "filter" (dm/fmt "url(#filter-%)" render-id))))]
|
||||
(when-not ^boolean (cfh/frame-shape? shape)
|
||||
(when (and (some? shape-blur)
|
||||
(not ^boolean (:hidden shape-blur)))
|
||||
(obj/set! props "filter" (dm/fmt "url(#filter-blur-%)" render-id)))
|
||||
|
||||
(when (d/not-empty? shape-strokes)
|
||||
(when (and (empty? shape-fills)
|
||||
(some? (->> shape-shadow (remove :hidden) not-empty)))
|
||||
(obj/set! props "filter" (dm/fmt "url(#filter-%)" render-id))))
|
||||
|
||||
(when (some? shape-strokes)
|
||||
[:> :g props
|
||||
(for [[index value] (reverse (d/enumerate shape-strokes))]
|
||||
[:& shape-custom-stroke {:shape shape
|
||||
|
|
Loading…
Add table
Reference in a new issue