Automated class transform
npx lebab --replace src --transform class
This commit is contained in:
@@ -14,90 +14,86 @@ import EventType from './events/EventType.js';
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {module:ol/ImageState} state State.
|
||||
*/
|
||||
const ImageBase = function(extent, resolution, pixelRatio, state) {
|
||||
class ImageBase {
|
||||
constructor(extent, resolution, pixelRatio, state) {
|
||||
|
||||
EventTarget.call(this);
|
||||
EventTarget.call(this);
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {module:ol/extent~Extent}
|
||||
*/
|
||||
this.extent = extent;
|
||||
/**
|
||||
* @protected
|
||||
* @type {module:ol/extent~Extent}
|
||||
*/
|
||||
this.extent = extent;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {number}
|
||||
*/
|
||||
this.pixelRatio_ = pixelRatio;
|
||||
/**
|
||||
* @private
|
||||
* @type {number}
|
||||
*/
|
||||
this.pixelRatio_ = pixelRatio;
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {number|undefined}
|
||||
*/
|
||||
this.resolution = resolution;
|
||||
/**
|
||||
* @protected
|
||||
* @type {number|undefined}
|
||||
*/
|
||||
this.resolution = resolution;
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {module:ol/ImageState}
|
||||
*/
|
||||
this.state = state;
|
||||
/**
|
||||
* @protected
|
||||
* @type {module:ol/ImageState}
|
||||
*/
|
||||
this.state = state;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @protected
|
||||
*/
|
||||
changed() {
|
||||
this.dispatchEvent(EventType.CHANGE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {module:ol/extent~Extent} Extent.
|
||||
*/
|
||||
getExtent() {
|
||||
return this.extent;
|
||||
}
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.
|
||||
*/
|
||||
getImage() {}
|
||||
|
||||
/**
|
||||
* @return {number} PixelRatio.
|
||||
*/
|
||||
getPixelRatio() {
|
||||
return this.pixelRatio_;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {number} Resolution.
|
||||
*/
|
||||
getResolution() {
|
||||
return /** @type {number} */ (this.resolution);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {module:ol/ImageState} State.
|
||||
*/
|
||||
getState() {
|
||||
return this.state;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load not yet loaded URI.
|
||||
* @abstract
|
||||
*/
|
||||
load() {}
|
||||
}
|
||||
|
||||
inherits(ImageBase, EventTarget);
|
||||
|
||||
|
||||
/**
|
||||
* @protected
|
||||
*/
|
||||
ImageBase.prototype.changed = function() {
|
||||
this.dispatchEvent(EventType.CHANGE);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {module:ol/extent~Extent} Extent.
|
||||
*/
|
||||
ImageBase.prototype.getExtent = function() {
|
||||
return this.extent;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.
|
||||
*/
|
||||
ImageBase.prototype.getImage = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @return {number} PixelRatio.
|
||||
*/
|
||||
ImageBase.prototype.getPixelRatio = function() {
|
||||
return this.pixelRatio_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {number} Resolution.
|
||||
*/
|
||||
ImageBase.prototype.getResolution = function() {
|
||||
return /** @type {number} */ (this.resolution);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {module:ol/ImageState} State.
|
||||
*/
|
||||
ImageBase.prototype.getState = function() {
|
||||
return this.state;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Load not yet loaded URI.
|
||||
* @abstract
|
||||
*/
|
||||
ImageBase.prototype.load = function() {};
|
||||
|
||||
export default ImageBase;
|
||||
|
||||
Reference in New Issue
Block a user