Fix Navigator.NavigationBar Title interactivity

Reviewed By: hedgerwang

Differential Revision: D2755832

fb-gh-sync-id: 22f937ba271703d49f54acf2e3cdbf1994fad878
This commit is contained in:
Oleg Lokhvitsky 2015-12-15 12:01:27 -08:00 committed by facebook-github-bot-5
parent db69004300
commit 7377fb8baf
2 changed files with 8 additions and 8 deletions

View File

@ -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]}>

View File

@ -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 }),
},
};