natysoz / expo-images-picker

Multiple Asset Photos Videos selecting package for Expo SDK
MIT License
95 stars 35 forks source link

features: 1) scale image along dominant axis and 2) support existing selection #65

Closed chris-chapin closed 1 year ago

chris-chapin commented 1 year ago

I have added 2 new features to the package and improved the documentation using CustomNavigator (because I had to read the code to understand how it worked).

First feature - resize the image based on its dominant axis.

I would like to change image size but rather than choose width or height, I will let the image size decide based on its dominant axis. Currently, if width set to 1024, and the image is portrait, the result will be 1024 x some number > 1024. If the image is landscape, the result will be 1024 x some number < 1024. This change ensures that 1024 will be applied to the largest dimension, thus the other dimension will always be smaller.

Second feature - select items that were previously selected.

The Settings optionally takes an array of items already selected and AssetsSelector selects those items (assuming they are found). The items are identified based on Asset.id. The client is responsible for saving the ids and passing them in on subsequent calls. It's common users will change their selection and they should be able to pick up where they left off instead of starting over.

chris-chapin commented 1 year ago

@natysoz please review, thanks :)

natysoz commented 1 year ago

checking

natysoz commented 1 year ago

please update package json version and we can merge and deploy