0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-19 19:21:23 -05:00

Merge pull request #1823 from penpot/superalex-drop-shadow-not-working-on-fill-less-strokes

🐛 Fix drop shadow not working on fill-less strokes
This commit is contained in:
Andrey Antukh 2022-04-21 15:52:12 +02:00 committed by GitHub
commit 202e7eb3f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -418,8 +418,13 @@
stroke-props (-> (obj/new)
(obj/set! "id" (dm/fmt "strokes-%" (:id shape)))
(cond->
(and (and (:blur shape) (-> shape :blur :hidden not)) (not (cph/frame-shape? shape)))
(obj/set! "filter" (dm/fmt "url(#filter_blur_%)" render-id))))]
;; There is a blur
(and (:blur shape) (not (cph/frame-shape? shape)) (-> shape :blur :hidden not))
(obj/set! "filter" (dm/fmt "url(#filter_blur_%)" render-id))
;; There are any shadows and no fills
(and (empty? (:fills shape)) (not (cph/frame-shape? shape)) (seq (->> (:shadow shape) (remove :hidden))))
(obj/set! "filter" (dm/fmt "url(#filter_%)" render-id))))]
[:*
(when
(d/not-empty? (:strokes shape))