Add Canvas nullcheck to render function
This commit is contained in:
parent
572406b963
commit
4c6dff35c3
3 changed files with 19 additions and 9 deletions
|
|
@ -25,8 +25,9 @@ class SimulationComponent implements OnInit {
|
|||
canvas.context2D.fillRect(0, 0, canvas.width, canvas.height);
|
||||
canvas.context2D.setFillColorRgb(0, 255, 0);
|
||||
canvas.context2D.fillText('''
|
||||
If you see this\n
|
||||
the app is broken :(
|
||||
If you see this
|
||||
|
||||
the canvas did not load correctly :(
|
||||
''', canvas.width / 2 - 50, canvas.height / 2);
|
||||
// engineService.create(canvas);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue