mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 18:48:37 -05:00
🐛 Fix multiple fills with texts are not working properly
This commit is contained in:
parent
431e42c80a
commit
c84017eb72
2 changed files with 7 additions and 6 deletions
|
@ -246,12 +246,13 @@
|
|||
[node]
|
||||
(let [color-attrs (select-keys node [:fill-color :fill-opacity :fill-color-ref-id :fill-color-ref-file :fill-color-gradient])]
|
||||
(cond-> node
|
||||
(d/not-empty? color-attrs)
|
||||
(-> (dissoc :fill-color :fill-opacity :fill-color-ref-id :fill-color-ref-file :fill-color-gradient)
|
||||
(assoc :fills [color-attrs]))
|
||||
|
||||
(nil? (:fills node))
|
||||
(assoc :fills (:fills txt/default-text-attrs)))))
|
||||
(assoc :fills (:fills txt/default-text-attrs))
|
||||
|
||||
(and (d/not-empty? color-attrs) (nil? (:fills node)))
|
||||
(-> (dissoc :fill-color :fill-opacity :fill-color-ref-id :fill-color-ref-file :fill-color-gradient)
|
||||
(assoc :fills [color-attrs])))
|
||||
))
|
||||
|
||||
(defn migrate-content
|
||||
[content]
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
(let [fill-image-id (str "fill-image-" render-id)]
|
||||
{:fill (str "url(#" fill-image-id ")")})
|
||||
|
||||
(contains? shape :fill-color-gradient)
|
||||
(and (contains? shape :fill-color-gradient) (some? (:fill-color-gradient shape)))
|
||||
(let [fill-color-gradient-id (str "fill-color-gradient_" render-id (if index (str "_" index) ""))]
|
||||
{:fill (str "url(#" fill-color-gradient-id ")")})
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue