Fix: u+i verb bug

This commit is contained in:
2019-05-17 08:33:29 +09:00
parent 1a7789c4c1
commit 39c17546a9
2 changed files with 13 additions and 14 deletions
+1
View File
@@ -140,6 +140,7 @@ StringUtil.getMultiAlphabetFromJungsung = function(alphabet) {
multiJungsungList['ㅚ'] = ['ㅗ', 'ㅣ'];
multiJungsungList['ㅝ'] = ['ㅜ', 'ㅓ'];
multiJungsungList['ㅞ'] = ['ㅜ', 'ㅔ'];
multiJungsungList['ㅟ'] = ['ㅜ', 'ㅣ'];
multiJungsungList['ㅢ'] = ['ㅡ', 'ㅣ'];
return multiJungsungList[alphabet];
+12 -14
View File
@@ -233,8 +233,9 @@ var TypingTest = {
initTypingData: function() {
var typingTextMan = new TypingTextManager();
// var typingPracticeContents = [ "꿰뚫다" , "워머신", "홧김에" ]; // for debug
var typingPracticeContents = this.getTypingTestContents();
var typingPracticeContents = [ "십년이면 강산도 변한다." , "십년이면 강산도 변한다.", "십년이면 강산도 변한다." ]; // for debug
// var typingPracticeContents = [ "꿰뚫다" , "워머신", "홧김에" ]; // for debug
// console.log(typingPracticeContents);
typingTextMan.makeTestContents(typingPracticeContents);
var wordCountForStage = TypingTest.WORD_COUNT_FOR_STAGE;
@@ -446,11 +447,11 @@ var TypingTest = {
},
getHighlioghtKey: function(inputContent, typingContent) {
var highlightKey = "";
if(typingContent == undefined)
return undefined;
var highlightKey = "";
var inputIndex = inputContent.length - 1;
var inputLength = inputContent.length;
var typingLength = typingContent.length;
// console.log("inputLength : " + inputLength + " / " + inputContent);
@@ -476,24 +477,20 @@ var TypingTest = {
// english typing test
else if(isEnglishTypingApp()) {
console.log("===== english");
console.log("misspelledIndex : " + misspelledIndex);
if(inputLength == typingLength)
highlightKey = "Enter";
else if(misspelledIndex == -1)
highlightKey = typingContent[inputLength];
else if(misspelledIndex > -1)
highlightKey = "Backspace";
else
// console.log("===== english");
// console.log("misspelledIndex : " + misspelledIndex);
// console.log("inputIndex : " + inputIndex);
if(misspelledIndex > inputIndex)
highlightKey = typingContent[misspelledIndex];
else
highlightKey = "Backspace";
}
// korean typing test
else {
// console.log(misspelledIndex + " / " + typingContent[misspelledIndex]);
else if(typingContent[misspelledIndex] == " ")
if(typingContent[misspelledIndex] == " ")
highlightKey = " ";
else {
var inputIndex = inputContent.length - 1;
var inputLetter = "";
var typingLetter = "";
var typingNextLetter = "";
@@ -630,6 +627,7 @@ var TypingTest = {
// 입력할 글자에 종성이 있을 경우
else if(StringUtil.hasJongsung(typingLetter)) {
var typingLetterJongsung = StringUtil.jongsung(typingLetter);
// 입력한 글자의 종성과 입력할 글자의 종성이 같은 경우
if(StringUtil.jongsung(inputLetter) == typingLetterJongsung)
highlightKey = StringUtil.chosung(typingNextLetter);