From ad67db1a4abbcf51f1dd18c0c2e317e03cfb113c Mon Sep 17 00:00:00 2001 From: Red-The-Hunter <62763030+Red-The-Hunter@users.noreply.github.com> Date: Sat, 28 Mar 2020 01:07:24 +0800 Subject: [PATCH] Update stopwatch.js Made lap entries count up from 1 Made lap entries scroll to 2nd column after 18th entry to allow for 36 lap entries before scrolling off-screen --- apps/swatch/stopwatch.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/swatch/stopwatch.js b/apps/swatch/stopwatch.js index dc79b34da..ed087e66f 100644 --- a/apps/swatch/stopwatch.js +++ b/apps/swatch/stopwatch.js @@ -23,11 +23,9 @@ function updateLabels() { g.setFontAlign(-1,-1); for (var i in lapTimes) { if (i<18) - {g.drawString(lapTimes.length-i+": "+timeToText(lapTimes[i]),8,timeY + 30 + i*8);} - else if (i<36) - {g.drawString(lapTimes.length-i+": "+timeToText(lapTimes[i]),80,timeY + 30 + (i-18)*8);} - else - {g.drawString(lapTimes.length-i+": "+timeToText(lapTimes[i]),152,timeY + 30 + (i-36)*8);} + {g.drawString(lapTimes.length-i+": "+timeToText(lapTimes[i]),35,timeY + 30 + i*8);} + else + {g.drawString(lapTimes.length-i+": "+timeToText(lapTimes[i]),125,timeY + 30 + (i-18)*8);} } drawsecs(); }