We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 813eeaa commit 3839f29Copy full SHA for 3839f29
src/index.js
@@ -22,11 +22,15 @@ export default class LinearGradient extends PureComponent {
22
height: 1,
23
};
24
25
- measure = ({ nativeEvent }) =>
+ measure = (event) => {
26
this.setState({
27
- width: nativeEvent.layout.width,
28
- height: nativeEvent.layout.height,
+ width: event.nativeEvent.layout.width,
+ height: event.nativeEvent.layout.height,
29
});
30
+ if (this.props.onLayout) {
31
+ this.props.onLayout(event);
32
+ }
33
34
35
getAngle = () => {
36
if (this.props.useAngle) {
0 commit comments