0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-22 14:39:45 -05:00

🐛 Fix profile image generation issue.

This commit is contained in:
Andrey Antukh 2022-01-19 09:57:42 +01:00 committed by Andrés Moya
parent 072e4a4f98
commit 0c53aa158b
2 changed files with 4 additions and 2 deletions

View file

@ -68,6 +68,7 @@
- Avoid modifying component when moving into a group [Taiga #2534](https://tree.taiga.io/project/penpot/issue/2534)
- Show correctly group types label in handoff [Taiga #2482](https://tree.taiga.io/project/penpot/issue/2482)
- Display view mode buttons always centered in viewer [#Taiga 2466](https://tree.taiga.io/project/penpot/issue/2466)
- Fix default profile image generation issue [Taiga #2601](https://tree.taiga.io/project/penpot/issue/2601)
### :arrow_up: Deps updates

View file

@ -11,7 +11,8 @@
(defn generate*
[{:keys [name color size]
:or {color "var(--color-black)" size 128}}]
:or {color "#000000" size 128}}]
(let [parts (str/words (str/upper name))
letters (if (= 1 (count parts))
(ffirst parts)
@ -27,7 +28,7 @@
(obj/set! context "font" (str (/ size 2) "px Arial"))
(obj/set! context "textAlign" "center")
(obj/set! context "fillStyle" "var(--color-white)")
(obj/set! context "fillStyle" "#ffffff")
(.fillText context letters (/ size 2) (/ size 1.5))
(.toDataURL canvas)))