diff --git a/website/src/components/Playground/LayoutRecord.js b/website/src/components/Playground/LayoutRecord.js index 8bbb2f67..c1b06c79 100644 --- a/website/src/components/Playground/LayoutRecord.js +++ b/website/src/components/Playground/LayoutRecord.js @@ -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', diff --git a/website/src/components/Playground/YogaNode.js b/website/src/components/Playground/YogaNode.js index 8de95301..51475dcc 100644 --- a/website/src/components/Playground/YogaNode.js +++ b/website/src/components/Playground/YogaNode.js @@ -145,7 +145,7 @@ export default class YogaNode extends Component { try { root[`set${key[0].toUpperCase()}${key.substr(1)}`]( yoga[`EDGE_${direction.toUpperCase()}`], - layoutDefinition[key][direction] || 0, + layoutDefinition[key][direction], ); } catch (e) {} }); diff --git a/website/src/components/Playground/YogaPositionEditor.js b/website/src/components/Playground/YogaPositionEditor.js index 85d81042..9ea63cba 100644 --- a/website/src/components/Playground/YogaPositionEditor.js +++ b/website/src/components/Playground/YogaPositionEditor.js @@ -38,17 +38,15 @@ export default class YogaPositionEditor extends Component {
onChange(property, value.set('top', e.target.value))} />
onChange(property, value.set('left', e.target.value)) } @@ -56,9 +54,8 @@ export default class YogaPositionEditor extends Component { {property.toUpperCase()} onChange(property, value.set('right', e.target.value)) } @@ -66,9 +63,8 @@ export default class YogaPositionEditor extends Component {
onChange(property, value.set('bottom', e.target.value)) }