do not reset layout state if they are the same in NavigationTransitioner

Reviewed By: fred2028

Differential Revision: D3773370

fbshipit-source-id: 7999cada80361b68f77f2433c6d2194ee6d26c73
This commit is contained in:
Chace Liang
2016-08-26 10:43:43 -07:00
committed by Facebook Github Bot 0
parent ea3bb35db0
commit dadfe40f55

View File

@@ -187,7 +187,10 @@ class NavigationTransitioner extends React.Component<any, Props, State> {
_onLayout(event: any): void {
const {height, width} = event.nativeEvent.layout;
if (this.state.layout.initWidth === width &&
this.state.layout.initHeight === height) {
return;
}
const layout = {
...this.state.layout,
initHeight: height,