1
0
Fork 0

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
master
Red-The-Hunter 2020-03-28 01:07:24 +08:00 committed by GitHub
parent b47b5f5a4f
commit ad67db1a4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -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();
}