Use blocked scoped variables

In addition to using const and let, this also upgrades our linter config and removes lint (mostly whitespace).
This commit is contained in:
Tim Schaub
2018-01-11 23:32:36 -07:00
parent 0bf2b04dee
commit ad62739a6e
684 changed files with 18120 additions and 18184 deletions

View File

@@ -15,7 +15,7 @@ import ImageState from './ImageState.js';
* @param {ol.ImageCanvasLoader=} opt_loader Optional loader function to
* support asynchronous canvas drawing.
*/
var ImageCanvas = function(extent, resolution, pixelRatio, canvas, opt_loader) {
const ImageCanvas = function(extent, resolution, pixelRatio, canvas, opt_loader) {
/**
* Optional canvas loader function.
@@ -24,7 +24,7 @@ var ImageCanvas = function(extent, resolution, pixelRatio, canvas, opt_loader) {
*/
this.loader_ = opt_loader !== undefined ? opt_loader : null;
var state = opt_loader !== undefined ? ImageState.IDLE : ImageState.LOADED;
const state = opt_loader !== undefined ? ImageState.IDLE : ImageState.LOADED;
_ol_ImageBase_.call(this, extent, resolution, pixelRatio, state);