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

🐛 Prevent breaking text before the first row #65

Merged
merged 1 commit into from
Oct 3, 2023
Merged

Conversation

ralfstx
Copy link
Member

@ralfstx ralfstx commented Oct 3, 2023

The layoutText function returns a frame and optionally a remainder containing the rows that did not fit into the available space.

If even the first row did not fit, this function would return an empty frame and a remainder containing all the content. This would result in rendering an empty frame. This empty frame is not only redundant, it could even contain a misleading anchor.

This commit prevents this situation by preventing a break before the first row of text.

The `layoutText` function returns a frame and optionally a remainder
containing the rows that did not fit into the available space.

If even the first row did not fit, this function would return an empty
frame and a remainder containing all the content. This would result in
rendering an empty frame. This empty frame is not only redundant, it
could even contain a misleading anchor.

This commit prevents this situation by preventing a break before the
first row of text.
@ralfstx ralfstx merged commit 122ddfa into main Oct 3, 2023
1 check passed
@ralfstx ralfstx deleted the no-empty-frame branch October 3, 2023 13:24
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.

1 participant