From 2c9e14f7773f94e7152d47f25e5b3907f9bc73c2 Mon Sep 17 00:00:00 2001 From: Mal Date: Sat, 1 Nov 2025 14:34:46 +0100 Subject: [PATCH] Fix for canvas background bug in Chromium --- .gitignore | 2 +- js/Game.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3b505e9..644448c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ .idea test* -js/Setting.js \ No newline at end of file +js/Setting.js diff --git a/js/Game.js b/js/Game.js index 72f0e7a..d71bd5d 100644 --- a/js/Game.js +++ b/js/Game.js @@ -214,7 +214,7 @@ export class Game this.canvas.style.backgroundImage = 'none'; } - this.canvas.style.backgroundColor = this.level.getBackgroundColor(); + document.body.style.backgroundColor = this.level.getBackgroundColor(); this.canvas.width = window.innerWidth; this.canvas.height = window.innerHeight;