Error handling for onResize of the Canvas App

This commit is contained in:
Luis Fernando Molina committed 2018-11-22 20:51:38 +01:00
1 parent edb58b7999
commit 596eb7b59c
1 file changed
+7 -1
+7 -1
View File
@@ -35,10 +35,16 @@
loadAdvancedAlgosPlatform();
}
}
function onResize(){
if (window.canvasApp === undefined) {return}
if (window.canvasApp.eventHandler === undefined) {return}
window.canvasApp.eventHandler.raiseEvent('Browser Resized')
}
</script>
</head>
<body id="body" onload="loadCanvas()" onresize="window.canvasApp.eventHandler.raiseEvent('Browser Resized')">
<body id="body" onload="loadCanvas()" onresize="onResize()">
<div id="masterApp"></div>
<div id="canvasApp"></div>
</body>