Fix lint issues

This commit is contained in:
Nicolas Gallagher
2016-03-15 14:19:46 -07:00
parent ae6132af56
commit 127d103c0a
2 changed files with 14 additions and 14 deletions

View File

@@ -39,23 +39,23 @@ const UIManager = {
let nativeProp
const value = props[prop]
switch(prop) {
switch (prop) {
case 'style':
// convert styles to DOM-styles
CSSPropertyOperations.setValueForStyles(node, processTransform(flattenStyle(value)))
break;
break
case 'class':
case 'className':
nativeProp = 'class'
// prevent class names managed by React Native from being replaced
const className = node.getAttribute(nativeProp) + ' ' + value
node.setAttribute(nativeProp, className)
break;
break
case 'text':
case 'value':
// native platforms use `text` prop to replace text input value
node.value = value
break;
break
default:
node.setAttribute(prop, value)
}

View File

@@ -61,15 +61,15 @@ class View extends Component {
<CoreComponent
{...other}
onClick={this._handleClick}
onClickCapture={this._normalizeEventForHandler('onClickCapture')}
onTouchCancel={this._normalizeEventForHandler('onTouchCancel')}
onTouchCancelCapture={this._normalizeEventForHandler('onTouchCancelCapture')}
onTouchEnd={this._normalizeEventForHandler('onTouchEnd')}
onTouchEndCapture={this._normalizeEventForHandler('onTouchEndCapture')}
onTouchMove={this._normalizeEventForHandler('onTouchMove')}
onTouchMoveCapture={this._normalizeEventForHandler('onTouchMoveCapture')}
onTouchStart={this._normalizeEventForHandler('onTouchStart')}
onTouchStartCapture={this._normalizeEventForHandler('onTouchStartCapture')}
onClickCapture={this._normalizeEventForHandler(this.props.onClickCapture)}
onTouchCancel={this._normalizeEventForHandler(this.props.onTouchCancel)}
onTouchCancelCapture={this._normalizeEventForHandler(this.props.onTouchCancelCapture)}
onTouchEnd={this._normalizeEventForHandler(this.props.onTouchEnd)}
onTouchEndCapture={this._normalizeEventForHandler(this.props.onTouchEndCapture)}
onTouchMove={this._normalizeEventForHandler(this.props.onTouchMove)}
onTouchMoveCapture={this._normalizeEventForHandler(this.props.onTouchMoveCapture)}
onTouchStart={this._normalizeEventForHandler(this.props.onTouchStart)}
onTouchStartCapture={this._normalizeEventForHandler(this.props.onTouchStartCapture)}
style={[
styles.initial,
style,
@@ -89,7 +89,7 @@ class View extends Component {
if (pageX === undefined) {
e.nativeEvent = normalizeNativeEvent(e.nativeEvent)
}
this.props[handler] && this.props[handler](e)
handler && handler(e)
}
}
}