Fix: over typing error

This commit is contained in:
2019-05-17 07:35:57 +09:00
parent 286aa2261d
commit 1a7789c4c1
+16 -8
View File
@@ -233,13 +233,13 @@ var TypingTest = {
initTypingData: function() {
var typingTextMan = new TypingTextManager();
// var typingPracticeContents = [ "꿰뚫다" , "워머신", "홧김에" ]; // for debug
var typingPracticeContents = this.getTypingTestContents();
var typingPracticeContents = [ "꿰뚫다" , "워머신", "홧김에" ];
// console.log(typingPracticeContents);
typingTextMan.makeTestContents(typingPracticeContents);
var wordCountForStage = TypingTest.WORD_COUNT_FOR_STAGE;
if(isDebugMode())
wordCountForStage = 3;
// if(isDebugMode())
// wordCountForStage = 3;
typingTextMan.slice(0, wordCountForStage);
this.typingRandomContents = typingTextMan.getContents();
// console.log(this.typingRandomContents);
@@ -464,10 +464,20 @@ var TypingTest = {
}
}
// over typing
if(inputLength > typingLength) {
highlightKey = "Backspace";
}
// complete typing
else if(inputContent == typingContent) {
highlightKey = "Enter";
}
// english typing test
if(isEnglishTypingApp()) {
// console.log("===== english");
// console.log("misspelledIndex : " + misspelledIndex);
else if(isEnglishTypingApp()) {
console.log("===== english");
console.log("misspelledIndex : " + misspelledIndex);
if(inputLength == typingLength)
highlightKey = "Enter";
else if(misspelledIndex == -1)
@@ -480,8 +490,6 @@ var TypingTest = {
// korean typing test
else {
// console.log(misspelledIndex + " / " + typingContent[misspelledIndex]);
if(inputContent == typingContent)
highlightKey = "Enter";
else if(typingContent[misspelledIndex] == " ")
highlightKey = " ";
else {