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

View File

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

View File

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

View File

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

View File

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