Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: svg path element A command drawing abnormality #1874

Merged
merged 1 commit into from
Dec 20, 2024
Merged

Conversation

wang1212
Copy link
Member

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / Document optimization
  • TypeScript definition update
  • Refactoring
  • Performance improvement
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

fixed #1844

💡 Background and solution

When markerStartOffset/markerEndOffset are set for the path element, the processing of the A command differs between canvas and svg. svg directly offsets the last two parameters of the A command, while canvas appends an L command.

Considering the complexity of the A command, the logic of svg is kept consistent with canvas
to ensure that existing products that rely on this feature work properly.

https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d#elliptical_arc_curve

📝 Changelog

Language Changelog
🇺🇸 English fix: svg path element A command drawing abnormality
🇨🇳 Chinese fix: svg path 元素的 A 命令绘制异常

☑️ Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@wang1212 wang1212 merged commit 9ebc16b into release Dec 20, 2024
2 checks passed
@wang1212 wang1212 deleted the fix/svg-path-A branch December 20, 2024 06:36
wang1212 added a commit that referenced this pull request Dec 20, 2024
* fix: lineDash支持多位数组 (#1867)

* chore: add changeset

* fix: rendering error when line break appears at the beginning of text (#1871)

* docs: 修复异常示例

* refactor: reduce global redundant code (#1872)

* refactor: reduce global redundant code

* chore: add changeset

* fix: svg path element A command drawing abnormality (#1874)

* Version Packages (#1869)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: HuangLiangchen <[email protected]>
Co-authored-by: wang1212 <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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