CanvasApp files loaded only once the user enter into the Charts Menu, not before.

This commit is contained in:
Luis Fernando Molina committed 2019-02-13 17:44:06 +01:00
1 parent 0cc04b6bf1
commit 85bd663eb2
2 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -50,7 +50,7 @@
</script>
</head>
<body id="body" onload="loadCanvas()" onresize="onResize()">
<body id="body" onload="" onresize="onResize()">
<div id="masterApp"></div>
<div id="canvasApp"></div>
</body>
+4
View File
@@ -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;'