Rename _ol_ImageBase_ to ImageBase

This commit is contained in:
Tim Schaub
2018-02-08 11:46:56 -07:00
parent 3d817ff7e7
commit e075a4fbca
4 changed files with 21 additions and 20 deletions
+3 -3
View File
@@ -2,7 +2,7 @@
* @module ol/Image * @module ol/Image
*/ */
import {inherits} from './index.js'; import {inherits} from './index.js';
import _ol_ImageBase_ from './ImageBase.js'; import ImageBase from './ImageBase.js';
import ImageState from './ImageState.js'; import ImageState from './ImageState.js';
import {listenOnce, unlistenByKey} from './events.js'; import {listenOnce, unlistenByKey} from './events.js';
import EventType from './events/EventType.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) { 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 * @private
@@ -57,7 +57,7 @@ const _ol_Image_ = function(extent, resolution, pixelRatio, src, crossOrigin, im
}; };
inherits(_ol_Image_, _ol_ImageBase_); inherits(_ol_Image_, ImageBase);
/** /**
+11 -10
View File
@@ -14,7 +14,7 @@ import EventType from './events/EventType.js';
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @param {ol.ImageState} state State. * @param {ol.ImageState} state State.
*/ */
const _ol_ImageBase_ = function(extent, resolution, pixelRatio, state) { const ImageBase = function(extent, resolution, pixelRatio, state) {
EventTarget.call(this); EventTarget.call(this);
@@ -44,13 +44,13 @@ const _ol_ImageBase_ = function(extent, resolution, pixelRatio, state) {
}; };
inherits(_ol_ImageBase_, EventTarget); inherits(ImageBase, EventTarget);
/** /**
* @protected * @protected
*/ */
_ol_ImageBase_.prototype.changed = function() { ImageBase.prototype.changed = function() {
this.dispatchEvent(EventType.CHANGE); this.dispatchEvent(EventType.CHANGE);
}; };
@@ -58,7 +58,7 @@ _ol_ImageBase_.prototype.changed = function() {
/** /**
* @return {ol.Extent} Extent. * @return {ol.Extent} Extent.
*/ */
_ol_ImageBase_.prototype.getExtent = function() { ImageBase.prototype.getExtent = function() {
return this.extent; return this.extent;
}; };
@@ -67,13 +67,13 @@ _ol_ImageBase_.prototype.getExtent = function() {
* @abstract * @abstract
* @return {HTMLCanvasElement|Image|HTMLVideoElement} Image. * @return {HTMLCanvasElement|Image|HTMLVideoElement} Image.
*/ */
_ol_ImageBase_.prototype.getImage = function() {}; ImageBase.prototype.getImage = function() {};
/** /**
* @return {number} PixelRatio. * @return {number} PixelRatio.
*/ */
_ol_ImageBase_.prototype.getPixelRatio = function() { ImageBase.prototype.getPixelRatio = function() {
return this.pixelRatio_; return this.pixelRatio_;
}; };
@@ -81,7 +81,7 @@ _ol_ImageBase_.prototype.getPixelRatio = function() {
/** /**
* @return {number} Resolution. * @return {number} Resolution.
*/ */
_ol_ImageBase_.prototype.getResolution = function() { ImageBase.prototype.getResolution = function() {
return /** @type {number} */ (this.resolution); return /** @type {number} */ (this.resolution);
}; };
@@ -89,7 +89,7 @@ _ol_ImageBase_.prototype.getResolution = function() {
/** /**
* @return {ol.ImageState} State. * @return {ol.ImageState} State.
*/ */
_ol_ImageBase_.prototype.getState = function() { ImageBase.prototype.getState = function() {
return this.state; return this.state;
}; };
@@ -98,5 +98,6 @@ _ol_ImageBase_.prototype.getState = function() {
* Load not yet loaded URI. * Load not yet loaded URI.
* @abstract * @abstract
*/ */
_ol_ImageBase_.prototype.load = function() {}; ImageBase.prototype.load = function() {};
export default _ol_ImageBase_;
export default ImageBase;
+3 -3
View File
@@ -2,7 +2,7 @@
* @module ol/ImageCanvas * @module ol/ImageCanvas
*/ */
import {inherits} from './index.js'; import {inherits} from './index.js';
import _ol_ImageBase_ from './ImageBase.js'; import ImageBase from './ImageBase.js';
import ImageState from './ImageState.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; 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 * @private
@@ -42,7 +42,7 @@ const ImageCanvas = function(extent, resolution, pixelRatio, canvas, opt_loader)
}; };
inherits(ImageCanvas, _ol_ImageBase_); inherits(ImageCanvas, ImageBase);
/** /**
+4 -4
View File
@@ -3,7 +3,7 @@
*/ */
import {ERROR_THRESHOLD} from './common.js'; import {ERROR_THRESHOLD} from './common.js';
import {inherits} from '../index.js'; import {inherits} from '../index.js';
import _ol_ImageBase_ from '../ImageBase.js'; import ImageBase from '../ImageBase.js';
import ImageState from '../ImageState.js'; import ImageState from '../ImageState.js';
import {listen, unlistenByKey} from '../events.js'; import {listen, unlistenByKey} from '../events.js';
import EventType from '../events/EventType.js'; import EventType from '../events/EventType.js';
@@ -106,10 +106,10 @@ const ReprojImage = function(sourceProj, targetProj,
state = ImageState.IDLE; 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) { if (this.state == ImageState.LOADING) {
this.unlistenSource_(); this.unlistenSource_();
} }
_ol_ImageBase_.prototype.disposeInternal.call(this); ImageBase.prototype.disposeInternal.call(this);
}; };