Fix: font, font family
This commit is contained in:
@@ -128,7 +128,31 @@ TypingTextManager.prototype.makeShortSentences = function(sentence) {
|
||||
for(var i = 0; i < wordCount; i++) {
|
||||
// console.log(words[i]);
|
||||
// console.log(shortSentences[sentenceIndex].length);
|
||||
// console.log(words[i]);
|
||||
|
||||
|
||||
|
||||
var wordLength = words[i].length;
|
||||
if(wordLength > TypingTextManager.SENTENCE_MAX_CHARACTER) {
|
||||
console.log(words[i]);
|
||||
if(shortSentences[sentenceIndex].legnth > 0)
|
||||
sentenceIndex++;
|
||||
|
||||
var loopCount = Math.ceil(wordLength / TypingTextManager.SENTENCE_MAX_CHARACTER);
|
||||
|
||||
for(var j = 0; j < loopCount; j++) {
|
||||
var startIndex = j * TypingTextManager.SENTENCE_MAX_CHARACTER;
|
||||
var endIndex = (j + 1) * TypingTextManager.SENTENCE_MAX_CHARACTER;
|
||||
var partialText = words[i].substring(startIndex, endIndex);
|
||||
// console.log(partialText);
|
||||
shortSentences[sentenceIndex] = partialText;
|
||||
sentenceIndex++;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(shortSentences[sentenceIndex].length + words[i].length < TypingTextManager.SENTENCE_MAX_CHARACTER)
|
||||
if(i < wordCount - 1)
|
||||
shortSentences[sentenceIndex] = shortSentences[sentenceIndex].concat(words[i], " ");
|
||||
@@ -181,4 +205,4 @@ TypingTextManager.ENGLISH_LETTER_RIGHT = [
|
||||
];
|
||||
|
||||
|
||||
TypingTextManager.SENTENCE_MAX_CHARACTER = 35; // 27;
|
||||
TypingTextManager.SENTENCE_MAX_CHARACTER = 28;
|
||||
Reference in New Issue
Block a user