We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If we want to place a paragraph in a container, keeping it centered horizontally and vertically:
const container = new Rect({ x: 0, y: 0, width: 100, height: 100, display: 'flex', alignItems: 'center', justifyContent: 'center' }); const paragraph = new Text({ content: 'Line 1 \n Line 2 \n Line 3', }); container.appendChild(paragraph);
So we need the help of layout engine such as Yoga.
Other flex layout implementations:
The text was updated successfully, but these errors were encountered:
xiaoiver
No branches or pull requests
If we want to place a paragraph in a container, keeping it centered horizontally and vertically:
So we need the help of layout engine such as Yoga.
Other flex layout implementations:
The text was updated successfully, but these errors were encountered: