Skip to content

Commit

Permalink
Merge pull request #581 from kostyaVyrodov/master
Browse files Browse the repository at this point in the history
Fix wrong calculation of width and height after device rotation
  • Loading branch information
Bart Arribe authored Sep 28, 2017
2 parents 1732e76 + ed1976d commit 0dbe73b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import {
ActivityIndicator
} from 'react-native'

const { width, height } = Dimensions.get('window')

/**
* Default styles
* @type {StyleSheetPropType}
Expand Down Expand Up @@ -230,6 +228,8 @@ export default class extends Component {
}

// Default: horizontal
const { width, height } = Dimensions.get('window')

initState.dir = props.horizontal === false ? 'y' : 'x'
initState.width = props.width || width
initState.height = props.height || height
Expand Down

0 comments on commit 0dbe73b

Please sign in to comment.