Skip to content

Commit

Permalink
Fix wrong calculation of width and height after device rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Constantine Vyrodov committed Sep 21, 2017
1 parent 86692f1 commit ed1976d
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 @@ -224,6 +222,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 ed1976d

Please sign in to comment.