Skip to content

Commit

Permalink
fix: svg path element A command drawing abnormality (#1874)
Browse files Browse the repository at this point in the history
  • Loading branch information
wang1212 authored Dec 20, 2024
1 parent 244d6dd commit 9ebc16b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/long-clouds-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@antv/g-lite': patch
---

fix: svg path element A command drawing abnormality
6 changes: 5 additions & 1 deletion packages/g-lite/src/utils/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,11 @@ export function translatePathToString(
return `C ${params[1]} ${params[2]},${params[3]} ${params[4]},${params[5] + endOffsetXTemp} ${params[6] + endOffsetYTemp}`;

case 'A':
return `A ${params[1]} ${params[2]} ${params[3]} ${params[4]} ${params[5]} ${params[6] + endOffsetXTemp} ${params[7] + endOffsetYTemp}`;
return `A ${params[1]} ${params[2]} ${params[3]} ${params[4]} ${params[5]} ${params[6]} ${params[7]}${
useEndOffset
? ` L ${params[6] + endOffsetX},${params[7] + endOffsetY}`
: ''
}`;

case 'Z':
return 'Z';
Expand Down

0 comments on commit 9ebc16b

Please sign in to comment.