mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-29 04:45:19 +08:00
Skip initializing the gesture properties if no width or height are available
This commit is contained in:
@@ -470,6 +470,14 @@ class StackViewLayout extends React.Component {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We can't run the gesture if width or height layout is unavailable
|
||||||
|
if (
|
||||||
|
this.props.transitionProps.layout.width.__getValue() === 0 ||
|
||||||
|
this.props.transitionProps.layout.height.__getValue() === 0
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (this._isMotionVertical()) {
|
if (this._isMotionVertical()) {
|
||||||
this._prepareGestureVertical();
|
this._prepareGestureVertical();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user