[RN] "The View is never the target of touch events"

In preparation for "pinch to zoom" support in desktop streams on mobile, make
certain Views not intervene in touch event handling. While the modification is
necessary for "pinch to zoom" which is coming later, it really makes sense for
the modified Views to not be involved in touching because they're used to aid
layout and/or animations and are to behave to the user as if they're not there.
This commit is contained in:
Zoltan Bettenbuk
2018-04-05 14:46:31 -05:00
committed by Lyubo Marinov
parent 0afe72d42b
commit cb70c084b3
6 changed files with 30 additions and 9 deletions

View File

@@ -135,9 +135,15 @@ export default class TintedView extends Component<Props, State> {
render() {
// XXX Don't tint the children, tint the background only.
return (
<View style = { BASE_STYLE }>
<View style = { this.state.style } />
<View style = { BASE_STYLE }>
<View
pointerEvents = 'box-none'
style = { BASE_STYLE }>
<View
pointerEvents = 'none'
style = { this.state.style } />
<View
pointerEvents = 'box-none'
style = { BASE_STYLE }>
{ this.props.children }
</View>
</View>