mirror of
https://github.com/penpot/penpot.git
synced 2025-03-11 23:31:21 -05:00
🐛 Fix old texts with empty fills
This commit is contained in:
parent
f6f262f387
commit
928fbd8e38
2 changed files with 5 additions and 5 deletions
|
@ -287,7 +287,7 @@
|
|||
(nil? (:fills node))
|
||||
(assoc :fills (:fills txt/default-text-attrs))
|
||||
|
||||
(and (d/not-empty? color-attrs) (nil? (:fills node)))
|
||||
(and (d/not-empty? color-attrs) (empty? (:fills node)))
|
||||
(-> (dissoc :fill-color :fill-opacity :fill-color-ref-id :fill-color-ref-file :fill-color-gradient)
|
||||
(assoc :fills [color-attrs])))))
|
||||
|
||||
|
|
|
@ -101,9 +101,6 @@
|
|||
:textRendering "geometricPrecision"}
|
||||
fills
|
||||
(cond
|
||||
(some? (:fills data))
|
||||
(:fills data)
|
||||
|
||||
;; DEPRECATED: still here for backward compatibility with
|
||||
;; old penpot files that still has a single color.
|
||||
(or (some? (:fill-color data))
|
||||
|
@ -113,7 +110,10 @@
|
|||
:fill-color-ref-id :fill-color-ref-file]))]
|
||||
|
||||
(nil? (:fills data))
|
||||
[{:fill-color "#000000" :fill-opacity 1}])
|
||||
[{:fill-color "#000000" :fill-opacity 1}]
|
||||
|
||||
:else
|
||||
(:fills data))
|
||||
|
||||
font (some->> font-id (get fontsdb))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue