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(fabric.Text): Improve path's angle detection for text on a path #6755

Merged
merged 4 commits into from
Dec 25, 2020

Conversation

asturur
Copy link
Member

@asturur asturur commented Dec 24, 2020

close #6750

We were calculating the angle as the angle between 2 points, both 0.1 pixels before and after the point were the text is postioned. This required a lot of accuracy on longer paths, and accuracy was costing more iterations on finding the points on the path.

This new calculation for the angle is technically more correct and does not depend on 2 points.

@asturur asturur merged commit 0327661 into master Dec 25, 2020
shanicerae pushed a commit to shanicerae/fabric.js that referenced this pull request Jan 16, 2021
@asturur asturur deleted the fix-path-angle branch January 16, 2021 17:23
@asturur asturur mentioned this pull request Jan 27, 2021
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.

Text on path incorrect tangent angle
1 participant