Rename ol.source.TileEvent to ol.source.Tile.Event
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
goog.provide('ol.source.Tile');
|
||||
goog.provide('ol.source.TileEvent');
|
||||
|
||||
goog.require('ol');
|
||||
goog.require('ol.Tile');
|
||||
@@ -318,11 +317,11 @@ ol.source.Tile.prototype.useTile = ol.nullFunction;
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.events.Event}
|
||||
* @implements {oli.source.TileEvent}
|
||||
* @implements {oli.source.Tile.Event}
|
||||
* @param {string} type Type.
|
||||
* @param {ol.Tile} tile The tile.
|
||||
*/
|
||||
ol.source.TileEvent = function(type, tile) {
|
||||
ol.source.Tile.Event = function(type, tile) {
|
||||
|
||||
ol.events.Event.call(this, type);
|
||||
|
||||
@@ -334,31 +333,31 @@ ol.source.TileEvent = function(type, tile) {
|
||||
this.tile = tile;
|
||||
|
||||
};
|
||||
ol.inherits(ol.source.TileEvent, ol.events.Event);
|
||||
ol.inherits(ol.source.Tile.Event, ol.events.Event);
|
||||
|
||||
|
||||
/**
|
||||
* @enum {string}
|
||||
*/
|
||||
ol.source.TileEventType = {
|
||||
ol.source.Tile.EventType = {
|
||||
|
||||
/**
|
||||
* Triggered when a tile starts loading.
|
||||
* @event ol.source.TileEvent#tileloadstart
|
||||
* @event ol.source.Tile.Event#tileloadstart
|
||||
* @api stable
|
||||
*/
|
||||
TILELOADSTART: 'tileloadstart',
|
||||
|
||||
/**
|
||||
* Triggered when a tile finishes loading.
|
||||
* @event ol.source.TileEvent#tileloadend
|
||||
* @event ol.source.Tile.Event#tileloadend
|
||||
* @api stable
|
||||
*/
|
||||
TILELOADEND: 'tileloadend',
|
||||
|
||||
/**
|
||||
* Triggered if tile loading results in an error.
|
||||
* @event ol.source.TileEvent#tileloaderror
|
||||
* @event ol.source.Tile.Event#tileloaderror
|
||||
* @api stable
|
||||
*/
|
||||
TILELOADERROR: 'tileloaderror'
|
||||
|
||||
@@ -17,7 +17,7 @@ goog.require('ol.tilegrid');
|
||||
* Base class for sources providing images divided into a tile grid.
|
||||
*
|
||||
* @constructor
|
||||
* @fires ol.source.TileEvent
|
||||
* @fires ol.source.Tile.Event
|
||||
* @extends {ol.source.UrlTile}
|
||||
* @param {olx.source.TileImageOptions} options Image tile options.
|
||||
* @api
|
||||
|
||||
@@ -4,7 +4,6 @@ goog.require('ol');
|
||||
goog.require('ol.Tile');
|
||||
goog.require('ol.TileUrlFunction');
|
||||
goog.require('ol.source.Tile');
|
||||
goog.require('ol.source.TileEvent');
|
||||
|
||||
|
||||
/**
|
||||
@@ -12,7 +11,7 @@ goog.require('ol.source.TileEvent');
|
||||
* Base class for sources providing tiles divided into a tile grid over http.
|
||||
*
|
||||
* @constructor
|
||||
* @fires ol.source.TileEvent
|
||||
* @fires ol.source.Tile.Event
|
||||
* @extends {ol.source.Tile}
|
||||
* @param {ol.SourceUrlTileOptions} options Image tile options.
|
||||
*/
|
||||
@@ -112,15 +111,15 @@ ol.source.UrlTile.prototype.handleTileChange = function(event) {
|
||||
switch (tile.getState()) {
|
||||
case ol.Tile.State.LOADING:
|
||||
this.dispatchEvent(
|
||||
new ol.source.TileEvent(ol.source.TileEventType.TILELOADSTART, tile));
|
||||
new ol.source.Tile.Event(ol.source.Tile.EventType.TILELOADSTART, tile));
|
||||
break;
|
||||
case ol.Tile.State.LOADED:
|
||||
this.dispatchEvent(
|
||||
new ol.source.TileEvent(ol.source.TileEventType.TILELOADEND, tile));
|
||||
new ol.source.Tile.Event(ol.source.Tile.EventType.TILELOADEND, tile));
|
||||
break;
|
||||
case ol.Tile.State.ERROR:
|
||||
this.dispatchEvent(
|
||||
new ol.source.TileEvent(ol.source.TileEventType.TILELOADERROR, tile));
|
||||
new ol.source.Tile.Event(ol.source.Tile.EventType.TILELOADERROR, tile));
|
||||
break;
|
||||
default:
|
||||
// pass
|
||||
|
||||
@@ -21,7 +21,7 @@ goog.require('ol.source.UrlTile');
|
||||
* editing.
|
||||
*
|
||||
* @constructor
|
||||
* @fires ol.source.TileEvent
|
||||
* @fires ol.source.Tile.Event
|
||||
* @extends {ol.source.UrlTile}
|
||||
* @param {olx.source.VectorTileOptions} options Vector tile options.
|
||||
* @api
|
||||
|
||||
Reference in New Issue
Block a user