mirror of
https://git.arson.gg/lilith/discord-bot.git
synced 2025-12-05 03:34:49 +01:00
better quote
This commit is contained in:
parent
0a07c4e56b
commit
61d800048c
2 changed files with 2 additions and 2 deletions
|
|
@ -29,6 +29,8 @@ function wrapText(context, text, x, y, maxWidth, lineHeight, preparingSentence,
|
|||
|
||||
lines.push(preparingSentence.join(" "));
|
||||
|
||||
y -= (lines.length * lineHeight) / 2;
|
||||
|
||||
lines.forEach(element => {
|
||||
const lineWidth = context.measureText(element).width;
|
||||
const xOffset = (maxWidth - lineWidth) / 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue