diff --git a/src/ol/Image.js b/src/ol/Image.js index b4e9b39b96..0a5d7c2e52 100644 --- a/src/ol/Image.js +++ b/src/ol/Image.js @@ -2,7 +2,7 @@ * @module ol/Image */ import {inherits} from './index.js'; -import _ol_ImageBase_ from './ImageBase.js'; +import ImageBase from './ImageBase.js'; import ImageState from './ImageState.js'; import {listenOnce, unlistenByKey} from './events.js'; import EventType from './events/EventType.js'; @@ -20,7 +20,7 @@ import {getHeight} from './extent.js'; */ const _ol_Image_ = function(extent, resolution, pixelRatio, src, crossOrigin, imageLoadFunction) { - _ol_ImageBase_.call(this, extent, resolution, pixelRatio, ImageState.IDLE); + ImageBase.call(this, extent, resolution, pixelRatio, ImageState.IDLE); /** * @private @@ -57,7 +57,7 @@ const _ol_Image_ = function(extent, resolution, pixelRatio, src, crossOrigin, im }; -inherits(_ol_Image_, _ol_ImageBase_); +inherits(_ol_Image_, ImageBase); /** diff --git a/src/ol/ImageBase.js b/src/ol/ImageBase.js index 2c2b1c14fc..d4bb8f1e88 100644 --- a/src/ol/ImageBase.js +++ b/src/ol/ImageBase.js @@ -14,7 +14,7 @@ import EventType from './events/EventType.js'; * @param {number} pixelRatio Pixel ratio. * @param {ol.ImageState} state State. */ -const _ol_ImageBase_ = function(extent, resolution, pixelRatio, state) { +const ImageBase = function(extent, resolution, pixelRatio, state) { EventTarget.call(this); @@ -44,13 +44,13 @@ const _ol_ImageBase_ = function(extent, resolution, pixelRatio, state) { }; -inherits(_ol_ImageBase_, EventTarget); +inherits(ImageBase, EventTarget); /** * @protected */ -_ol_ImageBase_.prototype.changed = function() { +ImageBase.prototype.changed = function() { this.dispatchEvent(EventType.CHANGE); }; @@ -58,7 +58,7 @@ _ol_ImageBase_.prototype.changed = function() { /** * @return {ol.Extent} Extent. */ -_ol_ImageBase_.prototype.getExtent = function() { +ImageBase.prototype.getExtent = function() { return this.extent; }; @@ -67,13 +67,13 @@ _ol_ImageBase_.prototype.getExtent = function() { * @abstract * @return {HTMLCanvasElement|Image|HTMLVideoElement} Image. */ -_ol_ImageBase_.prototype.getImage = function() {}; +ImageBase.prototype.getImage = function() {}; /** * @return {number} PixelRatio. */ -_ol_ImageBase_.prototype.getPixelRatio = function() { +ImageBase.prototype.getPixelRatio = function() { return this.pixelRatio_; }; @@ -81,7 +81,7 @@ _ol_ImageBase_.prototype.getPixelRatio = function() { /** * @return {number} Resolution. */ -_ol_ImageBase_.prototype.getResolution = function() { +ImageBase.prototype.getResolution = function() { return /** @type {number} */ (this.resolution); }; @@ -89,7 +89,7 @@ _ol_ImageBase_.prototype.getResolution = function() { /** * @return {ol.ImageState} State. */ -_ol_ImageBase_.prototype.getState = function() { +ImageBase.prototype.getState = function() { return this.state; }; @@ -98,5 +98,6 @@ _ol_ImageBase_.prototype.getState = function() { * Load not yet loaded URI. * @abstract */ -_ol_ImageBase_.prototype.load = function() {}; -export default _ol_ImageBase_; +ImageBase.prototype.load = function() {}; + +export default ImageBase; diff --git a/src/ol/ImageCanvas.js b/src/ol/ImageCanvas.js index 23a431de33..457caaaeff 100644 --- a/src/ol/ImageCanvas.js +++ b/src/ol/ImageCanvas.js @@ -2,7 +2,7 @@ * @module ol/ImageCanvas */ import {inherits} from './index.js'; -import _ol_ImageBase_ from './ImageBase.js'; +import ImageBase from './ImageBase.js'; import ImageState from './ImageState.js'; /** @@ -26,7 +26,7 @@ const ImageCanvas = function(extent, resolution, pixelRatio, canvas, opt_loader) const state = opt_loader !== undefined ? ImageState.IDLE : ImageState.LOADED; - _ol_ImageBase_.call(this, extent, resolution, pixelRatio, state); + ImageBase.call(this, extent, resolution, pixelRatio, state); /** * @private @@ -42,7 +42,7 @@ const ImageCanvas = function(extent, resolution, pixelRatio, canvas, opt_loader) }; -inherits(ImageCanvas, _ol_ImageBase_); +inherits(ImageCanvas, ImageBase); /** diff --git a/src/ol/reproj/Image.js b/src/ol/reproj/Image.js index 707470fcf8..43b9ce535d 100644 --- a/src/ol/reproj/Image.js +++ b/src/ol/reproj/Image.js @@ -3,7 +3,7 @@ */ import {ERROR_THRESHOLD} from './common.js'; import {inherits} from '../index.js'; -import _ol_ImageBase_ from '../ImageBase.js'; +import ImageBase from '../ImageBase.js'; import ImageState from '../ImageState.js'; import {listen, unlistenByKey} from '../events.js'; import EventType from '../events/EventType.js'; @@ -106,10 +106,10 @@ const ReprojImage = function(sourceProj, targetProj, state = ImageState.IDLE; } - _ol_ImageBase_.call(this, targetExtent, targetResolution, this.sourcePixelRatio_, state); + ImageBase.call(this, targetExtent, targetResolution, this.sourcePixelRatio_, state); }; -inherits(ReprojImage, _ol_ImageBase_); +inherits(ReprojImage, ImageBase); /** @@ -119,7 +119,7 @@ ReprojImage.prototype.disposeInternal = function() { if (this.state == ImageState.LOADING) { this.unlistenSource_(); } - _ol_ImageBase_.prototype.disposeInternal.call(this); + ImageBase.prototype.disposeInternal.call(this); };