Adaptation for CanvasApp new global variables inside a context
This commit is contained in:
1 parent
bb72fe23a6
commit
2d81cf446c
3 files changed
+15
-10
No files matched your search
+12
-7
@@ -18,17 +18,22 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
function loadCanvas(){
|
||||
window.SESSION_TOKEN = ''
|
||||
window.EXECUTING_AT = 'Master App'
|
||||
window.TOP_MARGIN = 25
|
||||
window.URL_PREFIX = 'https://develop.advancedalgos.net/'
|
||||
window.CANVAS_VISIBLE = true
|
||||
|
||||
window.canvasApp = {
|
||||
sessionToken: '',
|
||||
executingAt: 'Master App',
|
||||
visible: true,
|
||||
topMargin: 25,
|
||||
urlPrefix: 'https://develop.advancedalgos.net/' /* 'http://localhost:1337/' */ /* 'https://develop.advancedalgos.net/' */
|
||||
};
|
||||
|
||||
loadAdvancedAlgosPlatform();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body id="body" onload="loadCanvas()">
|
||||
<div id="root"></div>
|
||||
<div id="canvasDiv"></div>
|
||||
<div id="masterApp"></div>
|
||||
<div id="canvasApp"></div>
|
||||
</body>
|
||||
</html>
|
||||
+1
-1
@@ -7,4 +7,4 @@ if (process.env.NODE_ENV !== 'production') {
|
||||
localStorage.setItem('debug', 'advanced-algos:*')
|
||||
}
|
||||
|
||||
ReactDOM.render(<MasterApp />, document.getElementById('root'))
|
||||
ReactDOM.render(<MasterApp />, document.getElementById('masterApp'))
|
||||
@@ -27,14 +27,14 @@ const styles = theme => ({
|
||||
class Home extends Component {
|
||||
|
||||
componentDidMount () {
|
||||
window.CANVAS_VISIBLE = true
|
||||
window.canvasApp.visible = true
|
||||
let body = document.getElementById('body')
|
||||
body.style = 'margin: 0px; padding: 0px; border: 0px; overflow:hidden;'
|
||||
window.HIDE_FOOTER = true
|
||||
}
|
||||
|
||||
componentWillUnmount () {
|
||||
window.CANVAS_VISIBLE = false
|
||||
window.canvasApp.visible = false
|
||||
let body = document.getElementById('body')
|
||||
body.style = ''
|
||||
window.HIDE_FOOTER = false
|
||||
|
||||
Reference in new issue
Block a user