Skip to content

Commit

Permalink
Split words
Browse files Browse the repository at this point in the history
  • Loading branch information
cutiful committed Mar 27, 2020
1 parent 79b890d commit c993b8a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ export function showHelp(canvasEl, ctx, width, height, text, size) {
}

fits--;

let lastSpace = line.slice(0, fits).lastIndexOf(" ");
if (lastSpace !== -1)
fits = lastSpace;
}
}

Expand Down

0 comments on commit c993b8a

Please sign in to comment.