-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Addresses this comment: #2296 (comment) This pull request adds the `center` value to `ImageResizeMode`. When set, it will center the image within its frame. If the image is larger than its frame, the image is downscaled while maintaining its aspect ratio. That is how the Android implementation works, too. Sorry, don't have time to write tests. 😢 Any reviewers should make sure `RCTTargetRect` returns the correct value when: - the image is smaller than its frame (ie: no downscaling needed) - the image is larger than its frame (should be downscaled to avoid clipping) Closes #8792 Differential Revision: D3586134 Pulled By: javache fbshipit-source-id: 78fb8e5928284003437dac2c9ad264fa584f73ec
- Loading branch information
1 parent
d343eaa
commit bee1180
Showing
4 changed files
with
35 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters