react-native-image-crop-picker: allowEmptySpaceAroundImage flag does nothing

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v0.22.0
  • react-native v0.55.4

Platform

Tell us to which platform this issue is related

  • iOS
  • Android

Expected behaviour

allowEmptySpaceAroundImage: false should allow cropper to crop below 100%, allowing empty space around the image.

Actual behaviour

allowEmptySpaceAroundImage flag does nothing

Steps to reproduce

  1. Place flag in your image picker params, along with cropping: true

  2. See that when you crop smaller, image snaps back to 100%.

Attachements

This commit introduces the option but the options doesn’t seem to be wired up.

https://github.com/ivpusic/react-native-image-crop-picker/commit/05662bef75e12d2b4625276571d4b61ba73b0e38

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (6 by maintainers)

Most upvoted comments

i was misunderstanding the functionality. What I need is to be able to pinch the image to become smaller than the bounding box, adding white space around it. That’s not what avoidEmptySpaceAroundImage does.

And how did you solve your problem @bwillem ?? I need the same functionality.

@CristopherJonas it’s not possible to create negative space both vertically and horizontally with this plugin. avoidEmptySapceAroundImage is sort of equivalent to resizeMode: contain.

avoidEmptySpaceAroundImage is unused since the switch to TOCropViewController.