Fixes
This commit is contained in:
parent
da9a612ba7
commit
0c5d1928b3
|
|
@ -37,7 +37,9 @@ let mappings = {
|
||||||
let lessons = [
|
let lessons = [
|
||||||
"hello world",
|
"hello world",
|
||||||
"artseyio is the best layout ever!",
|
"artseyio is the best layout ever!",
|
||||||
"This is fun."
|
"this is fun.",
|
||||||
|
"i love this!",
|
||||||
|
"we can even type \"apostrophes\""
|
||||||
];
|
];
|
||||||
|
|
||||||
async function artseyDraw() {
|
async function artseyDraw() {
|
||||||
|
|
@ -107,17 +109,14 @@ async function setNextLetter() {
|
||||||
await sleep(1000);
|
await sleep(1000);
|
||||||
if (++currentLessonIndex > lessons.length-1)
|
if (++currentLessonIndex > lessons.length-1)
|
||||||
currentLessonIndex = 0;
|
currentLessonIndex = 0;
|
||||||
currentString = lessons[++currentLessonIndex];
|
currentString = lessons[currentLessonIndex];
|
||||||
await setTypingText(currentString);
|
await setTypingText(currentString);
|
||||||
currentLetterIndex = -1;
|
currentLetterIndex = -1;
|
||||||
await artseyReset();
|
await artseyReset();
|
||||||
await showKeyboard();
|
await showKeyboard();
|
||||||
// currentLetterIndex = -1;
|
|
||||||
// await artseyReset();
|
|
||||||
// await setTypingText(lessons['2']);
|
|
||||||
// currentLetter = currentString.charAt(0);
|
|
||||||
}
|
}
|
||||||
let prevIndex = currentLetterIndex-1;
|
let prevIndex = currentLetterIndex-1;
|
||||||
|
console.log("prevIndex: " + prevIndex + " currentLetterIndex: " + currentLessonIndex);
|
||||||
if (prevIndex >= -1 || currentLetterIndex === 0)
|
if (prevIndex >= -1 || currentLetterIndex === 0)
|
||||||
await unHighlightLetter(letterbox.children()[currentLetterIndex]);
|
await unHighlightLetter(letterbox.children()[currentLetterIndex]);
|
||||||
currentLetterIndex++;
|
currentLetterIndex++;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue