diff --git a/Libraries/Components/ActivityIndicatorIOS/ActivityIndicatorIOS.ios.js b/Libraries/Components/ActivityIndicatorIOS/ActivityIndicatorIOS.ios.js index a3f1fe6be..d6afa3e06 100644 --- a/Libraries/Components/ActivityIndicatorIOS/ActivityIndicatorIOS.ios.js +++ b/Libraries/Components/ActivityIndicatorIOS/ActivityIndicatorIOS.ios.js @@ -53,6 +53,12 @@ var ActivityIndicatorIOS = React.createClass({ 'small', 'large', ]), + /** + * Invoked on mount and layout changes with + * + * {nativeEvent: { layout: {x, y, width, height}}}. + */ + onLayout: PropTypes.func, }, getDefaultProps: function(): DefaultProps { @@ -65,10 +71,12 @@ var ActivityIndicatorIOS = React.createClass({ }, render: function() { - var {style, ...props} = this.props; + var {onLayout, style, ...props} = this.props; var sizeStyle = (this.props.size === 'large') ? styles.sizeLarge : styles.sizeSmall; return ( - + ); diff --git a/Libraries/Components/View/View.js b/Libraries/Components/View/View.js index bd7529e58..c3659e961 100644 --- a/Libraries/Components/View/View.js +++ b/Libraries/Components/View/View.js @@ -91,7 +91,9 @@ var View = React.createClass({ onStartShouldSetResponderCapture: PropTypes.func, /** - * Invoked on mount and layout changes with {x, y, width, height}. + * Invoked on mount and layout changes with + * + * {nativeEvent: { layout: {x, y, width, height}}}. */ onLayout: PropTypes.func, diff --git a/Libraries/Image/Image.ios.js b/Libraries/Image/Image.ios.js index f388468c4..45c1ad828 100644 --- a/Libraries/Image/Image.ios.js +++ b/Libraries/Image/Image.ios.js @@ -99,6 +99,12 @@ var Image = React.createClass({ * testing scripts. */ testID: PropTypes.string, + /** + * Invoked on mount and layout changes with + * + * {nativeEvent: { layout: {x, y, width, height}}}. + */ + onLayout: PropTypes.func, }, statics: { diff --git a/Libraries/Text/Text.js b/Libraries/Text/Text.js index dee0d8543..6e934a8e6 100644 --- a/Libraries/Text/Text.js +++ b/Libraries/Text/Text.js @@ -92,6 +92,12 @@ var Text = React.createClass({ * Used to locate this view in end-to-end tests. */ testID: React.PropTypes.string, + /** + * Invoked on mount and layout changes with + * + * {nativeEvent: { layout: {x, y, width, height}}}. + */ + onLayout: React.PropTypes.func, }, viewConfig: viewConfig,