Fix echarts overflow on Android

This commit is contained in:
wxsm 2017-12-25 21:48:44 +08:00
parent 405e9f7a55
commit 4e18c203b7
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { WebView, View, StyleSheet } from 'react-native';
import { WebView, View, StyleSheet, Platform } from 'react-native';
import renderChart from './renderChart';
import echarts from './echarts.min';
@ -21,7 +21,7 @@ export default class App extends Component {
height: this.props.height || 400,
backgroundColor: this.props.backgroundColor || 'transparent'
}}
scalesPageToFit={true}
scalesPageToFit={Platform.OS !== 'ios'}
source={require('./tpl.html')}
onMessage={event => this.props.onPress ? this.props.onPress(JSON.parse(event.nativeEvent.data)) : null}
/>