BREAKING - Change aspect ratio to always be width/height
Summary: @public Aspect ratio being defined as width/height or height/width depending on the situation it was used in turned out to be very confusing. This diff makes aspect ratio always be defined as width/height irregardless of the usage. Differential Revision: D4339132 fbshipit-source-id: e5da32750b55ddaf6acaf1cbd7662d86f2b480c3
This commit is contained in:
committed by
Facebook Github Bot
parent
3d10ba5f72
commit
071f576db9
@@ -151,6 +151,9 @@ YG_NODE_STYLE_PROPERTY(float, MaxHeight, maxHeight);
|
||||
|
||||
// Yoga specific properties, not compatible with flexbox specification
|
||||
// Aspect ratio control the size of the undefined dimension of a node.
|
||||
// Aspect ratio is encoded as a floating point value width/height. e.g. A value of 2 leads to a node
|
||||
// with a width twice the size of its height while a value of 0.5 gives the opposite effect.
|
||||
//
|
||||
// - On a node with a set width/height aspect ratio control the size of the unset dimension
|
||||
// - On a node with a set flex basis aspect ratio controls the size of the node in the cross axis if
|
||||
// unset
|
||||
|
Reference in New Issue
Block a user