Skip to content

Commit

Permalink
add newline at the end of file
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamGold committed Jan 6, 2019
1 parent f4d67f0 commit 5bd12e5
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ export default class PhotoUpload extends React.Component {
}

openImagePicker = () => {
this.setState({ buttonDisabled: true })
this.setState({buttonDisabled: true})
if (this.props.onStart) this.props.onStart()

// get image from image picker
ImagePicker.showImagePicker(this.options, async response => {
this.setState({ buttonDisabled: false })

let rotation = 0
const { originalRotation } = response
this.setState({buttonDisabled: false})

let rotation = 0
const {originalRotation} = response


if (this.props.onResponse) this.props.onResponse(response)

Expand All @@ -76,16 +76,16 @@ export default class PhotoUpload extends React.Component {
}

let { maxHeight, maxWidth, quality, format } = this.state

//Determining rotation param
if (originalRotation === 90) {
rotation = 90
} else if (originalRotation === 180) {
if ( originalRotation === 90) {
rotation = 90
} else if (originalRotation === 180) {
//For a few images rotation is 180.
rotation = -180
} else if (originalRotation === 270) {
rotation = -180
} else if ( originalRotation === 270 ) {
//When taking images with the front camera (selfie), the rotation is 270.
rotation = -90
rotation = -90
}
// resize image
const resizedImageUri = await ImageResizer.createResizedImage(
Expand Down Expand Up @@ -141,4 +141,5 @@ export default class PhotoUpload extends React.Component {
</View>
)
}
}
}

0 comments on commit 5bd12e5

Please sign in to comment.