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

added pathSide property to text on path #7259

Merged
merged 5 commits into from
Aug 8, 2021
Merged

added pathSide property to text on path #7259

merged 5 commits into from
Aug 8, 2021

Conversation

melchiar
Copy link
Member

Here's my newest implementation of the side property for text on a path. Note that I've used the name side to be consistent with the related SVG property, although SVG side is currently supported only in Firefox.

Feel free to test:
https://jsfiddle.net/melchiar/oLq91r2t/

@github-actions
Copy link
Contributor

github-actions bot commented Jul 29, 2021

Code Coverage Summary

> [email protected] coverage:report /home/runner/work/fabric.js/fabric.js
> nyc report --reporter=lcov --reporter=text

-----------|---------|----------|---------|---------|-----------------------------------------------
File       | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                             
-----------|---------|----------|---------|---------|-----------------------------------------------
All files  |   83.29 |    76.93 |   85.99 |   83.01 |                                               
 fabric.js |   83.29 |    76.93 |   85.99 |   83.01 | ...,29823,29948,30028-30093,30216,30315,30532 
-----------|---------|----------|---------|---------|-----------------------------------------------

@github-actions
Copy link
Contributor

github-actions bot commented Jul 29, 2021

Code Coverage Summary

> [email protected] coverage:report /home/runner/work/fabric.js/fabric.js
> nyc report --reporter=lcov --reporter=text

-----------|---------|----------|---------|---------|-----------------------------------------------
File       | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                             
-----------|---------|----------|---------|---------|-----------------------------------------------
All files  |   83.29 |    76.93 |   85.99 |   83.01 |                                               
 fabric.js |   83.29 |    76.93 |   85.99 |   83.01 | ...,29823,29948,30028-30093,30216,30315,30532 
-----------|---------|----------|---------|---------|-----------------------------------------------

* @type {String} 'left|right'
* @default
*/
side: 'left',
Copy link
Member

Choose a reason for hiding this comment

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

for the previous discussion, should we call this pathSide?

Copy link
Member Author

Choose a reason for hiding this comment

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

sounds good. I think let's change startOffset to pathStartOffset as well for the same reason

Copy link
Member

Choose a reason for hiding this comment

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

yes i agree is fresh enough that no one noticed it yet.

src/shapes/text.class.js Outdated Show resolved Hide resolved
src/shapes/text.class.js Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2021

Code Coverage Summary

> [email protected] coverage:report /home/runner/work/fabric.js/fabric.js
> nyc report --reporter=lcov --reporter=text

-----------|---------|----------|---------|---------|-----------------------------------------------
File       | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                             
-----------|---------|----------|---------|---------|-----------------------------------------------
All files  |   83.27 |     76.9 |   85.99 |   82.99 |                                               
 fabric.js |   83.27 |     76.9 |   85.99 |   82.99 | ...,29816,29941,30021-30086,30209,30308,30525 
-----------|---------|----------|---------|---------|-----------------------------------------------

@melchiar melchiar changed the title added side property to text on path added pathSide property to text on path Aug 5, 2021
@asturur
Copy link
Member

asturur commented Aug 8, 2021

i'm merging.
Can you follow up with a visual test?

@asturur asturur merged commit d94d98a into master Aug 8, 2021
@asturur asturur deleted the textpath-side branch August 8, 2021 20:22
@asturur asturur mentioned this pull request Aug 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.

2 participants