Explorar o código

Update textElement.ts

tim spaces at the end of fragments to improve center and right alignment.
zsviczian hai 1 ano
pai
achega
e9ab51c30e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/element/textElement.ts

+ 1 - 1
src/element/textElement.ts

@@ -461,7 +461,7 @@ export const wrapText = (text: string, font: FontString, maxWidth: number) => {
 
   const push = (str: string) => {
     if (str.trim()) {
-      lines.push(str);
+      lines.push(str.trim());
     }
   };