Fix yg_positionType ordinals #1183

Closed
NickGerleman wants to merge 3 commits from fix-position-ordinal into main
NickGerleman commented 2022-12-05 11:20:37 -08:00 (Migrated from github.com)

Fixes #1179

fc88b2f774 shifted ordinals for the position enum, but only updated a limited set of code for the new values. Binding generation has since been fixed, but #1179 seems to be another case where the ordinal offsetting means that yg_positionType of a YogaLayout view does not work correctly.

Update the ordinals in accordance with the ordering in YogaPositionType which the integer value is converted to.

Using "static" (the new position type) directly gives a compilation error due to it being a reserved keyword, so I added it as "position_static" along with aliases to other properties with the same naming scheme for consistency.

Fixes #1179 https://github.com/facebook/yoga/commit/fc88b2f774f0ab9090d7ca15de6680f26d7285ad shifted ordinals for the position enum, but only updated a limited set of code for the new values. Binding generation has since been fixed, but #1179 seems to be another case where the ordinal offsetting means that `yg_positionType` of a `YogaLayout` view does not work correctly. Update the ordinals in accordance with the ordering in YogaPositionType which the integer value is converted to. Using "static" (the new position type) directly gives a compilation error due to it being a reserved keyword, so I added it as "position_static" along with aliases to other properties with the same naming scheme for consistency.
facebook-github-bot commented 2022-12-05 11:21:24 -08:00 (Migrated from github.com)

@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff [on Phabricator](https://www.internalfb.com/diff/D41741955).
facebook-github-bot commented 2022-12-05 11:46:13 -08:00 (Migrated from github.com)

@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff [on Phabricator](https://www.internalfb.com/diff/D41741955).

Pull request closed

Sign in to join this conversation.
No description provided.