Rename _ol_Tile_ to Tile

This commit is contained in:
Tim Schaub
2018-01-11 10:29:56 -07:00
parent 2efdf7982c
commit 1552f27a43
12 changed files with 60 additions and 60 deletions

View File

@@ -2,7 +2,7 @@
* @module ol/ImageTile
*/
import {inherits} from './index.js';
import _ol_Tile_ from './Tile.js';
import Tile from './Tile.js';
import TileState from './TileState.js';
import {createCanvasContext2D} from './dom.js';
import _ol_events_ from './events.js';
@@ -20,7 +20,7 @@ import EventType from './events/EventType.js';
*/
var ImageTile = function(tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) {
_ol_Tile_.call(this, tileCoord, state, opt_options);
Tile.call(this, tileCoord, state, opt_options);
/**
* @private
@@ -59,7 +59,7 @@ var ImageTile = function(tileCoord, state, src, crossOrigin, tileLoadFunction, o
};
inherits(ImageTile, _ol_Tile_);
inherits(ImageTile, Tile);
/**
@@ -75,7 +75,7 @@ ImageTile.prototype.disposeInternal = function() {
}
this.state = TileState.ABORT;
this.changed();
_ol_Tile_.prototype.disposeInternal.call(this);
Tile.prototype.disposeInternal.call(this);
};

View File

@@ -18,7 +18,7 @@ import EventType from './events/EventType.js';
* @param {ol.TileState} state State.
* @param {olx.TileOptions=} opt_options Tile options.
*/
var _ol_Tile_ = function(tileCoord, state, opt_options) {
var Tile = function(tileCoord, state, opt_options) {
EventTarget.call(this);
var options = opt_options ? opt_options : {};
@@ -66,13 +66,13 @@ var _ol_Tile_ = function(tileCoord, state, opt_options) {
};
inherits(_ol_Tile_, EventTarget);
inherits(Tile, EventTarget);
/**
* @protected
*/
_ol_Tile_.prototype.changed = function() {
Tile.prototype.changed = function() {
this.dispatchEvent(EventType.CHANGE);
};
@@ -80,7 +80,7 @@ _ol_Tile_.prototype.changed = function() {
/**
* @return {string} Key.
*/
_ol_Tile_.prototype.getKey = function() {
Tile.prototype.getKey = function() {
return this.key + '/' + this.tileCoord;
};
@@ -90,7 +90,7 @@ _ol_Tile_.prototype.getKey = function() {
* such tile exists, the original tile is returned.
* @return {!ol.Tile} Best tile for rendering.
*/
_ol_Tile_.prototype.getInterimTile = function() {
Tile.prototype.getInterimTile = function() {
if (!this.interimTile) {
//empty chain
return this;
@@ -116,7 +116,7 @@ _ol_Tile_.prototype.getInterimTile = function() {
* Goes through the chain of interim tiles and discards sections of the chain
* that are no longer relevant.
*/
_ol_Tile_.prototype.refreshInterimChain = function() {
Tile.prototype.refreshInterimChain = function() {
if (!this.interimTile) {
return;
}
@@ -151,7 +151,7 @@ _ol_Tile_.prototype.refreshInterimChain = function() {
* @return {ol.TileCoord} The tile coordinate.
* @api
*/
_ol_Tile_.prototype.getTileCoord = function() {
Tile.prototype.getTileCoord = function() {
return this.tileCoord;
};
@@ -159,14 +159,14 @@ _ol_Tile_.prototype.getTileCoord = function() {
/**
* @return {ol.TileState} State.
*/
_ol_Tile_.prototype.getState = function() {
Tile.prototype.getState = function() {
return this.state;
};
/**
* @param {ol.TileState} state State.
*/
_ol_Tile_.prototype.setState = function(state) {
Tile.prototype.setState = function(state) {
this.state = state;
this.changed();
};
@@ -178,7 +178,7 @@ _ol_Tile_.prototype.setState = function(state) {
* @abstract
* @api
*/
_ol_Tile_.prototype.load = function() {};
Tile.prototype.load = function() {};
/**
* Get the alpha value for rendering.
@@ -186,7 +186,7 @@ _ol_Tile_.prototype.load = function() {};
* @param {number} time The render frame time.
* @return {number} A number between 0 and 1.
*/
_ol_Tile_.prototype.getAlpha = function(id, time) {
Tile.prototype.getAlpha = function(id, time) {
if (!this.transition_) {
return 1;
}
@@ -213,7 +213,7 @@ _ol_Tile_.prototype.getAlpha = function(id, time) {
* @param {number} id An id for the renderer.
* @return {boolean} The tile is in transition.
*/
_ol_Tile_.prototype.inTransition = function(id) {
Tile.prototype.inTransition = function(id) {
if (!this.transition_) {
return false;
}
@@ -224,9 +224,9 @@ _ol_Tile_.prototype.inTransition = function(id) {
* Mark a transition as complete.
* @param {number} id An id for the renderer.
*/
_ol_Tile_.prototype.endTransition = function(id) {
Tile.prototype.endTransition = function(id) {
if (this.transition_) {
this.transitionStarts_[id] = -1;
}
};
export default _ol_Tile_;
export default Tile;

View File

@@ -2,7 +2,7 @@
* @module ol/VectorImageTile
*/
import {getUid, inherits} from './index.js';
import _ol_Tile_ from './Tile.js';
import Tile from './Tile.js';
import TileState from './TileState.js';
import {createCanvasContext2D} from './dom.js';
import _ol_events_ from './events.js';
@@ -36,7 +36,7 @@ var VectorImageTile = function(tileCoord, state, sourceRevision, format,
tileLoadFunction, urlTileCoord, tileUrlFunction, sourceTileGrid, tileGrid,
sourceTiles, pixelRatio, projection, tileClass, handleTileChange, opt_options) {
_ol_Tile_.call(this, tileCoord, state, opt_options);
Tile.call(this, tileCoord, state, opt_options);
/**
* @private
@@ -121,7 +121,7 @@ var VectorImageTile = function(tileCoord, state, sourceRevision, format,
};
inherits(VectorImageTile, _ol_Tile_);
inherits(VectorImageTile, Tile);
/**
@@ -149,7 +149,7 @@ VectorImageTile.prototype.disposeInternal = function() {
this.loadListenerKeys_.length = 0;
this.sourceTileListenerKeys_.forEach(_ol_events_.unlistenByKey);
this.sourceTileListenerKeys_.length = 0;
_ol_Tile_.prototype.disposeInternal.call(this);
Tile.prototype.disposeInternal.call(this);
};

View File

@@ -2,7 +2,7 @@
* @module ol/VectorTile
*/
import {getUid, inherits} from './index.js';
import _ol_Tile_ from './Tile.js';
import Tile from './Tile.js';
import TileState from './TileState.js';
/**
@@ -17,7 +17,7 @@ import TileState from './TileState.js';
*/
var VectorTile = function(tileCoord, state, src, format, tileLoadFunction, opt_options) {
_ol_Tile_.call(this, tileCoord, state, opt_options);
Tile.call(this, tileCoord, state, opt_options);
/**
* @type {number}
@@ -75,7 +75,7 @@ var VectorTile = function(tileCoord, state, src, format, tileLoadFunction, opt_o
};
inherits(VectorTile, _ol_Tile_);
inherits(VectorTile, Tile);
/**
* @const
@@ -92,7 +92,7 @@ VectorTile.prototype.disposeInternal = function() {
this.replayGroups_ = {};
this.state = TileState.ABORT;
this.changed();
_ol_Tile_.prototype.disposeInternal.call(this);
Tile.prototype.disposeInternal.call(this);
};

View File

@@ -3,7 +3,7 @@
*/
import {ERROR_THRESHOLD} from './common.js';
import {inherits} from '../index.js';
import _ol_Tile_ from '../Tile.js';
import Tile from '../Tile.js';
import TileState from '../TileState.js';
import _ol_events_ from '../events.js';
import EventType from '../events/EventType.js';
@@ -36,7 +36,7 @@ var ReprojTile = function(sourceProj, sourceTileGrid,
targetProj, targetTileGrid, tileCoord, wrappedTileCoord,
pixelRatio, gutter, getTileFunction,
opt_errorThreshold, opt_renderEdges) {
_ol_Tile_.call(this, tileCoord, TileState.IDLE);
Tile.call(this, tileCoord, TileState.IDLE);
/**
* @private
@@ -187,7 +187,7 @@ var ReprojTile = function(sourceProj, sourceTileGrid,
}
};
inherits(ReprojTile, _ol_Tile_);
inherits(ReprojTile, Tile);
/**
@@ -197,7 +197,7 @@ ReprojTile.prototype.disposeInternal = function() {
if (this.state == TileState.LOADING) {
this.unlistenSources_();
}
_ol_Tile_.prototype.disposeInternal.call(this);
Tile.prototype.disposeInternal.call(this);
};

View File

@@ -2,7 +2,7 @@
* @module ol/source/TileDebug
*/
import {inherits} from '../index.js';
import _ol_Tile_ from '../Tile.js';
import Tile from '../Tile.js';
import TileState from '../TileState.js';
import {createCanvasContext2D} from '../dom.js';
import _ol_size_ from '../size.js';
@@ -66,7 +66,7 @@ TileDebug.prototype.getTile = function(z, x, y) {
*/
TileDebug.Tile_ = function(tileCoord, tileSize, text) {
_ol_Tile_.call(this, tileCoord, TileState.LOADED);
Tile.call(this, tileCoord, TileState.LOADED);
/**
* @private
@@ -87,7 +87,7 @@ TileDebug.Tile_ = function(tileCoord, tileSize, text) {
this.canvas_ = null;
};
inherits(TileDebug.Tile_, _ol_Tile_);
inherits(TileDebug.Tile_, Tile);
/**

View File

@@ -2,7 +2,7 @@
* @module ol/source/TileUTFGrid
*/
import {inherits} from '../index.js';
import _ol_Tile_ from '../Tile.js';
import Tile from '../Tile.js';
import TileState from '../TileState.js';
import {createFromTemplates, nullTileUrlFunction} from '../tileurlfunction.js';
import {assert} from '../asserts.js';
@@ -259,7 +259,7 @@ UTFGrid.prototype.useTile = function(z, x, y) {
*/
UTFGrid.Tile_ = function(tileCoord, state, src, extent, preemptive, jsonp) {
_ol_Tile_.call(this, tileCoord, state);
Tile.call(this, tileCoord, state);
/**
* @private
@@ -305,7 +305,7 @@ UTFGrid.Tile_ = function(tileCoord, state, src, extent, preemptive, jsonp) {
this.jsonp_ = jsonp;
};
inherits(UTFGrid.Tile_, _ol_Tile_);
inherits(UTFGrid.Tile_, Tile);
/**