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
|
// Flavor
|
||||||
ctx.font = "italic 24px serif";
|
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
|
// Artist
|
||||||
ctx.font = "30px sans-serif";
|
ctx.font = "30px sans-serif";
|
||||||
|
@ -130,8 +131,8 @@ function drawCard() {
|
||||||
|
|
||||||
async function drawCardId() {
|
async function drawCardId() {
|
||||||
const id = await generateCardId(packInput.value, nameInput.value);
|
const id = await generateCardId(packInput.value, nameInput.value);
|
||||||
ctx.font = "20px sans-serif";
|
ctx.font = "15px sans-serif";
|
||||||
ctx.fillText("KC-" + id, canvas.width - 350, canvas.height - 60);
|
ctx.fillText("KC-" + id, canvas.width/2, canvas.height - 30);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue