Fix handling of negative flex gap (#1405)

Summary:
X-link: https://github.com/facebook/react-native/pull/39596

Pull Request resolved: https://github.com/facebook/yoga/pull/1405

I noticed that we weren't clamping negative flex gap values to zero. This fixes that bug.

Reviewed By: rshest

Differential Revision: D49530494

fbshipit-source-id: 069db7312f72a085c5c4b01ead7bc66a353a07e5
This commit is contained in:
Nick Gerleman
2023-09-30 21:09:13 -07:00
committed by Facebook GitHub Bot
parent a8566a0150
commit b03a821884
6 changed files with 105 additions and 14 deletions

View File

@@ -231,8 +231,7 @@ class YG_EXPORT Node : public ::YGNode {
FloatOptional getMarginForAxis(
const FlexDirection axis,
const float widthSize) const;
FloatOptional getGapForAxis(const FlexDirection axis, const float widthSize)
const;
float getGapForAxis(const FlexDirection axis, const float widthSize) const;
// Setters
void setContext(void* context) {