Use Object<Foo, Bar> instead of Object.<Foo, Bar>
This commit is contained in:
@@ -28,7 +28,7 @@ const tmpTransform = createTransform();
|
||||
* @param {Array<number>} flatCoordinates Flat coordinates. These always need
|
||||
* to be right-handed for polygons.
|
||||
* @param {Array<number>|Array<Array<number>>} ends Ends or Endss.
|
||||
* @param {Object.<string, *>} properties Properties.
|
||||
* @param {Object<string, *>} properties Properties.
|
||||
* @param {number|string|undefined} id Feature id.
|
||||
*/
|
||||
class RenderFeature {
|
||||
@@ -77,7 +77,7 @@ class RenderFeature {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Object.<string, *>}
|
||||
* @type {Object<string, *>}
|
||||
*/
|
||||
this.properties_ = properties;
|
||||
|
||||
@@ -194,7 +194,7 @@ class RenderFeature {
|
||||
|
||||
/**
|
||||
* Get the feature properties.
|
||||
* @return {Object.<string, *>} Feature properties.
|
||||
* @return {Object<string, *>} Feature properties.
|
||||
* @api
|
||||
*/
|
||||
getProperties() {
|
||||
|
||||
@@ -163,7 +163,7 @@ export const labelCache = new LRUCache();
|
||||
|
||||
|
||||
/**
|
||||
* @type {!Object.<string, number>}
|
||||
* @type {!Object<string, number>}
|
||||
*/
|
||||
export const checkedFonts = {};
|
||||
|
||||
@@ -175,7 +175,7 @@ let measureContext = null;
|
||||
|
||||
|
||||
/**
|
||||
* @type {!Object.<string, number>}
|
||||
* @type {!Object<string, number>}
|
||||
*/
|
||||
export const textHeights = {};
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ class CanvasReplay extends VectorContext {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {!Object.<number,module:ol/coordinate~Coordinate|Array<module:ol/coordinate~Coordinate>|Array<Array<module:ol/coordinate~Coordinate>>>}
|
||||
* @type {!Object<number,module:ol/coordinate~Coordinate|Array<module:ol/coordinate~Coordinate>|Array<Array<module:ol/coordinate~Coordinate>>>}
|
||||
*/
|
||||
this.coordinateCache_ = {};
|
||||
|
||||
@@ -530,7 +530,7 @@ class CanvasReplay extends VectorContext {
|
||||
* @private
|
||||
* @param {CanvasRenderingContext2D} context Context.
|
||||
* @param {module:ol/transform~Transform} transform Transform.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* @param {Object<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {Array<*>} instructions Instructions array.
|
||||
* @param {function((module:ol/Feature|module:ol/render/Feature)): T|undefined} featureCallback Feature callback.
|
||||
@@ -851,7 +851,7 @@ class CanvasReplay extends VectorContext {
|
||||
* @param {CanvasRenderingContext2D} context Context.
|
||||
* @param {module:ol/transform~Transform} transform Transform.
|
||||
* @param {number} viewRotation View rotation.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* @param {Object<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
*/
|
||||
replay(context, transform, viewRotation, skippedFeaturesHash) {
|
||||
@@ -864,7 +864,7 @@ class CanvasReplay extends VectorContext {
|
||||
* @param {CanvasRenderingContext2D} context Context.
|
||||
* @param {module:ol/transform~Transform} transform Transform.
|
||||
* @param {number} viewRotation View rotation.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* @param {Object<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {function((module:ol/Feature|module:ol/render/Feature)): T=} opt_featureCallback
|
||||
* Feature callback.
|
||||
|
||||
@@ -19,7 +19,7 @@ import {create as createTransform, compose as composeTransform} from '../../tran
|
||||
|
||||
|
||||
/**
|
||||
* @type {Object.<module:ol/render/ReplayType,
|
||||
* @type {Object<module:ol/render/ReplayType,
|
||||
* function(new: module:ol/render/canvas/Replay, number, module:ol/extent~Extent,
|
||||
* number, number, boolean, Array<module:ol/render/canvas~DeclutterGroup>)>}
|
||||
*/
|
||||
@@ -104,7 +104,7 @@ class CanvasReplayGroup extends ReplayGroup {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {!Object.<string, !Object.<module:ol/render/ReplayType, module:ol/render/canvas/Replay>>}
|
||||
* @type {!Object<string, !Object<module:ol/render/ReplayType, module:ol/render/canvas/Replay>>}
|
||||
*/
|
||||
this.replaysByZIndex_ = {};
|
||||
|
||||
@@ -186,9 +186,9 @@ class CanvasReplayGroup extends ReplayGroup {
|
||||
* @param {number} resolution Resolution.
|
||||
* @param {number} rotation Rotation.
|
||||
* @param {number} hitTolerance Hit tolerance in pixels.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {function((module:ol/Feature|module:ol/render/Feature)): T} callback Feature callback.
|
||||
* @param {Object.<string, module:ol/render/canvas~DeclutterGroup>} declutterReplays Declutter replays.
|
||||
* @param {Object<string, module:ol/render/canvas~DeclutterGroup>} declutterReplays Declutter replays.
|
||||
* @return {T|undefined} Callback result.
|
||||
* @template T
|
||||
*/
|
||||
@@ -335,7 +335,7 @@ class CanvasReplayGroup extends ReplayGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Object.<string, Object.<module:ol/render/ReplayType, module:ol/render/canvas/Replay>>} Replays.
|
||||
* @return {Object<string, Object<module:ol/render/ReplayType, module:ol/render/canvas/Replay>>} Replays.
|
||||
*/
|
||||
getReplays() {
|
||||
return this.replaysByZIndex_;
|
||||
@@ -352,10 +352,10 @@ class CanvasReplayGroup extends ReplayGroup {
|
||||
* @param {CanvasRenderingContext2D} context Context.
|
||||
* @param {module:ol/transform~Transform} transform Transform.
|
||||
* @param {number} viewRotation View rotation.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {Array<module:ol/render/ReplayType>=} opt_replayTypes Ordered replay types to replay.
|
||||
* Default is {@link module:ol/render/replay~ORDER}
|
||||
* @param {Object.<string, module:ol/render/canvas~DeclutterGroup>=} opt_declutterReplays Declutter replays.
|
||||
* @param {Object<string, module:ol/render/canvas~DeclutterGroup>=} opt_declutterReplays Declutter replays.
|
||||
*/
|
||||
replay(
|
||||
context,
|
||||
@@ -407,7 +407,7 @@ class CanvasReplayGroup extends ReplayGroup {
|
||||
/**
|
||||
* This cache is used for storing calculated pixel circles for increasing performance.
|
||||
* It is a static property to allow each Replaygroup to access it.
|
||||
* @type {Object.<number, Array<Array<(boolean|undefined)>>>}
|
||||
* @type {Object<number, Array<Array<(boolean|undefined)>>>}
|
||||
*/
|
||||
const circleArrayCache = {
|
||||
0: [[true]]
|
||||
@@ -483,7 +483,7 @@ export function getCircleArray(radius) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {!Object.<string, Array<*>>} declutterReplays Declutter replays.
|
||||
* @param {!Object<string, Array<*>>} declutterReplays Declutter replays.
|
||||
* @param {CanvasRenderingContext2D} context Context.
|
||||
* @param {number} rotation Rotation.
|
||||
*/
|
||||
|
||||
@@ -75,7 +75,7 @@ class CanvasTextReplay extends CanvasReplay {
|
||||
this.textFillState_ = null;
|
||||
|
||||
/**
|
||||
* @type {!Object.<string, module:ol/render/canvas~FillState>}
|
||||
* @type {!Object<string, module:ol/render/canvas~FillState>}
|
||||
*/
|
||||
this.fillStates = {};
|
||||
|
||||
@@ -86,7 +86,7 @@ class CanvasTextReplay extends CanvasReplay {
|
||||
this.textStrokeState_ = null;
|
||||
|
||||
/**
|
||||
* @type {!Object.<string, module:ol/render/canvas~StrokeState>}
|
||||
* @type {!Object<string, module:ol/render/canvas~StrokeState>}
|
||||
*/
|
||||
this.strokeStates = {};
|
||||
|
||||
@@ -97,7 +97,7 @@ class CanvasTextReplay extends CanvasReplay {
|
||||
this.textState_ = /** @type {module:ol/render/canvas~TextState} */ ({});
|
||||
|
||||
/**
|
||||
* @type {!Object.<string, module:ol/render/canvas~TextState>}
|
||||
* @type {!Object<string, module:ol/render/canvas~TextState>}
|
||||
*/
|
||||
this.textStates = {};
|
||||
|
||||
@@ -121,7 +121,7 @@ class CanvasTextReplay extends CanvasReplay {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Object.<string, Object.<string, number>>}
|
||||
* @type {Object<string, Object<string, number>>}
|
||||
*/
|
||||
this.widths_ = {};
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ class WebGLImageReplay extends WebGLTextureReplay {
|
||||
this.indicesBuffer = new WebGLBuffer(indices);
|
||||
|
||||
// create textures
|
||||
/** @type {Object.<string, WebGLTexture>} */
|
||||
/** @type {Object<string, WebGLTexture>} */
|
||||
const texturePerImage = {};
|
||||
|
||||
this.createTextures(this.textures_, this.images_, texturePerImage, gl);
|
||||
|
||||
@@ -160,7 +160,7 @@ class WebGLReplay extends VectorContext {
|
||||
* @protected
|
||||
* @param {WebGLRenderingContext} gl gl.
|
||||
* @param {module:ol/webgl/Context} context Context.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {boolean} hitDetection Hit detection mode.
|
||||
*/
|
||||
drawReplay(gl, context, skippedFeaturesHash, hitDetection) {}
|
||||
@@ -170,7 +170,7 @@ class WebGLReplay extends VectorContext {
|
||||
* @protected
|
||||
* @param {WebGLRenderingContext} gl gl.
|
||||
* @param {module:ol/webgl/Context} context Context.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {function((module:ol/Feature|module:ol/render/Feature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting this extent are checked.
|
||||
* @return {T|undefined} Callback result.
|
||||
@@ -182,7 +182,7 @@ class WebGLReplay extends VectorContext {
|
||||
* @protected
|
||||
* @param {WebGLRenderingContext} gl gl.
|
||||
* @param {module:ol/webgl/Context} context Context.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {function((module:ol/Feature|module:ol/render/Feature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
|
||||
* @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting this extent are checked.
|
||||
@@ -205,7 +205,7 @@ class WebGLReplay extends VectorContext {
|
||||
* @protected
|
||||
* @param {WebGLRenderingContext} gl gl.
|
||||
* @param {module:ol/webgl/Context} context Context.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {function((module:ol/Feature|module:ol/render/Feature)): T|undefined} featureCallback Feature callback.
|
||||
* @return {T|undefined} Callback result.
|
||||
* @template T
|
||||
@@ -230,7 +230,7 @@ class WebGLReplay extends VectorContext {
|
||||
* @param {module:ol/size~Size} size Size.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {number} opacity Global opacity.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {function((module:ol/Feature|module:ol/render/Feature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
|
||||
* @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting this extent are checked.
|
||||
|
||||
@@ -19,7 +19,7 @@ import WebGLTextReplay from '../webgl/TextReplay.js';
|
||||
const HIT_DETECTION_SIZE = [1, 1];
|
||||
|
||||
/**
|
||||
* @type {Object.<module:ol/render/ReplayType,
|
||||
* @type {Object<module:ol/render/ReplayType,
|
||||
* function(new: module:ol/render/webgl/Replay, number,
|
||||
* module:ol/extent~Extent)>}
|
||||
*/
|
||||
@@ -61,8 +61,8 @@ class WebGLReplayGroup extends ReplayGroup {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {!Object.<string,
|
||||
* Object.<module:ol/render/ReplayType, module:ol/render/webgl/Replay>>}
|
||||
* @type {!Object<string,
|
||||
* Object<module:ol/render/ReplayType, module:ol/render/webgl/Replay>>}
|
||||
*/
|
||||
this.replaysByZIndex_ = {};
|
||||
|
||||
@@ -148,7 +148,7 @@ class WebGLReplayGroup extends ReplayGroup {
|
||||
* @param {module:ol/size~Size} size Size.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {number} opacity Global opacity.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
*/
|
||||
replay(
|
||||
context,
|
||||
@@ -188,7 +188,7 @@ class WebGLReplayGroup extends ReplayGroup {
|
||||
* @param {module:ol/size~Size} size Size.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {number} opacity Global opacity.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {function((module:ol/Feature|module:ol/render/Feature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
|
||||
* @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting
|
||||
@@ -242,7 +242,7 @@ class WebGLReplayGroup extends ReplayGroup {
|
||||
* @param {module:ol/size~Size} size Size.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {number} opacity Global opacity.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {function((module:ol/Feature|module:ol/render/Feature)): T|undefined} callback Feature callback.
|
||||
* @return {T|undefined} Callback result.
|
||||
* @template T
|
||||
@@ -303,7 +303,7 @@ class WebGLReplayGroup extends ReplayGroup {
|
||||
* @param {module:ol/size~Size} size Size.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {number} opacity Global opacity.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @return {boolean} Is there a feature at the given coordinate?
|
||||
*/
|
||||
hasFeatureAtCoordinate(
|
||||
|
||||
@@ -17,7 +17,7 @@ import WebGLBuffer from '../../webgl/Buffer.js';
|
||||
/**
|
||||
* @typedef {Object} GlyphAtlas
|
||||
* @property {module:ol/style/AtlasManager} atlas
|
||||
* @property {Object.<string, number>} width
|
||||
* @property {Object<string, number>} width
|
||||
* @property {number} height
|
||||
*/
|
||||
|
||||
@@ -106,7 +106,7 @@ class WebGLTextReplay extends WebGLTextureReplay {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Object.<string, module:ol/render/webgl/TextReplay~GlyphAtlas>}
|
||||
* @type {Object<string, module:ol/render/webgl/TextReplay~GlyphAtlas>}
|
||||
*/
|
||||
this.atlases_ = {};
|
||||
|
||||
@@ -313,7 +313,7 @@ class WebGLTextReplay extends WebGLTextureReplay {
|
||||
this.indicesBuffer = new WebGLBuffer(this.indices);
|
||||
|
||||
// create textures
|
||||
/** @type {Object.<string, WebGLTexture>} */
|
||||
/** @type {Object<string, WebGLTexture>} */
|
||||
const texturePerImage = {};
|
||||
|
||||
this.createTextures(this.textures_, this.images_, texturePerImage, gl);
|
||||
|
||||
@@ -235,7 +235,7 @@ class WebGLTextureReplay extends WebGLReplay {
|
||||
* @protected
|
||||
* @param {Array<WebGLTexture>} textures Textures.
|
||||
* @param {Array<HTMLCanvasElement|HTMLImageElement|HTMLVideoElement>} images Images.
|
||||
* @param {!Object.<string, WebGLTexture>} texturePerImage Texture cache.
|
||||
* @param {!Object<string, WebGLTexture>} texturePerImage Texture cache.
|
||||
* @param {WebGLRenderingContext} gl Gl.
|
||||
*/
|
||||
createTextures(textures, images, texturePerImage, gl) {
|
||||
@@ -351,7 +351,7 @@ class WebGLTextureReplay extends WebGLReplay {
|
||||
* @protected
|
||||
* @param {WebGLRenderingContext} gl gl.
|
||||
* @param {module:ol/webgl/Context} context Context.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* @param {Object<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {Array<WebGLTexture>} textures Textures.
|
||||
* @param {Array<number>} groupIndices Texture group indices.
|
||||
|
||||
Reference in New Issue
Block a user