[change] ScrollView as new surface

Fix #405
This commit is contained in:
Nicolas Gallagher
2017-04-20 13:33:25 -07:00
parent 17ed63129f
commit 1f3e9cc6ee

View File

@@ -144,7 +144,6 @@ const ScrollView = createReactClass({
collapsable={false}
ref={this._setInnerViewRef}
style={[
styles.contentContainer,
horizontal && styles.contentContainerHorizontal,
contentContainerStyle
]}
@@ -232,16 +231,17 @@ const styles = StyleSheet.create({
flex: 1,
overflowX: 'hidden',
overflowY: 'auto',
WebkitOverflowScrolling: 'touch'
WebkitOverflowScrolling: 'touch',
// Enable hardware compositing in modern browsers.
// Creates a new layer with its own backing surface that can significantly
// improve scroll performance.
transform: [{ translateZ: 0 }]
},
baseHorizontal: {
flexDirection: 'row',
overflowX: 'auto',
overflowY: 'hidden'
},
contentContainer: {
transform: [{ translateZ: 0 }]
},
contentContainerHorizontal: {
flexDirection: 'row'
}