From edc318fcb9c2360e67dfa3d2d48462d6bacda3c0 Mon Sep 17 00:00:00 2001 From: Qiao Liang Date: Tue, 15 Dec 2015 17:33:37 -0800 Subject: [PATCH] added doc for image resizeMode Summary: based on https://github.com/facebook/react-native/blob/62e8ddc20561a39c3c839ab9f83c95493df117c0/ReactAndroid/src/main/java/com/facebook/react/views/image/ImageResizeMode.java and http://developer.android.com/reference/android/widget/ImageView.ScaleType.html Closes https://github.com/facebook/react-native/pull/4799 Reviewed By: svcscm Differential Revision: D2762795 Pulled By: androidtrunkagent fb-gh-sync-id: 2906c9f334f0afd4d58d4864a2b8472a5a871fc0 --- Libraries/Image/Image.ios.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Libraries/Image/Image.ios.js b/Libraries/Image/Image.ios.js index 2b649bf9c..8eda0cc8c 100644 --- a/Libraries/Image/Image.ios.js +++ b/Libraries/Image/Image.ios.js @@ -102,6 +102,17 @@ var Image = React.createClass({ /** * Determines how to resize the image when the frame doesn't match the raw * image dimensions. + * + * 'cover': Scale the image uniformly (maintain the image's aspect ratio) + * so that both dimensions (width and height) of the image will be equal + * to or larger than the corresponding dimension of the view (minus padding). + * + * 'contain': Scale the image uniformly (maintain the image's aspect ratio) + * so that both dimensions (width and height) of the image will be equal to + * or less than the corresponding dimension of the view (minus padding). + * + * 'stretch': Scale width and height independently, This may change the + * aspect ratio of the src. */ resizeMode: PropTypes.oneOf(['cover', 'contain', 'stretch']), /**