0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-28 15:41:25 -05:00

🐛 Fix blur

This commit is contained in:
Alejandro Alonso 2023-11-10 08:11:26 +01:00 committed by Andrey Antukh
parent a8eb5328a0
commit a19f5fd305

View file

@ -20,11 +20,11 @@
(- (mth/sqrt (* 2 stroke-width stroke-width)) stroke-width)))
(defn- apply-filters
[type filters]
[attr type filters]
(sequence
(comp
(remove :hidden)
(filter #(= (:style %) type))
(filter #(= (attr %) type))
(map (fn [item]
{:id (dm/str "filter_" (:id item))
:type type
@ -40,10 +40,10 @@
;; We can revisit this in the future
#_(->> shape :blur (into []) (blur-filters :background-blur))
(->> shape :shadow (apply-filters :drop-shadow))
(->> shape :shadow (apply-filters :style :drop-shadow))
[{:id "shape" :type :blend-filters}]
(->> shape :shadow (apply-filters :inner-shadow))
(->> shape :blur (into []) (apply-filters :layer-blur))))
(->> shape :shadow (apply-filters :style :inner-shadow))
(->> shape :blur list (apply-filters :type :layer-blur))))
(defn- calculate-filter-bounds
[selrect filter-entry]