Fix sizing of non strech items
Summary: Fixes the sizing of items so that under most scenarios it calcultes its height by it's content for non exact measurings. This introduces a new useLegacyStretchBehaviour flag on the config to opt out of this change as it is breaking. See facebook/yoga#505 Closes https://github.com/facebook/yoga/pull/506 Reviewed By: astreet Differential Revision: D4954016 Pulled By: emilsjolander fbshipit-source-id: d28bd5d174cd76951fb94df85e3b0cfab7f81ff7
This commit is contained in:
committed by
Facebook Github Bot
parent
e3dbef7cbd
commit
203577724e
@@ -225,6 +225,11 @@ WIN_EXPORT void YGLog(YGLogLevel level, const char *message, ...);
|
||||
// If you want to avoid rounding - set PointScaleFactor to 0
|
||||
WIN_EXPORT void YGConfigSetPointScaleFactor(const YGConfigRef config, const float pixelsInPoint);
|
||||
|
||||
// Yoga previously had an error where containers would take the maximum space possible instead of the minimum
|
||||
// like they are supposed to. In practice this resulted in implicit behaviour similar to align-self: stretch;
|
||||
// Because this was such a long-standing bug we must allow legacy users to switch back to this behaviour.
|
||||
WIN_EXPORT void YGConfigSetUseLegacyStretchBehaviour(const YGConfigRef config, const bool useLegacyStretchBehaviour);
|
||||
|
||||
// YGConfig
|
||||
WIN_EXPORT YGConfigRef YGConfigNew(void);
|
||||
WIN_EXPORT void YGConfigFree(const YGConfigRef config);
|
||||
|
Reference in New Issue
Block a user