Skip to content

Remove global settings and instead pass a YGConfig struct to calculate layout #418

@emilsjolander

Description

@emilsjolander

We need a way to configure tree calculation. Two examples are:

  • Experiments
  • Point scale factor

Currently these are global settings. This works if your application only has one instance of yoga but in some cases you may be running different frameworks which both use yoga (maybe without knowing it) and they may want to configure such settings differently. This is not currently possible.

I suggest adding a variant of YGNodeCalculateLayout called YGNodeCalculateLayoutWithConfig which takes a YGConfig struct as a last parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions