From 6fda1561646f62c0c48d3577a6c4b1d7f6e56e42 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Wed, 20 Apr 2022 06:53:30 +0200 Subject: [PATCH] :bug: Fix drop shadow not working on fill-less strokes --- frontend/src/app/main/ui/shapes/custom_stroke.cljs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/ui/shapes/custom_stroke.cljs b/frontend/src/app/main/ui/shapes/custom_stroke.cljs index 66af3edae..84c8726d1 100644 --- a/frontend/src/app/main/ui/shapes/custom_stroke.cljs +++ b/frontend/src/app/main/ui/shapes/custom_stroke.cljs @@ -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))