Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added objectFit style prop for Image #34585

Closed
wants to merge 3 commits into from

Conversation

cyrus25
Copy link
Contributor

@cyrus25 cyrus25 commented Sep 2, 2022

Summary

This adds objectFit style prop which is partially equivalent to resizeMode as requested in #34425

Changelog

[General] [Added] - Added objectFit style prop partially equivalent to resizeMode

Test Plan

<Image
 style={[{styles.image,"objectFit":"cover"}]}
 source={imgScr}
/>

@facebook-github-bot
Copy link
Contributor

Hi @cyrus25!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@react-native-bot react-native-bot added the Type: Enhancement A new feature or enhancement of an existing feature. label Sep 2, 2022
@analysis-bot
Copy link

analysis-bot commented Sep 2, 2022

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,634,909 -1,731
android hermes armeabi-v7a 7,046,701 -1,932
android hermes x86 7,936,774 -1,833
android hermes x86_64 7,908,614 -2,026
android jsc arm64-v8a 9,512,159 -768
android jsc armeabi-v7a 8,287,454 -768
android jsc x86 9,451,729 -754
android jsc x86_64 10,042,960 -758

Base commit: 12e5842
Branch: main

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 2, 2022
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@cyrus25 cyrus25 changed the title feat: Added objectFit prop for Image feat: Added objectFit style prop for Image Sep 2, 2022
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Sep 2, 2022
@gabrieldonadel
Copy link
Collaborator

@cyrus25 I believe we already have a PR for this, please check #34576

@cyrus25
Copy link
Contributor Author

cyrus25 commented Sep 2, 2022

@gabrieldonadel oh ok, so @necolas should I close this PR?

@facebook-github-bot
Copy link
Contributor

@jacdebug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 12e5842
Branch: main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. Type: Enhancement A new feature or enhancement of an existing feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants