summaryrefslogtreecommitdiffstats
path: root/src/index.ts
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2018-10-24 01:26:15 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2018-10-24 22:28:27 +0200
commit9770eaf432bacff9de1b9911adef1db368b8cc70 (patch)
treec75db564154f70c995efbb534063c8b9969ac55c /src/index.ts
parent06b2c5bec7e246bad345fecdb12752866452e5e7 (diff)
downloadrpgedit-9770eaf432bacff9de1b9911adef1db368b8cc70.tar
rpgedit-9770eaf432bacff9de1b9911adef1db368b8cc70.zip
Throw in tslint and fix style
Diffstat (limited to 'src/index.ts')
-rw-r--r--src/index.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/index.ts b/src/index.ts
index 6390017..1c2035f 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,7 +1,7 @@
import MapData from './model/MapData';
-import Renderer from './view/Renderer';
import {loadMap} from './view/MapLoader';
+import Renderer from './view/Renderer';
window.onload = () => {
const canvas = document.getElementById('rpgedit') as HTMLCanvasElement;
@@ -10,15 +10,15 @@ window.onload = () => {
const renderer = new Renderer(canvas);
- let xhr = new XMLHttpRequest();
+ const xhr = new XMLHttpRequest();
- xhr.addEventListener('load', async function() {
- let mapDef = new MapData(JSON.parse(this.responseText));
+ xhr.addEventListener('load', async function() {
+ const mapDef = new MapData(JSON.parse(this.responseText));
- let mapView = await loadMap(renderer, mapDef);
- mapView.draw();
- });
+ const mapView = await loadMap(renderer, mapDef);
+ mapView.draw();
+ });
- xhr.open('GET', 'resources/map/test.json', true);
- xhr.send();
+ xhr.open('GET', 'resources/map/test.json', true);
+ xhr.send();
};