From ee5a36f4257249b73bf0c264eb119e3e44f5acee Mon Sep 17 00:00:00 2001 From: ElementalAlchemist Date: Wed, 13 Nov 2024 16:27:00 -0600 Subject: [PATCH] Default to filling the canvas with the key-out color --- thrimbletrimmer/driveclock/drive.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/thrimbletrimmer/driveclock/drive.js b/thrimbletrimmer/driveclock/drive.js index 3d818cd..66a22cb 100644 --- a/thrimbletrimmer/driveclock/drive.js +++ b/thrimbletrimmer/driveclock/drive.js @@ -109,6 +109,10 @@ async function drawRoad() { // Clear the previous canvas before starting context.clearRect(0, 0, CANVAS_PIXEL_WIDTH, 100); + // Background the whole thing as the key-out color in case we need to bail + // out before drawing (e.g. we're in a non-DB game menu) + context.fillStyle = KEY_OUT_COLOR; + context.fillRect(0, 0, CANVAS_PIXEL_WIDTH, 100); const currentTime = busData.clock_minutes; const distance = busData.odometer;