Skip to content

Commit

Permalink
adicionado foco interno
Browse files Browse the repository at this point in the history
  • Loading branch information
WeslleyNasRocha committed Mar 13, 2019
1 parent cc90ebd commit 334d27d
Show file tree
Hide file tree
Showing 4 changed files with 2,007 additions and 24 deletions.
15 changes: 12 additions & 3 deletions DocumentScanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ import {
DeviceEventEmitter, // android
NativeModules,
requireNativeComponent,
View
View,
TouchableOpacity
} from 'react-native';

import Styles from './styles';

var iface = {
name: 'DocumentScanner',
propTypes: {
Expand All @@ -31,6 +34,7 @@ class Scanner extends PureComponent{
static defaultProps = {
onPictureTaken: ()=>{},
onProcessing: ()=>{},
style: Styles.fill,
}

componentWillMount(){
Expand All @@ -53,8 +57,13 @@ class Scanner extends PureComponent{
CameraManager.focus();
}

render(){
return <DocumentScanner {...this.props}/>
render() {
return (
<View style={this.style}>
<DocumentScanner {...this.props} />
<TouchableOpacity activeOpacity={1} style={Styles.focusOverlay} onPressOut={() => this.focus()} />
</View>
);
}
}

Expand Down
Loading

0 comments on commit 334d27d

Please sign in to comment.