@@ -48,16 +48,16 @@ export default class PhotoUpload extends React.Component {
48
48
}
49
49
50
50
openImagePicker = ( ) => {
51
- this . setState ( { buttonDisabled : true } )
51
+ this . setState ( { buttonDisabled : true } )
52
52
if ( this . props . onStart ) this . props . onStart ( )
53
53
54
54
// get image from image picker
55
55
ImagePicker . showImagePicker ( this . options , async response => {
56
- this . setState ( { buttonDisabled : false } )
57
-
58
- let rotation = 0
59
- const { originalRotation } = response
56
+ this . setState ( { buttonDisabled : false } )
60
57
58
+ let rotation = 0
59
+ const { originalRotation} = response
60
+
61
61
62
62
if ( this . props . onResponse ) this . props . onResponse ( response )
63
63
@@ -76,16 +76,16 @@ export default class PhotoUpload extends React.Component {
76
76
}
77
77
78
78
let { maxHeight, maxWidth, quality, format } = this . state
79
-
79
+
80
80
//Determining rotation param
81
- if ( originalRotation === 90 ) {
82
- rotation = 90
83
- } else if ( originalRotation === 180 ) {
81
+ if ( originalRotation === 90 ) {
82
+ rotation = 90
83
+ } else if ( originalRotation === 180 ) {
84
84
//For a few images rotation is 180.
85
- rotation = - 180
86
- } else if ( originalRotation === 270 ) {
85
+ rotation = - 180
86
+ } else if ( originalRotation === 270 ) {
87
87
//When taking images with the front camera (selfie), the rotation is 270.
88
- rotation = - 90
88
+ rotation = - 90
89
89
}
90
90
// resize image
91
91
const resizedImageUri = await ImageResizer . createResizedImage (
@@ -141,4 +141,5 @@ export default class PhotoUpload extends React.Component {
141
141
</ View >
142
142
)
143
143
}
144
- }
144
+ }
145
+
0 commit comments