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: Adding support for objectFit a partial equivalent to the resizeMode style and prop of <Image>. #34576

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: flow
  • Loading branch information
gedeagas committed Sep 2, 2022
commit 4add60cd23e8bb1d2e7fb8603cb20c896d8f3def
3 changes: 3 additions & 0 deletions Libraries/Image/Image.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,12 @@ const BaseImage = (props: ImagePropsType, forwardedRef) => {
ref: forwardedRef,
};

// $FlowFixMe[prop-missing]
const objectFit =
convertObjectFitToResizeMode(props.objectFit) ||
// $FlowFixMe[prop-missing]
convertObjectFitToResizeMode(style.objectFit);
// $FlowFixMe[prop-missing]
const resizeMode = objectFit || props.resizeMode || style.resizeMode;

return (
Expand Down