Skip to content

feat(label): Add alignment and height options#44

Open
marcusorjames wants to merge 2 commits intoamratab:masterfrom
rocketcommerce:master
Open

feat(label): Add alignment and height options#44
marcusorjames wants to merge 2 commits intoamratab:masterfrom
rocketcommerce:master

Conversation

@marcusorjames
Copy link
Copy Markdown

This is referencing #39 and #7

I had a similar problem inheriting a codebase that used this library.

A requirement was for the text to be multiline and centered.

Multiline is achieved by multiplying up the height of the textLayer
Centering is achieved by leveraging the textLayer.alignmentMode

I have made these into properties that can be set.

I only needed it for bottom, but added it to top as well. Wasn't where to put center, guessing it might be the default renderTextIndexes.

Comments on variable naming and approach welcome, but thought that it might aid people with the same issue

Marcus Revington and others added 2 commits June 29, 2023 17:15
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