Fix Navigator.NavigationBar Title interactivity
Reviewed By: hedgerwang Differential Revision: D2755832 fb-gh-sync-id: 22f937ba271703d49f54acf2e3cdbf1994fad878
This commit is contained in:
parent
db69004300
commit
7377fb8baf
|
@ -153,11 +153,11 @@ var NavigatorNavigationBar = React.createClass({
|
|||
height: this.props.navigationStyles.General.TotalNavHeight,
|
||||
};
|
||||
var navState = this.props.navState;
|
||||
var components = COMPONENT_NAMES.map(function (componentName) {
|
||||
return navState.routeStack.map(
|
||||
this._getComponent.bind(this, componentName)
|
||||
);
|
||||
}, this);
|
||||
var components = navState.routeStack.map((route, index) =>
|
||||
COMPONENT_NAMES.map(componentName =>
|
||||
this._getComponent(componentName, route, index)
|
||||
)
|
||||
);
|
||||
|
||||
return (
|
||||
<View style={[styles.navBarContainer, navBarStyle, this.props.style]}>
|
||||
|
|
|
@ -78,17 +78,17 @@ var Stages = {
|
|||
Left: {
|
||||
Title: merge(BASE_STYLES.Title, { left: -SCREEN_WIDTH / 2, opacity: 0 }),
|
||||
LeftButton: merge(BASE_STYLES.LeftButton, { left: -SCREEN_WIDTH / 3, opacity: 0 }),
|
||||
RightButton: merge(BASE_STYLES.RightButton, { left: SCREEN_WIDTH / 3, opacity: 0 }),
|
||||
RightButton: merge(BASE_STYLES.RightButton, { opacity: 0 }),
|
||||
},
|
||||
Center: {
|
||||
Title: merge(BASE_STYLES.Title, { left: 0, opacity: 1 }),
|
||||
LeftButton: merge(BASE_STYLES.LeftButton, { left: 0, opacity: 1 }),
|
||||
RightButton: merge(BASE_STYLES.RightButton, { left: 2 * SCREEN_WIDTH / 3 - 0, opacity: 1 }),
|
||||
RightButton: merge(BASE_STYLES.RightButton, { opacity: 1 }),
|
||||
},
|
||||
Right: {
|
||||
Title: merge(BASE_STYLES.Title, { left: SCREEN_WIDTH / 2, opacity: 0 }),
|
||||
LeftButton: merge(BASE_STYLES.LeftButton, { left: 0, opacity: 0 }),
|
||||
RightButton: merge(BASE_STYLES.RightButton, { left: SCREEN_WIDTH, opacity: 0 }),
|
||||
RightButton: merge(BASE_STYLES.RightButton, { opacity: 0 }),
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue