Rename _ol_TileState_ to TileState

This commit is contained in:
Frederic Junod
2017-12-22 09:00:46 +01:00
parent 2130ce7481
commit fc00aecd2e
25 changed files with 159 additions and 159 deletions

View File

@@ -2,7 +2,7 @@
* @module ol/TileQueue
*/
import {inherits} from './index.js';
import _ol_TileState_ from './TileState.js';
import TileState from './TileState.js';
import _ol_events_ from './events.js';
import EventType from './events/EventType.js';
import PriorityQueue from './structs/PriorityQueue.js';
@@ -87,8 +87,8 @@ TileQueue.prototype.getTilesLoading = function() {
TileQueue.prototype.handleTileChange = function(event) {
var tile = /** @type {ol.Tile} */ (event.target);
var state = tile.getState();
if (state === _ol_TileState_.LOADED || state === _ol_TileState_.ERROR ||
state === _ol_TileState_.EMPTY || state === _ol_TileState_.ABORT) {
if (state === TileState.LOADED || state === TileState.ERROR ||
state === TileState.EMPTY || state === TileState.ABORT) {
_ol_events_.unlisten(tile, EventType.CHANGE,
this.handleTileChange, this);
var tileKey = tile.getKey();
@@ -114,9 +114,9 @@ TileQueue.prototype.loadMoreTiles = function(maxTotalLoading, maxNewLoads) {
tile = /** @type {ol.Tile} */ (this.dequeue()[0]);
tileKey = tile.getKey();
state = tile.getState();
if (state === _ol_TileState_.ABORT) {
if (state === TileState.ABORT) {
abortedTiles = true;
} else if (state === _ol_TileState_.IDLE && !(tileKey in this.tilesLoadingKeys_)) {
} else if (state === TileState.IDLE && !(tileKey in this.tilesLoadingKeys_)) {
this.tilesLoadingKeys_[tileKey] = true;
++this.tilesLoading_;
++newLoads;