mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-28 20:25:33 +08:00
[ReactNative] revert D2233419: 'Dynamic Text Sizes for Text component'
This commit is contained in:
@@ -30,7 +30,6 @@ var viewConfig = {
|
||||
validAttributes: merge(ReactNativeViewAttributes.UIView, {
|
||||
isHighlighted: true,
|
||||
numberOfLines: true,
|
||||
allowFontScaling: true,
|
||||
}),
|
||||
uiViewClassName: 'RCTText',
|
||||
};
|
||||
@@ -100,27 +99,16 @@ var Text = React.createClass({
|
||||
*
|
||||
* {nativeEvent: {layout: {x, y, width, height}}}.
|
||||
*/
|
||||
onLayout: React.PropTypes.func,
|
||||
/**
|
||||
* Specifies should fonts scale to respect Text Size accessibility setting.
|
||||
*/
|
||||
allowFontScaling: React.PropTypes.bool,
|
||||
onLayout: React.PropTypes.func,
|
||||
},
|
||||
|
||||
viewConfig: viewConfig,
|
||||
|
||||
getInitialState: function(): Object {
|
||||
getInitialState: function() {
|
||||
return merge(this.touchableGetInitialState(), {
|
||||
isHighlighted: false,
|
||||
});
|
||||
},
|
||||
|
||||
getDefaultProps: function(): Object {
|
||||
return {
|
||||
numberOfLines: 0,
|
||||
allowFontScaling: true,
|
||||
};
|
||||
},
|
||||
|
||||
onStartShouldSetResponder: function(): bool {
|
||||
var shouldSetFromProps = this.props.onStartShouldSetResponder &&
|
||||
@@ -243,7 +231,6 @@ if (Platform.OS === 'android') {
|
||||
RCTVirtualText = createReactNativeComponentClass({
|
||||
validAttributes: merge(ReactNativeViewAttributes.UIView, {
|
||||
isHighlighted: true,
|
||||
allowFontScaling: false,
|
||||
}),
|
||||
uiViewClassName: 'RCTVirtualText',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user