left: auto and alike #441

Open
opened 2017-02-24 12:55:21 -08:00 by arcanis · 3 comments
arcanis commented 2017-02-24 12:55:21 -08:00 (Migrated from github.com)

The API currently doesn't understand setting left (and similar properties) to auto - it needs to be set to UNDEFINED instead. Perhaps it could be interesting to update it so that auto is consistently used accross all properties.

The API currently doesn't understand setting `left` (and similar properties) to `auto` - it needs to be set to `UNDEFINED` instead. Perhaps it could be interesting to update it so that `auto` is consistently used accross all properties.
emilsjolander commented 2017-03-02 02:49:45 -08:00 (Migrated from github.com)

Working on it 👍

Working on it 👍
ubald commented 2017-09-17 13:46:03 -07:00 (Migrated from github.com)

I think there is also a bit of confusion about YGUnitAuto vs YGUnitUndefined. Some properties that can only be set to YGUndefined (no auto setter) will have their getter report a unit of YGUnitAuto and others YGUnitUndefined.

I think there is also a bit of confusion about `YGUnitAuto` vs `YGUnitUndefined`. Some properties that can only be set to `YGUndefined` (no auto setter) will have their getter report a unit of `YGUnitAuto` and others `YGUnitUndefined`.
ubald commented 2017-09-17 13:50:23 -07:00 (Migrated from github.com)

Example:
In YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL:

node->style.instanceName[edge].unit = YGFloatIsUndefined(paramName) ? YGUnitUndefined : YGUnitPoint;

In YG_NODE_STYLE_PROPERTY_SETTER_UNIT_AUTO_IMPL:

node->style.instanceName.unit = YGFloatIsUndefined(paramName) ? YGUnitAuto : YGUnitPoint;
Example: In `YG_NODE_STYLE_EDGE_PROPERTY_UNIT_IMPL`: ``` node->style.instanceName[edge].unit = YGFloatIsUndefined(paramName) ? YGUnitUndefined : YGUnitPoint; ``` In `YG_NODE_STYLE_PROPERTY_SETTER_UNIT_AUTO_IMPL`: ``` node->style.instanceName.unit = YGFloatIsUndefined(paramName) ? YGUnitAuto : YGUnitPoint; ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DaddyFrosty/yoga#441
No description provided.