Shorter module paths for default exports

This commit is contained in:
ahocevar
2018-04-25 17:23:56 +02:00
parent 6cb115d6a4
commit 440d1ad3e1
233 changed files with 2136 additions and 2042 deletions
+20 -20
View File
@@ -98,7 +98,7 @@ inherits(CanvasVectorTileLayerRenderer, CanvasTileLayerRenderer);
/**
* Determine if this renderer handles the provided layer.
* @param {module:ol/layer/Layer~Layer} layer The candidate layer.
* @param {module:ol/layer/Layer} layer The candidate layer.
* @return {boolean} The renderer can render the layer.
*/
CanvasVectorTileLayerRenderer['handles'] = function(layer) {
@@ -109,7 +109,7 @@ CanvasVectorTileLayerRenderer['handles'] = function(layer) {
/**
* Create a layer renderer.
* @param {ol.renderer.Map} mapRenderer The map renderer.
* @param {module:ol/layer/Layer~Layer} layer The layer to be rendererd.
* @param {module:ol/layer/Layer} layer The layer to be rendererd.
* @return {ol.renderer.canvas.VectorTileLayer} The layer renderer.
*/
CanvasVectorTileLayerRenderer['create'] = function(mapRenderer, layer) {
@@ -148,7 +148,7 @@ CanvasVectorTileLayerRenderer.prototype.prepareFrame = function(frameState, laye
/**
* @param {module:ol/VectorImageTile~VectorImageTile} tile Tile.
* @param {module:ol/VectorImageTile} tile Tile.
* @param {module:ol/PluggableMap~FrameState} frameState Frame state.
* @private
*/
@@ -165,7 +165,7 @@ CanvasVectorTileLayerRenderer.prototype.createReplayGroup_ = function(tile, fram
return;
}
const source = /** @type {module:ol/source/VectorTile~VectorTile} */ (layer.getSource());
const source = /** @type {module:ol/source/VectorTile} */ (layer.getSource());
const sourceTileGrid = source.getTileGrid();
const tileGrid = source.getTileGridForProjection(projection);
const resolution = tileGrid.getResolution(tile.tileCoord[0]);
@@ -195,7 +195,7 @@ CanvasVectorTileLayerRenderer.prototype.createReplayGroup_ = function(tile, fram
const squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio);
/**
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
* @param {module:ol/Feature|module:ol/render/Feature} feature Feature.
* @this {ol.renderer.canvas.VectorTileLayer}
*/
const render = function(feature) {
@@ -246,7 +246,7 @@ CanvasVectorTileLayerRenderer.prototype.createReplayGroup_ = function(tile, fram
*/
CanvasVectorTileLayerRenderer.prototype.drawTileImage = function(
tile, frameState, layerState, x, y, w, h, gutter, transition) {
const vectorImageTile = /** @type {module:ol/VectorImageTile~VectorImageTile} */ (tile);
const vectorImageTile = /** @type {module:ol/VectorImageTile} */ (tile);
this.createReplayGroup_(vectorImageTile, frameState);
if (this.context) {
this.renderTileImage_(vectorImageTile, frameState, layerState);
@@ -266,10 +266,10 @@ CanvasVectorTileLayerRenderer.prototype.forEachFeatureAtCoordinate = function(co
/** @type {!Object.<string, boolean>} */
const features = {};
/** @type {Array.<module:ol/VectorImageTile~VectorImageTile>} */
/** @type {Array.<module:ol/VectorImageTile>} */
const renderedTiles = this.renderedTiles;
const source = /** @type {module:ol/source/VectorTile~VectorTile} */ (layer.getSource());
const source = /** @type {module:ol/source/VectorTile} */ (layer.getSource());
const tileGrid = source.getTileGridForProjection(frameState.viewState.projection);
let bufferedExtent, found;
let i, ii, replayGroup;
@@ -290,7 +290,7 @@ CanvasVectorTileLayerRenderer.prototype.forEachFeatureAtCoordinate = function(co
replayGroup = sourceTile.getReplayGroup(layer, tile.tileCoord.toString());
found = found || replayGroup.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {},
/**
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
* @param {module:ol/Feature|module:ol/render/Feature} feature Feature.
* @return {?} Callback result.
*/
function(feature) {
@@ -307,14 +307,14 @@ CanvasVectorTileLayerRenderer.prototype.forEachFeatureAtCoordinate = function(co
/**
* @param {module:ol/VectorTile~VectorTile} tile Tile.
* @param {module:ol/VectorTile} tile Tile.
* @param {module:ol/PluggableMap~FrameState} frameState Frame state.
* @return {module:ol/transform~Transform} transform Transform.
* @private
*/
CanvasVectorTileLayerRenderer.prototype.getReplayTransform_ = function(tile, frameState) {
const layer = this.getLayer();
const source = /** @type {module:ol/source/VectorTile~VectorTile} */ (layer.getSource());
const source = /** @type {module:ol/source/VectorTile} */ (layer.getSource());
const tileGrid = source.getTileGrid();
const tileCoord = tile.tileCoord;
const tileResolution = tileGrid.getResolution(tileCoord[0]);
@@ -337,7 +337,7 @@ CanvasVectorTileLayerRenderer.prototype.getReplayTransform_ = function(tile, fra
/**
* @param {module:ol/events/Event~Event} event Event.
* @param {module:ol/events/Event} event Event.
*/
CanvasVectorTileLayerRenderer.prototype.handleFontsChanged_ = function(event) {
const layer = this.getLayer();
@@ -349,7 +349,7 @@ CanvasVectorTileLayerRenderer.prototype.handleFontsChanged_ = function(event) {
/**
* Handle changes in image style state.
* @param {module:ol/events/Event~Event} event Image style change event.
* @param {module:ol/events/Event} event Image style change event.
* @private
*/
CanvasVectorTileLayerRenderer.prototype.handleStyleImageChange_ = function(event) {
@@ -363,7 +363,7 @@ CanvasVectorTileLayerRenderer.prototype.handleStyleImageChange_ = function(event
CanvasVectorTileLayerRenderer.prototype.postCompose = function(context, frameState, layerState) {
const layer = this.getLayer();
const declutterReplays = layer.getDeclutter() ? {} : null;
const source = /** @type {module:ol/source/VectorTile~VectorTile} */ (layer.getSource());
const source = /** @type {module:ol/source/VectorTile} */ (layer.getSource());
const renderMode = layer.getRenderMode();
const replayTypes = VECTOR_REPLAYS[renderMode];
const pixelRatio = frameState.pixelRatio;
@@ -383,7 +383,7 @@ CanvasVectorTileLayerRenderer.prototype.postCompose = function(context, frameSta
const clips = [];
const zs = [];
for (let i = tiles.length - 1; i >= 0; --i) {
const tile = /** @type {module:ol/VectorImageTile~VectorImageTile} */ (tiles[i]);
const tile = /** @type {module:ol/VectorImageTile} */ (tiles[i]);
if (tile.getState() == TileState.ABORT) {
continue;
}
@@ -444,10 +444,10 @@ CanvasVectorTileLayerRenderer.prototype.postCompose = function(context, frameSta
/**
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
* @param {module:ol/Feature|module:ol/render/Feature} feature Feature.
* @param {number} squaredTolerance Squared tolerance.
* @param {(module:ol/style/Style~Style|Array.<module:ol/style/Style~Style>)} styles The style or array of styles.
* @param {module:ol/render/canvas/ReplayGroup~CanvasReplayGroup} replayGroup Replay group.
* @param {(module:ol/style/Style|Array.<module:ol/style/Style>)} styles The style or array of styles.
* @param {module:ol/render/canvas/ReplayGroup} replayGroup Replay group.
* @return {boolean} `true` if an image is loading.
*/
CanvasVectorTileLayerRenderer.prototype.renderFeature = function(feature, squaredTolerance, styles, replayGroup) {
@@ -471,7 +471,7 @@ CanvasVectorTileLayerRenderer.prototype.renderFeature = function(feature, square
/**
* @param {module:ol/VectorImageTile~VectorImageTile} tile Tile.
* @param {module:ol/VectorImageTile} tile Tile.
* @param {module:ol/PluggableMap~FrameState} frameState Frame state.
* @param {module:ol/layer/Layer~State} layerState Layer state.
* @private
@@ -487,7 +487,7 @@ CanvasVectorTileLayerRenderer.prototype.renderTileImage_ = function(
const tileCoord = tile.wrappedTileCoord;
const z = tileCoord[0];
const pixelRatio = frameState.pixelRatio;
const source = /** @type {module:ol/source/VectorTile~VectorTile} */ (layer.getSource());
const source = /** @type {module:ol/source/VectorTile} */ (layer.getSource());
const tileGrid = source.getTileGridForProjection(frameState.viewState.projection);
const resolution = tileGrid.getResolution(z);
const context = tile.getContext(layer);