mirror of
https://github.com/penpot/penpot.git
synced 2025-05-25 18:46:11 +02: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))
|
(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)))
|
(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)
|
(-> (dissoc :fill-color :fill-opacity :fill-color-ref-id :fill-color-ref-file :fill-color-gradient)
|
||||||
(assoc :fills [color-attrs])))))
|
(assoc :fills [color-attrs])))))
|
||||||
|
|
||||||
|
|
|
@ -101,9 +101,6 @@
|
||||||
:textRendering "geometricPrecision"}
|
:textRendering "geometricPrecision"}
|
||||||
fills
|
fills
|
||||||
(cond
|
(cond
|
||||||
(some? (:fills data))
|
|
||||||
(:fills data)
|
|
||||||
|
|
||||||
;; DEPRECATED: still here for backward compatibility with
|
;; DEPRECATED: still here for backward compatibility with
|
||||||
;; old penpot files that still has a single color.
|
;; old penpot files that still has a single color.
|
||||||
(or (some? (:fill-color data))
|
(or (some? (:fill-color data))
|
||||||
|
@ -113,7 +110,10 @@
|
||||||
:fill-color-ref-id :fill-color-ref-file]))]
|
:fill-color-ref-id :fill-color-ref-file]))]
|
||||||
|
|
||||||
(nil? (:fills data))
|
(nil? (:fills data))
|
||||||
[{:fill-color "#000000" :fill-opacity 1}])
|
[{:fill-color "#000000" :fill-opacity 1}]
|
||||||
|
|
||||||
|
:else
|
||||||
|
(:fills data))
|
||||||
|
|
||||||
font (some->> font-id (get fontsdb))
|
font (some->> font-id (get fontsdb))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue