Fix: convert space to Space

This commit is contained in:
2019-05-16 09:31:10 +09:00
parent beec67a1e9
commit 431e3a8881
+25 -24
View File
@@ -395,8 +395,6 @@ var TypingTest = {
if(this.typingIndex == this.typingContentLength)
this.gameOver();
// this.goResult();
// this.state.start('TypingTestResult');
return;
}
@@ -443,10 +441,12 @@ var TypingTest = {
},
getHighlioghtKey: function(inputContent, typingContent) {
var highlightKey = "";
var inputLength = inputContent.length;
var typingLength = typingContent.length;
console.log("inputLength : " + inputLength + " / " + inputContent);
console.log("typingLength : " + typingLength + " / " + typingContent);
// console.log("inputLength : " + inputLength + " / " + inputContent);
// console.log("typingLength : " + typingLength + " / " + typingContent);
if(inputLength == typingLength)
return undefined;
@@ -460,37 +460,38 @@ var TypingTest = {
// english typing test
if(isEnglishTypingApp()) {
console.log("===== english");
console.log("misspelledIndex : " + misspelledIndex);
// console.log("===== english");
// console.log("misspelledIndex : " + misspelledIndex);
if(misspelledIndex == -1)
return typingContent[inputLength];
highlightKey = typingContent[inputLength];
else if(misspelledIndex > -1)
highlightKey = "Backspace";
else
highlightKey = typingContent[misspelledIndex];
}
// korean typing test
else {
if(misspelledIndex > -1)
return "Backspace";
return typingContent[misspelledIndex];
}
var inputIndex = inputContent.length - 1;
var inputLetter = inputContent[inputIndex];
var typingLetter = typingContent[inputIndex];
// console.log("inputLetter : " + inputLetter);
// console.log("typingLetter : " + typingLetter);
// korean typing test
if(misspelledIndex > -1)
return "Backspace";
var inputIndex = inputContent.length - 1;
var inputLetter = inputContent[inputIndex];
var typingLetter = typingContent[inputIndex];
console.log("inputLetter : " + inputLetter);
console.log("typingLetter : " + typingLetter);
var typingAlphabet = "";
if(isKoreanTypingApp()) {
var typingAlphabet = "";
// var inputLetterAlphabets = StringUtil.toKoreanAlphabets(inputContent[inputIndex]);
// var typingLetterAlphabets = StringUtil.toKoreanAlphabets(typingContent[inputIndex]);
// console.log("inputLetterAlphabets : " + inputLetterAlphabets);
// console.log("typingLetterAlphabets : " + typingLetterAlphabets);
} else {
}
return "a";
if(highlightKey == " ")
highlightKey = "Space";
return highlightKey;
},
hideHighlightKey: function(highlightKey) {