🐛 Fix problem when adding shadows to imported text

This commit is contained in:
alonso.torres 2022-03-17 15:12:16 +01:00
parent a4d362d43d
commit eaa6ea80e6
2 changed files with 12 additions and 12 deletions

View file

@ -47,6 +47,7 @@
- Fix display code icon on preview hover [Taiga #2838](https://tree.taiga.io/project/penpot/us/2838) - Fix display code icon on preview hover [Taiga #2838](https://tree.taiga.io/project/penpot/us/2838)
- Fix crash on iOS when displaying viewer [#1522](https://github.com/penpot/penpot/issues/1522) - Fix crash on iOS when displaying viewer [#1522](https://github.com/penpot/penpot/issues/1522)
- Fix problem when importing a SVG with text [#1532](https://github.com/penpot/penpot/issues/1532) - Fix problem when importing a SVG with text [#1532](https://github.com/penpot/penpot/issues/1532)
- Fix problem when adding shadows to imported text [#Taiga 3057](https://tree.taiga.io/project/penpot/issue/3057)
### :arrow_up: Deps updates ### :arrow_up: Deps updates
### :heart: Community contributions by (Thank you!) ### :heart: Community contributions by (Thank you!)

View file

@ -175,7 +175,7 @@
(if svg-root? (if svg-root?
;; When is a raw-svg but not the root we use the whole svg as bound for the filter. Is the maximum ;; When is a raw-svg but not the root we use the whole svg as bound for the filter. Is the maximum
;; we're allowed to display ;; we're allowed to display
{:x 0 :y 0 :width width :height height} {:x x :y y :width width :height height}
;; Otherwise we calculate the bound ;; Otherwise we calculate the bound
(let [filter-bounds (->> filters (let [filter-bounds (->> filters
@ -224,7 +224,6 @@
filter-y (/ (- (:y bounds) (:y selrect) padding) (:height selrect)) filter-y (/ (- (:y bounds) (:y selrect) padding) (:height selrect))
filter-width (/ (+ (:width bounds) (* 2 padding)) (:width selrect)) filter-width (/ (+ (:width bounds) (* 2 padding)) (:width selrect))
filter-height (/ (+ (:height bounds) (* 2 padding)) (:height selrect))] filter-height (/ (+ (:height bounds) (* 2 padding)) (:height selrect))]
[:*
(when (> (count filters) 2) (when (> (count filters) 2)
[:filter {:id filter-id [:filter {:id filter-id
:x filter-x :x filter-x
@ -234,5 +233,5 @@
:filterUnits "objectBoundingBox" :filterUnits "objectBoundingBox"
:color-interpolation-filters "sRGB"} :color-interpolation-filters "sRGB"}
(for [entry filters] (for [entry filters]
[:& filter-entry {:entry entry}])])])) [:& filter-entry {:entry entry}])])))