Rename ol.source.TileEvent to ol.source.Tile.Event

This commit is contained in:
Tim Schaub
2016-08-31 06:29:50 -06:00
parent c316e5f39a
commit 74047e747d
6 changed files with 24 additions and 24 deletions

View File

@@ -8,19 +8,21 @@ As last step in the removal of the dependency on Google Closure Library, the `go
A number of internal types have been renamed. This will not affect those who use the API provided by the library, but if you are compiling your application together with OpenLayers and using type names, you'll need to do the following:
* rename `ol.style.IconAnchorUnits` to `ol.style.Icon.AnchorUnits`
* rename `ol.style.IconOrigin` to `ol.style.Icon.Origin`
* rename `ol.format.IGCZ` to `ol.format.IGC.Z`
* rename `ol.layer.GroupProperty` to `ol.layer.Group.Property`
* rename `ol.CollectionProperty` to `ol.Collection.Property`
* rename `ol.DeviceOrientationProperty` to `ol.DeviceOrientation.Property`
* rename `ol.GeolocationProperty` to `ol.Geolocation.Property`
* rename `ol.OverlayProperty` to `ol.Overlay.Property`
* rename `ol.OverlayPositioning` to `ol.Overlay.Positioning`
* rename `ol.OverlayProperty` to `ol.Overlay.Property`
* rename `ol.control.MousePositionProperty` to `ol.control.MousePosition.Property`
* rename `ol.layer.VectorTileRenderType` to `ol.layer.VectorTile.RenderType`
* rename `ol.source.WMTSRequestEncoding` to `ol.source.WMTS.RequestEncoding`
* rename `ol.format.IGCZ` to `ol.format.IGC.Z`
* rename `ol.layer.GroupProperty` to `ol.layer.Group.Property`
* rename `ol.layer.HeatmapLayerProperty` to `ol.layer.Heatmap.Property`
* rename `ol.layer.VectorTileRenderType` to `ol.layer.VectorTile.RenderType`
* rename `ol.source.TileEvent` to `ol.source.Tile.Event`
* rename `ol.source.TileEventType` to `ol.source.Tile.EventType`
* rename `ol.source.WMTSRequestEncoding` to `ol.source.WMTS.RequestEncoding`
* rename `ol.style.IconAnchorUnits` to `ol.style.Icon.AnchorUnits`
* rename `ol.style.IconOrigin` to `ol.style.Icon.Origin`
### v3.18.0

View File

@@ -347,13 +347,13 @@ oli.source.RasterEvent.prototype.data;
/**
* @interface
*/
oli.source.TileEvent = function() {};
oli.source.Tile.Event = function() {};
/**
* @type {ol.Tile}
*/
oli.source.TileEvent.prototype.tile;
oli.source.Tile.Event.prototype.tile;
/**

View File

@@ -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'

View File

@@ -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

View File

@@ -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

View File

@@ -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