Fix line break issues with evolution screen
This commit is contained in:
parent
0b773ee9c6
commit
13167a3901
|
@ -52,9 +52,10 @@ export default abstract class MessageUiHandler extends AwaitableUiHandler {
|
||||||
// Predetermine overflow line breaks to avoid words breaking while displaying
|
// Predetermine overflow line breaks to avoid words breaking while displaying
|
||||||
const textWords = text.split(' ');
|
const textWords = text.split(' ');
|
||||||
let lastLineCount = 1;
|
let lastLineCount = 1;
|
||||||
let newText = textWords[0];
|
let newText = '';
|
||||||
for (let w = 1; w < textWords.length; w++) {
|
for (let w = 0; w < textWords.length; w++) {
|
||||||
const nextWordText = `${newText} ${textWords[w]}`;
|
const nextWordText = `${newText} ${textWords[w]}`;
|
||||||
|
console.log(nextWordText);
|
||||||
if (textWords[w].includes('\n')) {
|
if (textWords[w].includes('\n')) {
|
||||||
newText = nextWordText;
|
newText = nextWordText;
|
||||||
lastLineCount++;
|
lastLineCount++;
|
||||||
|
|
Loading…
Reference in New Issue