mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-11 00:03:44 +08:00
sub second runs will now not have an extra data point on the graph
This commit is contained in:
parent
f904f6e32b
commit
a4c60fd387
1 changed files with 14 additions and 3 deletions
|
@ -1122,9 +1122,9 @@ function compareInput(showError) {
|
|||
currentCorrected = "";
|
||||
//last character typed, show result
|
||||
if (!resultVisible) {
|
||||
if (keypressPerSecond.length === 0) {
|
||||
keypressPerSecond.push(currentKeypress);
|
||||
}
|
||||
// if (keypressPerSecond.length === 0) {
|
||||
// keypressPerSecond.push(currentKeypress);
|
||||
// }
|
||||
lastSecondNotRound = true;
|
||||
showResult();
|
||||
}
|
||||
|
@ -1711,6 +1711,12 @@ function showCrown() {
|
|||
let resultCalculating = false;
|
||||
|
||||
function showResult(difficultyFailed = false) {
|
||||
console.log(keypressPerSecond);
|
||||
console.log(errorsPerSecond);
|
||||
console.log(wpmHistory);
|
||||
console.log(rawHistory);
|
||||
console.log("-");
|
||||
|
||||
resultCalculating = true;
|
||||
resultVisible = true;
|
||||
testEnd = performance.now();
|
||||
|
@ -1896,6 +1902,11 @@ function showResult(difficultyFailed = false) {
|
|||
|
||||
wpmOverTimeChart.data.labels = labels;
|
||||
|
||||
console.log(keypressPerSecond);
|
||||
console.log(errorsPerSecond);
|
||||
console.log(wpmHistory);
|
||||
console.log(rawHistory);
|
||||
|
||||
let rawWpmPerSecondRaw = keypressPerSecond.map((f) =>
|
||||
Math.round((f.count / 5) * 60)
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue