mirror of
https://github.com/status-im/react-native-qrcode.git
synced 2025-01-23 17:11:00 +00:00
fix: set scalesPageToFit to true for android to disable scroll
This commit is contained in:
parent
99a6f8d274
commit
beae9580e1
@ -6,7 +6,8 @@ var createReactClass = require('create-react-class');
|
|||||||
|
|
||||||
var {
|
var {
|
||||||
View,
|
View,
|
||||||
WebView
|
WebView,
|
||||||
|
Platform
|
||||||
} = require('react-native');
|
} = require('react-native');
|
||||||
|
|
||||||
var Canvas = createReactClass({
|
var Canvas = createReactClass({
|
||||||
@ -23,7 +24,7 @@ var Canvas = createReactClass({
|
|||||||
<View style={this.props.style}>
|
<View style={this.props.style}>
|
||||||
<WebView
|
<WebView
|
||||||
automaticallyAdjustContentInsets={false}
|
automaticallyAdjustContentInsets={false}
|
||||||
scalesPageToFit={false}
|
scalesPageToFit={Platform.OS === 'android'}
|
||||||
contentInset={{top: 0, right: 0, bottom: 0, left: 0}}
|
contentInset={{top: 0, right: 0, bottom: 0, left: 0}}
|
||||||
source={{html: "<style>*{margin:0;padding:0;}canvas{transform:translateZ(0);}</style><canvas></canvas><script>var canvas = document.querySelector('canvas');(" + renderString + ").call(" + contextString + ", canvas);</script>"}}
|
source={{html: "<style>*{margin:0;padding:0;}canvas{transform:translateZ(0);}</style><canvas></canvas><script>var canvas = document.querySelector('canvas');(" + renderString + ").call(" + contextString + ", canvas);</script>"}}
|
||||||
opaque={false}
|
opaque={false}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user