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

Revert of PR #4712, restores text wrapping behavior #5093

Merged
merged 2 commits into from
Mar 15, 2021

Conversation

lawreka
Copy link
Contributor

@lawreka lawreka commented Mar 14, 2021

Resolves #5081

Changes:
Reverts PR #4712 and restores text wrapping behavior as seen in version 1.1.9.

Screenshots of the change:
Current rendering of 'Lorem ipsum dolor sit amet, consectetur adipiscing elit' in 100, 100 canvas:
Screenshot 2021-03-14 at 21 22 32
Fixed:
Screenshot 2021-03-14 at 21 19 50

Note this also re-introduces Issue #4652, future improvements should change how single words that exceed the length of a line can be handled by hyphenation or not.

PR Checklist

  • npm run lint passes

Inline documentation and unit tests unchanged

@welcome
Copy link

welcome bot commented Mar 14, 2021

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. And be sure to add yourself to the list of contributors on the readme page!

Copy link
Contributor

@outofambit outofambit left a comment

Choose a reason for hiding this comment

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

looks good to me! thank you @lawreka!!

@outofambit
Copy link
Contributor

@all-contributors please add @lawreka for code and ideas

@allcontributors
Copy link
Contributor

@outofambit

I've put up a pull request to add @lawreka! 🎉

let testWidth;
let words;
let totalHeight;
let shiftedY;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for your review @outofambit, but I think I made a mistake here... adding this shiftedY variable was part of the original PR that I'm reverting part of, but doesn't have to do with my fix, so I'm just going to push a small change to not touch this before this gets merged :)

Copy link
Contributor

Choose a reason for hiding this comment

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

tbh i just did a line by line comparison of this against the original PR :)

thanks for catching that!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did the same and didn't see it until after your approval either 😅 just pushed the fix, should be good 2 go now

@outofambit outofambit merged commit 19fa310 into processing:main Mar 15, 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.

Difference with text wrapping betwen 1.1.9 -> 1.2.0 and 1.3.0
2 participants