Update stopwatch.js

Fixed bug where one could reset lap log even though timer is running
master
Red-The-Hunter 2020-03-28 12:14:40 +08:00 committed by GitHub
parent be539e5993
commit 06b98f0043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -92,11 +92,11 @@ setWatch(function() { // Lap
updateLabels(); updateLabels();
}, BTN1, {repeat:true}); }, BTN1, {repeat:true});
setWatch(function() { // Reset setWatch(function() { // Reset
Bangle.beep();
if (!started) { if (!started) {
tStart = tCurrent = Date.now(); Bangle.beep();
} tStart = tCurrent = Date.now();
lapTimes = []; lapTimes = [];
}
updateLabels(); updateLabels();
}, BTN3, {repeat:true}); }, BTN3, {repeat:true});