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

Expose a way to determine if a text node will truncate for a given constrained size #trivial #1177

Merged
merged 2 commits into from
Oct 21, 2018

Conversation

maicki
Copy link
Contributor

@maicki maicki commented Oct 17, 2018

  • Expose textLayoutForConstraint:, unavailable for ASTextNode for now
  • Refactor compatibleLayoutWithContainer:text: into a static method

Copy link
Member

@Adlai-Holler Adlai-Holler left a comment

Choose a reason for hiding this comment

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

Why the switch from class method to static function? It's trivially faster but is that worth it? Remove commented code.

@maicki
Copy link
Contributor Author

maicki commented Oct 17, 2018

@Adlai-Holler It's not due to performance, it's due to the reference of ASTextNode2. There will be a change coming up soon and that code change will help.

Removed commented out code.

@maicki maicki force-pushed the MSTextNodeAdditions branch 2 times, most recently from 547a716 to 01f83a0 Compare October 17, 2018 21:39
@maicki maicki changed the title Expose textLayoutForConstraint: #trivial Expose a way to determine if a text node will truncate for a given constrained size #trivial Oct 17, 2018
@ghost
Copy link

ghost commented Oct 18, 2018

🚫 CI failed with log

- Expose textLayoutForConstraint:, but make unavailable on ASTextNode
- Refactor compatibleLayoutWithContainer:text: into a static method
@maicki maicki merged commit 776e475 into master Oct 21, 2018
@ghost
Copy link

ghost commented Oct 22, 2018

🚫 CI failed with log

@maicki maicki deleted the MSTextNodeAdditions branch October 27, 2018 00:21
mikezucc pushed a commit to mikezucc/Texture that referenced this pull request Nov 7, 2018
…nstrained size #trivial (TextureGroup#1177)

* Expose textLayoutForConstraint:

- Expose textLayoutForConstraint:, but make unavailable on ASTextNode
- Refactor compatibleLayoutWithContainer:text: into a static method

* Instead of textLayoutForConstraint: expose shouldTruncateForConstrainedSize: in ASTextNode
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.

None yet

2 participants