From 86ce7bf7840175728f845d9ddd1d473be98369b1 Mon Sep 17 00:00:00 2001 From: Bernardo Amaral Date: Mon, 15 Apr 2019 11:48:07 +0100 Subject: [PATCH 1/3] Updated webview import --- App/index.js | 4 ++-- package.json | 5 ++++- react-native-highcharts.js | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/App/index.js b/App/index.js index 6a57b9f..f1e6f02 100644 --- a/App/index.js +++ b/App/index.js @@ -4,10 +4,10 @@ import { StyleSheet, Text, View, - WebView, Image, Dimensions } from 'react-native'; +import { WebView } from 'react-native-webview'; const win = Dimensions.get('window'); class ChartWeb extends Component { @@ -60,7 +60,7 @@ class ChartWeb extends Component { } // used to resize on orientation of display - reRenderWebView(e) { + reRenderWebView = (e) => { this.setState({ height: e.nativeEvent.layout.height, width: e.nativeEvent.layout.width, diff --git a/package.json b/package.json index 63fcfc9..ff3a18f 100644 --- a/package.json +++ b/package.json @@ -25,5 +25,8 @@ "bugs": { "url": "https://github.com/TradingPal/react-native-highcharts/issues" }, - "homepage": "https://github.com/TradingPal/react-native-highcharts#readme" + "homepage": "https://github.com/TradingPal/react-native-highcharts#readme", + "dependencies": { + "react-native-webview": "^5.6.2" + } } diff --git a/react-native-highcharts.js b/react-native-highcharts.js index 6a57b9f..f1e6f02 100644 --- a/react-native-highcharts.js +++ b/react-native-highcharts.js @@ -4,10 +4,10 @@ import { StyleSheet, Text, View, - WebView, Image, Dimensions } from 'react-native'; +import { WebView } from 'react-native-webview'; const win = Dimensions.get('window'); class ChartWeb extends Component { @@ -60,7 +60,7 @@ class ChartWeb extends Component { } // used to resize on orientation of display - reRenderWebView(e) { + reRenderWebView = (e) => { this.setState({ height: e.nativeEvent.layout.height, width: e.nativeEvent.layout.width, From 0a26953b59707b022844b82ee1391b9fbef1657b Mon Sep 17 00:00:00 2001 From: Bernardo Date: Tue, 23 Jul 2019 10:24:26 +0100 Subject: [PATCH 2/3] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ff3a18f..da9109e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-highcharts", - "version": "1.1", + "version": "1.1.0", "description": "JavaScript implementation of a view container that can flip between its front and back, where the back has a console.log and the front is your aplication.", "main": "react-native-highcharts.js", From ce3194f13db76c462b07c45f7f06c57c508acd29 Mon Sep 17 00:00:00 2001 From: Bernardo Amaral Date: Tue, 23 Jul 2019 10:37:09 +0100 Subject: [PATCH 3/3] [Fix] iOS error --- App/index.js | 1 + react-native-highcharts.js | 1 + 2 files changed, 2 insertions(+) diff --git a/App/index.js b/App/index.js index f1e6f02..4f63570 100644 --- a/App/index.js +++ b/App/index.js @@ -79,6 +79,7 @@ class ChartWeb extends Component { return (