From 477cce2ed60d3bfca5448fb2daaa529a690a514b Mon Sep 17 00:00:00 2001 From: zsviczian Date: Thu, 30 Dec 2021 19:10:31 +0100 Subject: [PATCH] fix: Text wrapping with grid (#4505) (#4506) --- src/element/textElement.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/element/textElement.ts b/src/element/textElement.ts index 43ccc40f..e6bd6193 100644 --- a/src/element/textElement.ts +++ b/src/element/textElement.ts @@ -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) {