From 862b6570ee9681217dd19938d65392021efb0e55 Mon Sep 17 00:00:00 2001 From: Alon Schwarz Date: Tue, 16 Aug 2016 04:01:39 -0700 Subject: [PATCH] Add 'center' to the allowed values in Android Image.resizeMode proptype Reviewed By: foghina Differential Revision: D3703258 fbshipit-source-id: fc2546a8c2e595ec51416f3453a12d087cc68515 --- Libraries/Image/Image.android.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Libraries/Image/Image.android.js b/Libraries/Image/Image.android.js index b4d8a8c4b..ae2c8d5ef 100644 --- a/Libraries/Image/Image.android.js +++ b/Libraries/Image/Image.android.js @@ -144,8 +144,12 @@ var Image = React.createClass({ * * 'stretch': Scale width and height independently, This may change the * aspect ratio of the src. + * + * 'center': Scale the image down so that it is completely visible, + * if bigger than the area of the view. + * The image will not be scaled up. */ - resizeMode: PropTypes.oneOf(['cover', 'contain', 'stretch']), + resizeMode: PropTypes.oneOf(['cover', 'contain', 'stretch', 'center']), }, statics: {