Skip to content

Commit

Permalink
center landscape bgs
Browse files Browse the repository at this point in the history
  • Loading branch information
skuqre committed Nov 10, 2023
1 parent bd67961 commit 2d018dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/dialogue.astro
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ import Anise from '../components/Anise.astro';
ctx.scale(size/100, size/100);

if (bg.width > bg.height) {
ctx.drawImage(bg, 0, 0, 1080 * (bg.width / bg.height), 1080)
ctx.drawImage(bg, (1080 - 1080 * (bg.width / bg.height)) / 2, 0, 1080 * (bg.width / bg.height), 1080)
} else {
ctx.drawImage(bg, 0, 0, 1080, 1080 * (bg.height / bg.width))
}
Expand Down

0 comments on commit 2d018dc

Please sign in to comment.