mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-15 09:16:35 +08:00
added doc for image resizeMode
Summary:
based on 62e8ddc205/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
This commit is contained in:
committed by
facebook-github-bot-9
parent
53d18c83c8
commit
edc318fcb9
@@ -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']),
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user