mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-25 12:55:41 +08:00
Updates from Wed 1 Apr
- (Xcode) Set indent=2 in all xcodeproj files. | Spencer Ahrens - [react-native] Fix dev menu keyboard shortcut in sample app | Ben Alpert - [ReactNative] Fix doc page for PushNotificationIOS | Eric Vicenti - [ReactNative] Improve <Image> docs | Christopher Chedeau - Add support for web-style data-uris | Felix Oghina - [react_native] Update AnimationsDebugModule to output more accurate FPS info | Andy Street - [ReactNative] Rename NavigationBar props | Eric Vicenti
This commit is contained in:
@@ -462,7 +462,7 @@ var Navigator = React.createClass({
|
||||
this._emitDidFocus(presentedIndex);
|
||||
this._removePoppedRoutes();
|
||||
if (AnimationsDebugModule) {
|
||||
AnimationsDebugModule.stopRecordingFps();
|
||||
AnimationsDebugModule.stopRecordingFps(Date.now());
|
||||
}
|
||||
this._hideOtherScenes(presentedIndex);
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ var NavigatorBreadcrumbNavigationBar = React.createClass({
|
||||
popToRoute: PropTypes.func,
|
||||
popToTop: PropTypes.func,
|
||||
}),
|
||||
navigationBarRouteMapper: PropTypes.shape({
|
||||
routeMapper: PropTypes.shape({
|
||||
rightContentForRoute: PropTypes.func,
|
||||
titleContentForRoute: PropTypes.func,
|
||||
iconForRoute: PropTypes.func,
|
||||
@@ -87,7 +87,7 @@ var NavigatorBreadcrumbNavigationBar = React.createClass({
|
||||
idStack: React.PropTypes.arrayOf(React.PropTypes.number),
|
||||
presentedIndex: React.PropTypes.number,
|
||||
}),
|
||||
navigationBarStyles: View.propTypes.style,
|
||||
style: View.propTypes.style,
|
||||
},
|
||||
|
||||
statics: {
|
||||
@@ -144,7 +144,7 @@ var NavigatorBreadcrumbNavigationBar = React.createClass({
|
||||
var titles = navState.routeStack.map(this._renderOrReturnTitle);
|
||||
var buttons = navState.routeStack.map(this._renderOrReturnRightButton);
|
||||
return (
|
||||
<View style={[styles.breadCrumbContainer, this.props.navigationBarStyles]}>
|
||||
<View style={[styles.breadCrumbContainer, this.props.style]}>
|
||||
{titles}
|
||||
{icons}
|
||||
{buttons}
|
||||
@@ -154,7 +154,7 @@ var NavigatorBreadcrumbNavigationBar = React.createClass({
|
||||
|
||||
_renderOrReturnBreadcrumb: function(route, index) {
|
||||
var uid = this.props.navState.idStack[index];
|
||||
var navBarRouteMapper = this.props.navigationBarRouteMapper;
|
||||
var navBarRouteMapper = this.props.routeMapper;
|
||||
var navOps = this.props.navigator;
|
||||
var alreadyRendered = this.refs['crumbContainer' + uid];
|
||||
if (alreadyRendered) {
|
||||
@@ -199,7 +199,7 @@ var NavigatorBreadcrumbNavigationBar = React.createClass({
|
||||
/>
|
||||
);
|
||||
}
|
||||
var navBarRouteMapper = this.props.navigationBarRouteMapper;
|
||||
var navBarRouteMapper = this.props.routeMapper;
|
||||
var titleContent = navBarRouteMapper.titleContentForRoute(
|
||||
navState.routeStack[index],
|
||||
this.props.navigator
|
||||
@@ -219,7 +219,7 @@ var NavigatorBreadcrumbNavigationBar = React.createClass({
|
||||
|
||||
_renderOrReturnRightButton: function(route, index) {
|
||||
var navState = this.props.navState;
|
||||
var navBarRouteMapper = this.props.navigationBarRouteMapper;
|
||||
var navBarRouteMapper = this.props.routeMapper;
|
||||
var uid = navState.idStack[index];
|
||||
var alreadyRendered = this.refs['rightContainer' + uid];
|
||||
if (alreadyRendered) {
|
||||
|
||||
@@ -46,7 +46,7 @@ var NavigatorNavigationBar = React.createClass({
|
||||
|
||||
propTypes: {
|
||||
navigator: React.PropTypes.object,
|
||||
navigationBarRouteMapper: React.PropTypes.shape({
|
||||
routeMapper: React.PropTypes.shape({
|
||||
Title: React.PropTypes.func.isRequired,
|
||||
LeftButton: React.PropTypes.func.isRequired,
|
||||
RightButton: React.PropTypes.func.isRequired,
|
||||
@@ -56,7 +56,7 @@ var NavigatorNavigationBar = React.createClass({
|
||||
idStack: React.PropTypes.arrayOf(React.PropTypes.number),
|
||||
presentedIndex: React.PropTypes.number,
|
||||
}),
|
||||
navigationBarStyles: View.propTypes.style,
|
||||
style: View.propTypes.style,
|
||||
},
|
||||
|
||||
statics: {
|
||||
@@ -133,7 +133,7 @@ var NavigatorNavigationBar = React.createClass({
|
||||
}, this);
|
||||
|
||||
return (
|
||||
<View style={[styles.navBarContainer, this.props.navigationBarStyles]}>
|
||||
<View style={[styles.navBarContainer, this.props.style]}>
|
||||
{components}
|
||||
</View>
|
||||
);
|
||||
@@ -145,7 +145,6 @@ var NavigatorNavigationBar = React.createClass({
|
||||
/*number*/index
|
||||
) /*object*/ {
|
||||
var navState = this.props.navState;
|
||||
var navBarRouteMapper = this.props.navigationBarRouteMapper;
|
||||
var uid = navState.idStack[index];
|
||||
var containerRef = componentName + 'Container' + uid;
|
||||
var alreadyRendered = this.refs[containerRef];
|
||||
@@ -160,7 +159,7 @@ var NavigatorNavigationBar = React.createClass({
|
||||
);
|
||||
}
|
||||
|
||||
var content = navBarRouteMapper[componentName](
|
||||
var content = this.props.routeMapper[componentName](
|
||||
navState.routeStack[index],
|
||||
this.props.navigator,
|
||||
index,
|
||||
|
||||
Reference in New Issue
Block a user