Skip to content

Commit

Permalink
Changed render function so that no container surrounds the WebView an…
Browse files Browse the repository at this point in the history
…ymore
  • Loading branch information
Kevin Stumpf committed Feb 24, 2016
1 parent 3ef5e74 commit b1b9e43
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,21 @@ import injectedApplication from './injectedJavaScript/application';
import injectedErrorHandler from './injectedJavaScript/errorHandler';
import injectedExecuteNativeFunction from './injectedJavaScript/executeNativeFunction';

export default class SignaturePad extends Component {
class SignaturePad extends Component {

static propTypes = {
onChange: PropTypes.func,
onError: PropTypes.func
onError: PropTypes.func,
style: View.propTypes.style
};

static defaultProps = {
onChange: () => {
},
onError: () => {

}
},
style: {}
};

constructor(props) {
Expand Down Expand Up @@ -109,16 +111,16 @@ export default class SignaturePad extends Component {
};

render = () => {
return (
<View style={{flex: 1}}>
return (
<WebView automaticallyAdjustContentInsets={false}
onNavigationStateChange={this._onNavigationChange}
renderError={this._renderError}
renderLoading={this._renderLoading}
source={this.source}
javaScriptEnabled={true}
style={{flex: 1, backgroundColor: 'white'}}/>
</View>
style={this.props.style}/>
)
};
}

module.exports = SignaturePad;

0 comments on commit b1b9e43

Please sign in to comment.