Fix: over typing error
This commit is contained in:
@@ -233,13 +233,13 @@ var TypingTest = {
|
|||||||
initTypingData: function() {
|
initTypingData: function() {
|
||||||
var typingTextMan = new TypingTextManager();
|
var typingTextMan = new TypingTextManager();
|
||||||
|
|
||||||
|
// var typingPracticeContents = [ "꿰뚫다" , "워머신", "홧김에" ]; // for debug
|
||||||
var typingPracticeContents = this.getTypingTestContents();
|
var typingPracticeContents = this.getTypingTestContents();
|
||||||
var typingPracticeContents = [ "꿰뚫다" , "워머신", "홧김에" ];
|
|
||||||
// console.log(typingPracticeContents);
|
// console.log(typingPracticeContents);
|
||||||
typingTextMan.makeTestContents(typingPracticeContents);
|
typingTextMan.makeTestContents(typingPracticeContents);
|
||||||
var wordCountForStage = TypingTest.WORD_COUNT_FOR_STAGE;
|
var wordCountForStage = TypingTest.WORD_COUNT_FOR_STAGE;
|
||||||
if(isDebugMode())
|
// if(isDebugMode())
|
||||||
wordCountForStage = 3;
|
// wordCountForStage = 3;
|
||||||
typingTextMan.slice(0, wordCountForStage);
|
typingTextMan.slice(0, wordCountForStage);
|
||||||
this.typingRandomContents = typingTextMan.getContents();
|
this.typingRandomContents = typingTextMan.getContents();
|
||||||
// console.log(this.typingRandomContents);
|
// 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
|
// english typing test
|
||||||
if(isEnglishTypingApp()) {
|
else if(isEnglishTypingApp()) {
|
||||||
// console.log("===== english");
|
console.log("===== english");
|
||||||
// console.log("misspelledIndex : " + misspelledIndex);
|
console.log("misspelledIndex : " + misspelledIndex);
|
||||||
if(inputLength == typingLength)
|
if(inputLength == typingLength)
|
||||||
highlightKey = "Enter";
|
highlightKey = "Enter";
|
||||||
else if(misspelledIndex == -1)
|
else if(misspelledIndex == -1)
|
||||||
@@ -480,8 +490,6 @@ var TypingTest = {
|
|||||||
// korean typing test
|
// korean typing test
|
||||||
else {
|
else {
|
||||||
// console.log(misspelledIndex + " / " + typingContent[misspelledIndex]);
|
// console.log(misspelledIndex + " / " + typingContent[misspelledIndex]);
|
||||||
if(inputContent == typingContent)
|
|
||||||
highlightKey = "Enter";
|
|
||||||
else if(typingContent[misspelledIndex] == " ")
|
else if(typingContent[misspelledIndex] == " ")
|
||||||
highlightKey = " ";
|
highlightKey = " ";
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user