From 85bd663eb253de5f54bff4d3eb54634bb87f68f1 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 13 Feb 2019 17:44:06 +0100 Subject: [PATCH] CanvasApp files loaded only once the user enter into the Charts Menu, not before. --- client/html/index.html | 2 +- client/src/views/charts/index.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/client/html/index.html b/client/html/index.html index 407908765..50a3019a5 100644 --- a/client/html/index.html +++ b/client/html/index.html @@ -50,7 +50,7 @@ - +
diff --git a/client/src/views/charts/index.js b/client/src/views/charts/index.js index 84b7f53a7..a3ffdded1 100644 --- a/client/src/views/charts/index.js +++ b/client/src/views/charts/index.js @@ -25,6 +25,10 @@ const styles = theme => ({ class Charts extends Component { componentDidMount () { + if (window.canvasApp.visible === undefined) { + loadCanvas() // This happens only once. + } + window.canvasApp.visible = true let body = document.getElementById('body') body.style = 'margin: 0px; padding: 0px; border: 0px; overflow:hidden;'