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

Extract FlexLayoutProcessor to a standalone module #53

Closed
lojjic opened this issue Jun 5, 2020 · 0 comments
Closed

Extract FlexLayoutProcessor to a standalone module #53

lojjic opened this issue Jun 5, 2020 · 0 comments

Comments

@lojjic
Copy link
Collaborator

lojjic commented Jun 5, 2020

Other folks are wanting to do flexbox layout using Troika's text implementation, but they run into the same problems I did for troika-3d-ui with the async nature of the text layout and Yoga's need for measureText to be synchronous.

It occured to me that FlexLayoutProcessor.js is very close to being standalone, and could be exposed on its own to let people just call requestFlexLayout() with their own style tree. It would run in the worker alongside the text processor, have access to text measurement, and users could apply the result to their main thread objects.

I'm thinking this has a dependency on #47, and we'd create a new package troika-flexbox-layout or similar that just has the flexbox processing code and no other troika framework deps.

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

No branches or pull requests

1 participant