Skip to content

fix: 修复来自内部反馈的边问题#2368

Merged
CWsuper merged 2 commits into
masterfrom
bugfix/round1-in-2026-Jan
Jan 23, 2026
Merged

fix: 修复来自内部反馈的边问题#2368
CWsuper merged 2 commits into
masterfrom
bugfix/round1-in-2026-Jan

Conversation

@DymoneLewis
Copy link
Copy Markdown
Collaborator

  1. 实现折线边路径始终正交
  2. 修复折线边拖拽过程中偶现斜线问题
  3. 圆角旁边出现突出线段问题

fix issue #2367

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jan 23, 2026

⚠️ No Changeset found

Latest commit: be975be

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

}
}

orthogonalizePath(points: Point[]): Point[] {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

折线正交矫正

// 修复:累计代价应基于 gScore[current] 而非 fScore[current]
const tentativeGScore =
fScore[current.id] + estimateDistance(current, neighbor)
(gScore[current.id] ?? 0) + estimateDistance(current, neighbor)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修复正交折线变斜线问题

if (orientation === '-') {
path += `L ${cur[0]} ${cur[1]} L ${next[0]} ${next[1]}`
// 仅移动到当前拐点,由下一次迭代决定如何从拐点继续(直线或圆角)
path += `L ${cornerPoint[0]} ${cornerPoint[1]}`
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修复折线圆角旁边出现小线段问题

@CWsuper CWsuper merged commit 95bba08 into master Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants