Default position to NaN

Summary: The position record defaulted to 0, which was wrong. No it defaults to NaN, which is the same as not having a value at all.

Reviewed By: emilsjolander

Differential Revision: D7009783

fbshipit-source-id: 83810da87e983f8d4d3e428f1f5fab0928bce58d
This commit is contained in:
Daniel Büchele
2018-02-16 07:19:57 -08:00
committed by Facebook Github Bot
parent c5371aca64
commit b3436d5eba
3 changed files with 11 additions and 10 deletions

View File

@@ -61,7 +61,12 @@ const r: LayoutRecordT = Record({
padding: PositionRecord(),
margin: PositionRecord(),
border: PositionRecord(),
position: PositionRecord(),
position: PositionRecord({
left: NaN,
top: NaN,
right: NaN,
bottom: NaN,
}),
positionType: yoga.POSITION_TYPE_RELATIVE,
flexWrap: yoga.WRAP_NO_WRAP,
flexBasis: 'auto',