2015-02-07 updates

- Fixes reference to ReactPackager middleware | Tyler Smalley
- [ReactKit] Fix bug where <Text /> did not refresh (in RCTText) | Alex Akers
- Removed duplication in react-native.js | Nick Lockwood
- [ReactNative] Patch up ReactPerf to work again | Ben Alpert
This commit is contained in:
Christopher Chedeau 2015-02-07 11:22:53 -08:00
parent 9674c99a33
commit 462c7ed8ef
5 changed files with 36 additions and 48 deletions

View File

@ -8,6 +8,7 @@
var RKUIManager = require('NativeModulesDeprecated').RKUIManager;
var ReactIOSTagHandles = require('ReactIOSTagHandles');
var ReactPerf = require('ReactPerf');
var instantiateReactComponent = require('instantiateReactComponent');
var invariant = require('invariant');
@ -113,4 +114,10 @@ var ReactIOSMount = {
}
};
ReactIOSMount.renderComponent = ReactPerf.measure(
'ReactMount',
'_renderNewRootComponent',
ReactIOSMount.renderComponent
);
module.exports = ReactIOSMount;

View File

@ -5,49 +5,27 @@
*/
'use strict';
var Bundler = require('Bundler');
var ExpandingText = require('ExpandingText');
var Image = require('Image');
var ListView = require('ListView');
var ListViewDataSource = require('ListViewDataSource');
var NavigatorIOS = require('NavigatorIOS');
var StatusBarIOS = require('StatusBarIOS');
var PixelRatio = require('PixelRatio');
var React = require('React');
var ScrollView = require('ScrollView');
var SpinnerIOS = require('SpinnerIOS');
var StyleSheet = require('StyleSheet');
var Text = require('Text');
var TextInput = require('TextInput');
var TimerMixin = require('TimerMixin');
var TouchableHighlight = require('TouchableHighlight');
var TouchableWithoutFeedback = require('TouchableWithoutFeedback');
var View = require('View');
var invariant = require('invariant');
var ix = require('ix');
var ReactNative = {
...React,
Bundler,
ExpandingText,
Image,
ListView,
ListViewDataSource,
NavigatorIOS,
StatusBarIOS,
PixelRatio,
ScrollView,
SpinnerIOS,
StyleSheet,
Text,
TextInput,
TimerMixin,
TouchableHighlight,
TouchableWithoutFeedback,
View,
invariant,
ix,
...require('React'),
Bundler: require('Bundler'),
ExpandingText: require('ExpandingText'),
Image: require('Image'),
ListView: require('ListView'),
ListViewDataSource: require('ListViewDataSource'),
NavigatorIOS: require('NavigatorIOS'),
PixelRatio: require('PixelRatio'),
ScrollView: require('ScrollView'),
SpinnerIOS: require('SpinnerIOS'),
StatusBarIOS: require('StatusBarIOS'),
StyleSheet: require('StyleSheet'),
Text: require('Text'),
TextInput: require('TextInput'),
TimerMixin: require('TimerMixin'),
TouchableHighlight: require('TouchableHighlight'),
TouchableWithoutFeedback: require('TouchableWithoutFeedback'),
View: require('View'),
invariant: require('invariant'),
ix: require('ix'),
};
module.exports = ReactNative;

View File

@ -6,7 +6,7 @@
@property (nonatomic, copy) NSAttributedString *attributedText;
@property (nonatomic, assign) NSLineBreakMode lineBreakMode;
@property (nonatomic, assign) NSInteger numberOfLines;
@property (nonatomic, assign) NSUInteger numberOfLines;
- (NSNumber *)reactTagAtPoint:(CGPoint)point;

View File

@ -40,16 +40,18 @@
- (void)setAttributedText:(NSAttributedString *)attributedText
{
[_textStorage setAttributedString:attributedText];
[self setNeedsDisplay];
}
- (NSInteger)numberOfLines
- (NSUInteger)numberOfLines
{
return _textContainer.maximumNumberOfLines;
}
- (void)setNumberOfLines:(NSInteger)numberOfLines
- (void)setNumberOfLines:(NSUInteger)numberOfLines
{
_textContainer.maximumNumberOfLines = MAX(0, numberOfLines);
_textContainer.maximumNumberOfLines = numberOfLines;
[self setNeedsDisplay];
}
- (NSLineBreakMode)lineBreakMode
@ -60,6 +62,7 @@
- (void)setLineBreakMode:(NSLineBreakMode)lineBreakMode
{
_textContainer.lineBreakMode = lineBreakMode;
[self setNeedsDisplay];
}
- (void)layoutSubviews

View File

@ -67,7 +67,7 @@ function openStackFrameInEditor(req, res, next) {
}
function getAppMiddleware(options) {
return ReactPackager.catalystMiddleware({
return ReactPackager.middleware({
dev: true,
projectRoot: options.projectRoot,
blacklistRE: blacklist(false),