Skip to content

Commit

Permalink
fix: #12 修改奇数和偶数的角度计算
Browse files Browse the repository at this point in the history
  • Loading branch information
xxss0903 committed Dec 28, 2024
1 parent e2c7834 commit 466bf89
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/utils/DrawCompanyUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
// 计算当前字符的角度,包含椭圆调整
Expand Down

0 comments on commit 466bf89

Please sign in to comment.