@@ -78,7 +78,7 @@ class ImageCrop extends Component {
7878 this . _dimensionAfterZoom = imageDimensionsAfterZoom (
7979 { height : this . props . cropHeight , width : this . props . cropWidth } ,
8080 { height : this . state . imageHeight , width : this . state . imageWidth } ,
81- this . state . zoom
81+ this . state . zoom
8282 )
8383
8484 this . setState ( {
@@ -117,10 +117,10 @@ class ImageCrop extends Component {
117117 if ( newPosY < 0 ) newPosY = Number ( 0 )
118118
119119 var movement = movementFromZoom (
120- gestureState ,
121- { width : this . props . cropWidth , height : this . props . cropHeight } ,
122- { width : this . state . imageDimWidth , height : this . state . imageDimHeight } ,
123- { x : this . offsetX , y : this . offsetY } ,
120+ gestureState ,
121+ { width : this . props . cropWidth , height : this . props . cropHeight } ,
122+ { width : this . state . imageDimWidth , height : this . state . imageDimHeight } ,
123+ { x : this . offsetX , y : this . offsetY } ,
124124 this . state . zoom
125125 )
126126 this . setState ( { centerX : movement . x } )
@@ -137,7 +137,7 @@ class ImageCrop extends Component {
137137 let b = evt . nativeEvent . changedTouches [ 0 ] . locationY - evt . nativeEvent . changedTouches [ 1 ] . locationY
138138 let c = Math . sqrt ( a * a + b * b )
139139 this . zoomCurrentDistance = c . toFixed ( 1 )
140-
140+
141141 //what is the zoom level
142142 var screenDiagonal = Math . sqrt ( this . state . imageHeight * this . state . imageHeight + this . state . imageWidth * this . state . imageWidth )
143143 var distance = ( this . zoomCurrentDistance - this . zoomLastDistance ) / 400
@@ -167,7 +167,7 @@ class ImageCrop extends Component {
167167 this . _dimensionAfterZoom = imageDimensionsAfterZoom (
168168 { height : this . props . cropHeight , width : this . props . cropWidth } ,
169169 { height : this . state . imageHeight , width : this . state . imageWidth } ,
170- this . state . zoom
170+ this . state . zoom
171171 )
172172
173173 this . setState ( {
@@ -178,7 +178,7 @@ class ImageCrop extends Component {
178178 render ( ) {
179179 return (
180180 < View { ...this . _panResponder . panHandlers } >
181- < Surface width = { this . props . cropWidth } height = { this . props . cropHeight } pixelRatio = { this . props . pixelRatio } ref = "cropit" >
181+ < Surface width = { this . props . cropWidth } height = { this . props . cropHeight } pixelRatio = { this . props . pixelRatio } backgroundColor = "transparent" ref = "cropit" >
182182 < GLImage
183183 source = { { uri : this . props . image } }
184184 imageSize = { { height : this . state . imageHeight , width : this . state . imageWidth } }
@@ -218,4 +218,4 @@ ImageCrop.propTypes = {
218218 type : React . PropTypes . string ,
219219 format : React . PropTypes . string ,
220220}
221- module . exports = ImageCrop
221+ module . exports = ImageCrop
0 commit comments