Преглед на файлове

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

zsviczian преди 3 години
родител
ревизия
477cce2ed6
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/element/textElement.ts

+ 1 - 1
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) {