Lint removal

This commit is contained in:
Tim Schaub
2018-07-16 17:57:57 -06:00
parent f78d0d4cfa
commit d0ab8dce38
63 changed files with 2945 additions and 2917 deletions

View File

@@ -52,73 +52,73 @@ import ImageSource from '../source/Image.js';
* @api
*/
class ImageCanvasSource {
constructor(options) {
constructor(options) {
ImageSource.call(this, {
attributions: options.attributions,
projection: options.projection,
resolutions: options.resolutions,
state: options.state
});
ImageSource.call(this, {
attributions: options.attributions,
projection: options.projection,
resolutions: options.resolutions,
state: options.state
});
/**
/**
* @private
* @type {module:ol/source/ImageCanvas~FunctionType}
*/
this.canvasFunction_ = options.canvasFunction;
this.canvasFunction_ = options.canvasFunction;
/**
/**
* @private
* @type {module:ol/ImageCanvas}
*/
this.canvas_ = null;
this.canvas_ = null;
/**
/**
* @private
* @type {number}
*/
this.renderedRevision_ = 0;
this.renderedRevision_ = 0;
/**
/**
* @private
* @type {number}
*/
this.ratio_ = options.ratio !== undefined ?
options.ratio : 1.5;
this.ratio_ = options.ratio !== undefined ?
options.ratio : 1.5;
}
}
/**
/**
* @inheritDoc
*/
getImageInternal(extent, resolution, pixelRatio, projection) {
resolution = this.findNearestResolution(resolution);
getImageInternal(extent, resolution, pixelRatio, projection) {
resolution = this.findNearestResolution(resolution);
let canvas = this.canvas_;
if (canvas &&
let canvas = this.canvas_;
if (canvas &&
this.renderedRevision_ == this.getRevision() &&
canvas.getResolution() == resolution &&
canvas.getPixelRatio() == pixelRatio &&
containsExtent(canvas.getExtent(), extent)) {
return canvas;
}
return canvas;
}
extent = extent.slice();
scaleFromCenter(extent, this.ratio_);
const width = getWidth(extent) / resolution;
const height = getHeight(extent) / resolution;
const size = [width * pixelRatio, height * pixelRatio];
extent = extent.slice();
scaleFromCenter(extent, this.ratio_);
const width = getWidth(extent) / resolution;
const height = getHeight(extent) / resolution;
const size = [width * pixelRatio, height * pixelRatio];
const canvasElement = this.canvasFunction_(
extent, resolution, pixelRatio, size, projection);
if (canvasElement) {
canvas = new ImageCanvas(extent, resolution, pixelRatio, canvasElement);
}
this.canvas_ = canvas;
this.renderedRevision_ = this.getRevision();
const canvasElement = this.canvasFunction_(
extent, resolution, pixelRatio, size, projection);
if (canvasElement) {
canvas = new ImageCanvas(extent, resolution, pixelRatio, canvasElement);
}
this.canvas_ = canvas;
this.renderedRevision_ = this.getRevision();
return canvas;
}
return canvas;
}
}
inherits(ImageCanvasSource, ImageSource);