From 466bf89375fc649ffbe67e9e0c70075de736c8a1 Mon Sep 17 00:00:00 2001 From: xxss0903 <353768356@qq.com> Date: Sat, 28 Dec 2024 13:09:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=20#12=20=E4=BF=AE=E6=94=B9=E5=A5=87?= =?UTF-8?q?=E6=95=B0=E5=92=8C=E5=81=B6=E6=95=B0=E7=9A=84=E8=A7=92=E5=BA=A6?= =?UTF-8?q?=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/DrawCompanyUtils.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/utils/DrawCompanyUtils.ts b/src/utils/DrawCompanyUtils.ts index 5c58830..78f0e3f 100644 --- a/src/utils/DrawCompanyUtils.ts +++ b/src/utils/DrawCompanyUtils.ts @@ -64,7 +64,12 @@ export class DrawCompanyUtils { // 计算字符位置时考虑椭圆文字调整 if (company.adjustEllipseText) { - const halfCharCount = (characterCount + 1) / 2 + let halfCharCount = 0 + if(characterCount % 2 !== 0){ + halfCharCount = characterCount / 2 + }else{ + halfCharCount = (characterCount + 1) / 2 + } characters.forEach((char, index) => { // 计算当前字符的角度,包含椭圆调整