Commit 67edcfe0 authored by Jim Cummins's avatar Jim Cummins

fix animation and small padding when in landscape

parent 8a1239d2
......@@ -18,6 +18,9 @@ let PickerItem = Picker.Item;
let width = Dimensions.get('window').width;
let height = Dimensions.get('window').height;
const longSide = width > height ? width : height;
const shortSide = width > height ? height : width;
export default class PickerAny extends React.Component {
static propTypes = {
......@@ -468,7 +471,7 @@ export default class PickerAny extends React.Component {
render(){
return (
<Animated.View style={[styles.picker, {
width: this.state.pickerWidth,
width: longSide,
height: this.state.pickerHeight,
bottom: this.state.slideAnim
}, this.state.style]}>
......@@ -485,7 +488,7 @@ export default class PickerAny extends React.Component {
onPress={this._pickerFinish.bind(this)}>{this.state.pickerBtnText}</Text>
</View>
</View>
<View style={styles.pickerWrap}>
<View style={[styles.pickerWrap, { width: this.state.pickerWidth }]}>
{this._renderWheel(this.state.pickerData)}
</View>
</Animated.View>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment