Named exports from ol/source/Tile
This commit is contained in:
@@ -317,7 +317,7 @@ TileSource.prototype.useTile = nullFunction;
|
|||||||
* @param {string} type Type.
|
* @param {string} type Type.
|
||||||
* @param {ol.Tile} tile The tile.
|
* @param {ol.Tile} tile The tile.
|
||||||
*/
|
*/
|
||||||
TileSource.Event = function(type, tile) {
|
export const TileSourceEvent = function(type, tile) {
|
||||||
|
|
||||||
Event.call(this, type);
|
Event.call(this, type);
|
||||||
|
|
||||||
@@ -329,5 +329,6 @@ TileSource.Event = function(type, tile) {
|
|||||||
this.tile = tile;
|
this.tile = tile;
|
||||||
|
|
||||||
};
|
};
|
||||||
inherits(TileSource.Event, Event);
|
inherits(TileSourceEvent, Event);
|
||||||
|
|
||||||
export default TileSource;
|
export default TileSource;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import {getUid, inherits} from '../index.js';
|
import {getUid, inherits} from '../index.js';
|
||||||
import TileState from '../TileState.js';
|
import TileState from '../TileState.js';
|
||||||
import {expandUrl, createFromTemplates, nullTileUrlFunction} from '../tileurlfunction.js';
|
import {expandUrl, createFromTemplates, nullTileUrlFunction} from '../tileurlfunction.js';
|
||||||
import TileSource from '../source/Tile.js';
|
import TileSource, {TileSourceEvent} from '../source/Tile.js';
|
||||||
import TileEventType from '../source/TileEventType.js';
|
import TileEventType from '../source/TileEventType.js';
|
||||||
import {getKeyZXY} from '../tilecoord.js';
|
import {getKeyZXY} from '../tilecoord.js';
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ UrlTile.prototype.handleTileChange = function(event) {
|
|||||||
TileEventType.TILELOADEND : undefined;
|
TileEventType.TILELOADEND : undefined;
|
||||||
}
|
}
|
||||||
if (type != undefined) {
|
if (type != undefined) {
|
||||||
this.dispatchEvent(new TileSource.Event(type, tile));
|
this.dispatchEvent(new TileSourceEvent(type, tile));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user