Skip to content

Commit 30cb5bd

Browse files
committed
fix: remove bottom white line in firefox
1 parent 2ed6d8f commit 30cb5bd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

scripts/main.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ function drawCanvas(canvas, ctx) {
3535
}
3636

3737
function resizeCanvas(canvas, ctx) {
38-
canvas.width = window.innerWidth;
39-
canvas.height = window.innerHeight;
38+
canvas.width = window.innerWidth + 1;
39+
canvas.height = window.innerHeight + 1;
4040
drawCanvas(canvas, ctx);
4141
}
4242

4343
function drawLines(canvas, ctx) {
4444
const { currentColorIndex, txtColors } = state;
4545
const margin = canvas.height / 20;
46-
const stroke = (canvas.height * canvas.width) / 400000;
46+
const stroke = 3;
4747

4848
ctx.fillStyle = `rgba(${txtColors[currentColorIndex].join(", ")}, 1)`;
4949

@@ -107,7 +107,6 @@ function main() {
107107

108108
font.load().then((loaded) => {
109109
document.fonts.add(loaded);
110-
drawCanvas(canvas, ctx);
111110
resizeCanvas(canvas, ctx);
112111
fadeCanvas(canvas, ctx);
113112

0 commit comments

Comments
 (0)