From 7377fb8baf4b78db9be121bc8189d99ff5f08efa Mon Sep 17 00:00:00 2001 From: Oleg Lokhvitsky Date: Tue, 15 Dec 2015 12:01:27 -0800 Subject: [PATCH] Fix Navigator.NavigationBar Title interactivity Reviewed By: hedgerwang Differential Revision: D2755832 fb-gh-sync-id: 22f937ba271703d49f54acf2e3cdbf1994fad878 --- .../Navigator/NavigatorNavigationBar.js | 10 +++++----- .../Navigator/NavigatorNavigationBarStylesIOS.js | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Libraries/CustomComponents/Navigator/NavigatorNavigationBar.js b/Libraries/CustomComponents/Navigator/NavigatorNavigationBar.js index a5be41abf..17d36a14d 100644 --- a/Libraries/CustomComponents/Navigator/NavigatorNavigationBar.js +++ b/Libraries/CustomComponents/Navigator/NavigatorNavigationBar.js @@ -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 ( diff --git a/Libraries/CustomComponents/Navigator/NavigatorNavigationBarStylesIOS.js b/Libraries/CustomComponents/Navigator/NavigatorNavigationBarStylesIOS.js index 9e1467751..1ae2a94ea 100644 --- a/Libraries/CustomComponents/Navigator/NavigatorNavigationBarStylesIOS.js +++ b/Libraries/CustomComponents/Navigator/NavigatorNavigationBarStylesIOS.js @@ -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 }), }, };