diff options
Diffstat (limited to 'src/app.ts')
-rw-r--r-- | src/app.ts | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -9,6 +9,7 @@ _ = lodash; import MapContext from './control/MapContext'; import MapData from './model/MapData'; +import InputHandler from './view/InputHandler'; var mapContext: MapContext; @@ -17,8 +18,9 @@ window.onload = () => { var xhr = new XMLHttpRequest(); xhr.onload = function() { - let mapDef = new MapData(JSON.parse(this.responseText)); - mapContext = new MapContext(mapDef); + var mapDef = new MapData(JSON.parse(this.responseText)); + var inputHandler = new InputHandler(); + mapContext = new MapContext(mapDef, inputHandler); } xhr.open('GET', 'resources/map/test.json', true); |