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

@@ -18,7 +18,7 @@ import {getHeight} from './extent.js';
* @param {?string} crossOrigin Cross origin.
* @param {ol.ImageLoadFunctionType} imageLoadFunction Image load function.
*/
var _ol_Image_ = function(extent, resolution, pixelRatio, src, crossOrigin, imageLoadFunction) {
const _ol_Image_ = function(extent, resolution, pixelRatio, src, crossOrigin, imageLoadFunction) {
_ol_ImageBase_.call(this, extent, resolution, pixelRatio, ImageState.IDLE);
@@ -109,9 +109,9 @@ _ol_Image_.prototype.load = function() {
this.changed();
this.imageListenerKeys_ = [
_ol_events_.listenOnce(this.image_, EventType.ERROR,
this.handleImageError_, this),
this.handleImageError_, this),
_ol_events_.listenOnce(this.image_, EventType.LOAD,
this.handleImageLoad_, this)
this.handleImageLoad_, this)
];
this.imageLoadFunction_(this, this.src_);
}