Get rid of olx.js and typedef.js typedefs for ol

This commit is contained in:
Andreas Hocevar
2018-03-08 18:42:57 +01:00
parent 8f0ffe2043
commit 95d6251dbb
198 changed files with 2262 additions and 2698 deletions
+7 -7
View File
@@ -50,7 +50,7 @@ const WebGLImageLayerRenderer = function(mapRenderer, imageLayer) {
/**
* @private
* @type {?ol.Transform}
* @type {?module:ol/transform~Transform}
*/
this.hitTransformationMatrix_ = null;
@@ -176,7 +176,7 @@ WebGLImageLayerRenderer.prototype.prepareFrame = function(frameState, layerState
}
}.bind(null, gl, this.texture);
frameState.postRenderFunctions.push(
/** @type {ol.PostRenderFunction} */ (postRenderFunction)
/** @type {module:ol/PluggableMap~PostRenderFunction} */ (postRenderFunction)
);
}
}
@@ -209,10 +209,10 @@ WebGLImageLayerRenderer.prototype.prepareFrame = function(frameState, layerState
* @param {number} canvasWidth Canvas width.
* @param {number} canvasHeight Canvas height.
* @param {number} pixelRatio Pixel ratio.
* @param {ol.Coordinate} viewCenter View center.
* @param {module:ol/coordinate~Coordinate} viewCenter View center.
* @param {number} viewResolution View resolution.
* @param {number} viewRotation View rotation.
* @param {ol.Extent} imageExtent Image extent.
* @param {module:ol/extent~Extent} imageExtent Image extent.
* @private
*/
WebGLImageLayerRenderer.prototype.updateProjectionMatrix_ = function(canvasWidth, canvasHeight, pixelRatio,
@@ -306,9 +306,9 @@ WebGLImageLayerRenderer.prototype.forEachLayerAtPixel = function(pixel, frameSta
/**
* The transformation matrix to get the pixel on the image for a
* pixel on the map.
* @param {ol.Size} mapSize The map size.
* @param {ol.Size} imageSize The image size.
* @return {ol.Transform} The transformation matrix.
* @param {module:ol/size~Size} mapSize The map size.
* @param {module:ol/size~Size} imageSize The image size.
* @return {module:ol/transform~Transform} The transformation matrix.
* @private
*/
WebGLImageLayerRenderer.prototype.getHitTransformationMatrix_ = function(mapSize, imageSize) {
+8 -8
View File
@@ -63,13 +63,13 @@ const WebGLLayerRenderer = function(mapRenderer, layer) {
/**
* @protected
* @type {ol.Transform}
* @type {module:ol/transform~Transform}
*/
this.texCoordMatrix = createTransform();
/**
* @protected
* @type {ol.Transform}
* @type {module:ol/transform~Transform}
*/
this.projectionMatrix = createTransform();
@@ -114,7 +114,7 @@ WebGLLayerRenderer.prototype.bindFramebuffer = function(frameState, framebufferD
}.bind(null, gl, this.framebuffer, this.texture);
frameState.postRenderFunctions.push(
/** @type {ol.PostRenderFunction} */ (postRenderFunction)
/** @type {module:ol/PluggableMap~PostRenderFunction} */ (postRenderFunction)
);
const texture = createEmptyTexture(
@@ -138,7 +138,7 @@ WebGLLayerRenderer.prototype.bindFramebuffer = function(frameState, framebufferD
/**
* @param {olx.FrameState} frameState Frame state.
* @param {ol.LayerState} layerState Layer state.
* @param {module:ol/layer/Layer~State} layerState Layer state.
* @param {ol.webgl.Context} context Context.
*/
WebGLLayerRenderer.prototype.composeFrame = function(frameState, layerState, context) {
@@ -208,7 +208,7 @@ WebGLLayerRenderer.prototype.dispatchComposeEvent_ = function(type, context, fra
/**
* @return {!ol.Transform} Matrix.
* @return {!module:ol/transform~Transform} Matrix.
*/
WebGLLayerRenderer.prototype.getTexCoordMatrix = function() {
return this.texCoordMatrix;
@@ -224,7 +224,7 @@ WebGLLayerRenderer.prototype.getTexture = function() {
/**
* @return {!ol.Transform} Matrix.
* @return {!module:ol/transform~Transform} Matrix.
*/
WebGLLayerRenderer.prototype.getProjectionMatrix = function() {
return this.projectionMatrix;
@@ -244,7 +244,7 @@ WebGLLayerRenderer.prototype.handleWebGLContextLost = function() {
/**
* @abstract
* @param {olx.FrameState} frameState Frame state.
* @param {ol.LayerState} layerState Layer state.
* @param {module:ol/layer/Layer~State} layerState Layer state.
* @param {ol.webgl.Context} context Context.
* @return {boolean} whether composeFrame should be called.
*/
@@ -253,7 +253,7 @@ WebGLLayerRenderer.prototype.prepareFrame = function(frameState, layerState, con
/**
* @abstract
* @param {ol.Pixel} pixel Pixel.
* @param {module:ol~Pixel} pixel Pixel.
* @param {olx.FrameState} frameState FrameState.
* @param {function(this: S, ol.layer.Layer, (Uint8ClampedArray|Uint8Array)): T} callback Layer
* callback.
+6 -6
View File
@@ -109,7 +109,7 @@ const WebGLMapRenderer = function(container, map) {
/**
* @private
* @type {ol.Coordinate}
* @type {module:ol/coordinate~Coordinate}
*/
this.focus_ = null;
@@ -124,7 +124,7 @@ const WebGLMapRenderer = function(container, map) {
* @this {ol.renderer.webgl.Map}
*/
(function(element) {
const tileCenter = /** @type {ol.Coordinate} */ (element[1]);
const tileCenter = /** @type {module:ol/coordinate~Coordinate} */ (element[1]);
const tileResolution = /** @type {number} */ (element[2]);
const deltaX = tileCenter[0] - this.focus_[0];
const deltaY = tileCenter[1] - this.focus_[1];
@@ -152,7 +152,7 @@ const WebGLMapRenderer = function(container, map) {
this.tileTextureQueue_.reprioritize();
const element = this.tileTextureQueue_.dequeue();
const tile = /** @type {ol.Tile} */ (element[0]);
const tileSize = /** @type {ol.Size} */ (element[3]);
const tileSize = /** @type {module:ol/size~Size} */ (element[3]);
const tileGutter = /** @type {number} */ (element[4]);
this.bindTileTexture(
tile, tileSize, tileGutter, LINEAR, LINEAR);
@@ -196,7 +196,7 @@ WebGLMapRenderer['create'] = function(container, map) {
/**
* @param {ol.Tile} tile Tile.
* @param {ol.Size} tileSize Tile size.
* @param {module:ol/size~Size} tileSize Tile size.
* @param {number} tileGutter Tile gutter.
* @param {number} magFilter Mag filter.
* @param {number} minFilter Min filter.
@@ -444,7 +444,7 @@ WebGLMapRenderer.prototype.renderFrame = function(frameState) {
this.dispatchComposeEvent_(RenderEventType.PRECOMPOSE, frameState);
/** @type {Array.<ol.LayerState>} */
/** @type {Array.<module:ol/layer/Layer~State>} */
const layerStatesToDraw = [];
const layerStatesArray = frameState.layerStatesArray;
stableSort(layerStatesArray, sortByZIndex);
@@ -492,7 +492,7 @@ WebGLMapRenderer.prototype.renderFrame = function(frameState) {
if (this.textureCache_.getCount() - this.textureCacheFrameMarkerCount_ >
WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK) {
frameState.postRenderFunctions.push(
/** @type {ol.PostRenderFunction} */ (this.expireCache_.bind(this))
/** @type {module:ol/PluggableMap~PostRenderFunction} */ (this.expireCache_.bind(this))
);
}
+2 -2
View File
@@ -74,7 +74,7 @@ const WebGLTileLayerRenderer = function(mapRenderer, tileLayer) {
/**
* @private
* @type {ol.Extent}
* @type {module:ol/extent~Extent}
*/
this.renderedFramebufferExtent_ = null;
@@ -86,7 +86,7 @@ const WebGLTileLayerRenderer = function(mapRenderer, tileLayer) {
/**
* @private
* @type {ol.Size}
* @type {module:ol/size~Size}
*/
this.tmpSize_ = [0, 0];
+2 -2
View File
@@ -42,7 +42,7 @@ const WebGLVectorLayerRenderer = function(mapRenderer, vectorLayer) {
/**
* @private
* @type {ol.Extent}
* @type {module:ol/extent~Extent}
*/
this.renderedExtent_ = createEmpty();
@@ -61,7 +61,7 @@ const WebGLVectorLayerRenderer = function(mapRenderer, vectorLayer) {
/**
* The last layer state.
* @private
* @type {?ol.LayerState}
* @type {?module:ol/layer/Layer~State}
*/
this.layerState_ = null;