Fabric: Using Infinity instead of Undefined in LayoutConstraints

Summary: `kFloatUndefined` means "no value here", but in this particular case, we have to have `Infinity` value that represents maximum available space.

Reviewed By: mdvacca

Differential Revision: D15155190

fbshipit-source-id: d2de20681ad04da7444331eff44b93d2bd0200e3
This commit is contained in:
Valentin Shergin
2019-04-30 16:34:59 -07:00
committed by Facebook Github Bot
parent 181b42bfce
commit 0196654f29

View File

@@ -7,6 +7,8 @@
#pragma once
#include <limits>
#include <folly/Hash.h>
#include <react/core/LayoutPrimitives.h>
#include <react/graphics/Geometry.h>
@@ -19,7 +21,8 @@ namespace react {
*/
struct LayoutConstraints {
Size minimumSize{0, 0};
Size maximumSize{kFloatUndefined, kFloatUndefined};
Size maximumSize{std::numeric_limits<Float>::infinity(),
std::numeric_limits<Float>::infinity()};
LayoutDirection layoutDirection{LayoutDirection::Undefined};
/*