From 2b6839bedbee413e577802b9581b7a0d02ea09f5 Mon Sep 17 00:00:00 2001 From: Ian Ward Date: Sat, 20 Jul 2024 19:52:36 +0100 Subject: [PATCH] define variables --- apps/quarterclock/app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/quarterclock/app.js b/apps/quarterclock/app.js index da7efed16..837cac6b6 100644 --- a/apps/quarterclock/app.js +++ b/apps/quarterclock/app.js @@ -91,10 +91,10 @@ // Draw hour or minute boxes let drawBox = function drawBox(current, boxes, size, colour) { - x1 = (boxes[current].x * Bangle.appRect.h) + (Bangle.appRect.y/2); - y1 = (boxes[current].y * Bangle.appRect.h) + Bangle.appRect.y; - x2 = x1 + size; - y2 = y1 + size; + let x1 = (boxes[current].x * Bangle.appRect.h) + (Bangle.appRect.y/2); + let y1 = (boxes[current].y * Bangle.appRect.h) + Bangle.appRect.y; + let x2 = x1 + size; + let y2 = y1 + size; g.setColor(colour); g.fillRect(x1, y1, x2, y2); };