fix: Text wrapping with grid (#4505) (#4506)

This commit is contained in:
zsviczian 2021-12-30 19:10:31 +01:00 committed by GitHub
parent dd8e465304
commit 477cce2ed6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -262,7 +262,7 @@ export const wrapText = (
const currentWordWidth = getTextWidth(words[index], font);
// Start breaking longer words exceeding max width
if (currentWordWidth > maxWidth) {
if (currentWordWidth >= maxWidth) {
// push current line since the current word exceeds the max width
// so will be appended in next line
if (currentLine) {