Center align flavor text and card ID in drawing function
This commit is contained in:
parent
05711c22f2
commit
41505776af
1 changed files with 4 additions and 3 deletions
|
@ -116,7 +116,8 @@ function drawCard() {
|
|||
|
||||
// Flavor
|
||||
ctx.font = "italic 24px serif";
|
||||
wrapText(flavorInput.value, 60, 950, 680, 30);
|
||||
ctx.textAlign = "center";
|
||||
wrapText(flavorInput.value, canvas.width / 2, 965, 558, 30);
|
||||
|
||||
// Artist
|
||||
ctx.font = "30px sans-serif";
|
||||
|
@ -130,8 +131,8 @@ function drawCard() {
|
|||
|
||||
async function drawCardId() {
|
||||
const id = await generateCardId(packInput.value, nameInput.value);
|
||||
ctx.font = "20px sans-serif";
|
||||
ctx.fillText("KC-" + id, canvas.width - 350, canvas.height - 60);
|
||||
ctx.font = "15px sans-serif";
|
||||
ctx.fillText("KC-" + id, canvas.width/2, canvas.height - 30);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue