CanvasApp files loaded only once the user enter into the Charts Menu, not before.
This commit is contained in:
1 parent
0cc04b6bf1
commit
85bd663eb2
2 files changed
+5
-1
No files matched your search
@@ -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>
|
||||
|
||||
@@ -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;'
|
||||
|
||||
Reference in new issue
Block a user