- fixed a bug where on higher font sizes the words would get cut off

- removed wpm limit
This commit is contained in:
Jack 2020-05-19 10:45:35 +01:00
parent 3ec77e4a4f
commit a848b11548
2 changed files with 4 additions and 3 deletions

View file

@ -207,7 +207,6 @@ function showWords() {
$("#words").append(w);
}
} else if (config.mode == "time") {
$("#words").css("height", "78px").css("overflow", "hidden");
for (let i = 0; i < wordsList.length; i++) {
let w = "<div class='word'>";
for (let c = 0; c < wordsList[i].length; c++) {
@ -216,6 +215,8 @@ function showWords() {
w += "</div>";
$("#words").append(w);
}
const wordHeight = $($(".word")[0]).outerHeight();
$("#words").css("height", wordHeight * 3 + 'px').css("overflow", "hidden");
}
updateActiveElement();
updateCaretPosition();
@ -460,7 +461,7 @@ function showResult() {
};
console.log(restartCount);
restartCount = 0;
if (stats.wpm > 0 && stats.wpm < 250 && stats.acc > 50 && stats.acc <= 100) {
if (stats.wpm > 0 && stats.wpm < 600 && stats.acc > 50 && stats.acc <= 100) {
if (firebase.auth().currentUser != null) {
db_getUserHighestWpm(config.mode, mode2).then(data => {
// console.log(`highest wpm for this mode is ${data}, current is ${stats.wpm}`);

View file

@ -187,6 +187,6 @@ function changeFontSize(fontSize) {
$("#words").addClass('size2');
$("#caret").addClass('size2');
}
updateCaretPosition();
saveConfigToCookie();
restartTest();
}