瀏覽代碼

Update textElement.ts

tim spaces at the end of fragments to improve center and right alignment.
zsviczian 1 年之前
父節點
當前提交
e9ab51c30e
共有 1 個文件被更改,包括 1 次插入1 次删除
  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) => {
   const push = (str: string) => {
     if (str.trim()) {
     if (str.trim()) {
-      lines.push(str);
+      lines.push(str.trim());
     }
     }
   };
   };