After ESLint in Mapscii

This commit is contained in:
Christian Paul 2017-12-23 00:08:14 -08:00
parent eee880e237
commit ba09e8bd82

View File

@ -52,7 +52,7 @@ class Mapscii {
this._initTileSource(); this._initTileSource();
this._initRenderer(); this._initRenderer();
this._draw(); this._draw();
this.notify("Welcome to MapSCII! Use your cursors to navigate, a/z to zoom, q to quit."); this.notify('Welcome to MapSCII! Use your cursors to navigate, a/z to zoom, q to quit.');
resolve(); resolve();
}); });
} }
@ -94,11 +94,11 @@ class Mapscii {
this._draw(); this._draw();
}); });
this._resizeRenderer() this._resizeRenderer();
this.zoom = (config.initialZoom !== null) ? config.initialZoom : this.minZoom; this.zoom = (config.initialZoom !== null) ? config.initialZoom : this.minZoom;
} }
_resizeRenderer(cb) { _resizeRenderer() {
if (config.size) { if (config.size) {
this.width = config.size.width; this.width = config.size.width;
this.height = config.size.height; this.height = config.size.height;
@ -168,7 +168,7 @@ class Mapscii {
const newCenter = utils.tile2ll( const newCenter = utils.tile2ll(
this.mouseDragging.center.x+(dx/size), this.mouseDragging.center.x+(dx/size),
this.mouseDragging.center.y+(dy/size), this.mouseDragging.center.y+(dy/size),
utils.baseZoom(this.zoom), utils.baseZoom(this.zoom)
); );
this.setCenter(newCenter.lat, newCenter.lon); this.setCenter(newCenter.lat, newCenter.lon);
@ -180,7 +180,7 @@ class Mapscii {
x: event.x, x: event.x,
y: event.y, y: event.y,
center: utils.ll2tile(this.center.lon, this.center.lat, utils.baseZoom(this.zoom)), center: utils.ll2tile(this.center.lon, this.center.lat, utils.baseZoom(this.zoom)),
} };
} }
} }