mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 22:50:10 +08:00
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:
committed by
Facebook Github Bot
parent
181b42bfce
commit
0196654f29
@@ -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};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user