Skip to content

Commit bac909e

Browse files
committed
working solution
1 parent 658ac56 commit bac909e

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

example/CropImage.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ const CropImage = ({route, navigation}: CropImageProps): JSX.Element => {
4343
<Crop
4444
source={{uri}}
4545
imageSize={{width, height}}
46-
width={331}
47-
height={331}
48-
cropArea={{width: 232, height: 232}}
46+
width={300}
47+
height={300}
48+
cropArea={{width: 200, height: 150}}
49+
cropShape={'rect'}
50+
resizeMode={'contain'}
4951
onCrop={cropCallback => (crop = cropCallback)}
5052
/>
5153
<View style={styles.padding20} />

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@react-navigation/stack": "^5.14.5",
1818
"react": "17.0.1",
1919
"react-native": "0.64.2",
20-
"react-native-avatar-crop": "^0.0.4",
20+
"react-native-avatar-crop": "^0.0.5",
2121
"react-native-gesture-handler": "^1.10.3",
2222
"react-native-image-picker": "^4.0.6",
2323
"react-native-image-size": "^1.1.3",

example/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5601,10 +5601,10 @@ react-is@^16.13.0, react-is@^16.7.0, react-is@^16.8.1:
56015601
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
56025602
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
56035603

5604-
react-native-avatar-crop@^0.0.4:
5605-
version "0.0.4"
5606-
resolved "https://registry.yarnpkg.com/react-native-avatar-crop/-/react-native-avatar-crop-0.0.4.tgz#11ce727e8fdee724662d89f216c8f48058e16c56"
5607-
integrity sha512-AKKjNOiamUOt1N6Et/FXyHZoYfZU6GZwJ7sMO+68KGAZFAm0UW7ZdT1l463WFG3SOtKipc6Ih1MxRvYjTMtp1Q==
5604+
react-native-avatar-crop@^0.0.5:
5605+
version "0.0.5"
5606+
resolved "https://registry.yarnpkg.com/react-native-avatar-crop/-/react-native-avatar-crop-0.0.5.tgz#46b04a791dcfcd15ae0e483d3716cc936a3dcaf0"
5607+
integrity sha512-3rZjgn9vC41jj9bO0GdwNcLQmAYodbG3pQWmMDfP3ddUO9sL93zEOm3E/ZSj4N3/5LBUCGW66euiHZlwAfu0og==
56085608

56095609
react-native-codegen@^0.0.6:
56105610
version "0.0.6"

package/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-avatar-crop",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"description": "Crop component to crop profile images",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)