Use Array<Foo> instead of Array.<Foo>
This commit is contained in:
@@ -58,7 +58,7 @@ class Atlas {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<module:ol/style/Atlas~AtlasBlock>}
|
||||
* @type {Array<module:ol/style/Atlas~AtlasBlock>}
|
||||
*/
|
||||
this.emptyBlocks_ = [{x: 0, y: 0, width: size, height: size}];
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ class AtlasManager {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<module:ol/style/Atlas>}
|
||||
* @type {Array<module:ol/style/Atlas>}
|
||||
*/
|
||||
this.atlases_ = [new Atlas(this.currentSize_, this.space_)];
|
||||
|
||||
@@ -103,7 +103,7 @@ class AtlasManager {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<module:ol/style/Atlas>}
|
||||
* @type {Array<module:ol/style/Atlas>}
|
||||
*/
|
||||
this.hitAtlases_ = [new Atlas(this.currentHitSize_, this.space_)];
|
||||
}
|
||||
@@ -127,7 +127,7 @@ class AtlasManager {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {Array.<module:ol/style/Atlas>} atlases The atlases to search.
|
||||
* @param {Array<module:ol/style/Atlas>} atlases The atlases to search.
|
||||
* @param {string} id The identifier of the entry to check.
|
||||
* @return {?module:ol/style/Atlas~AtlasInfo} The position and atlas image for the entry,
|
||||
* or `null` if the entry is not part of the atlases.
|
||||
|
||||
@@ -15,7 +15,7 @@ import ImageStyle from '../style/Image.js';
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {Array.<number>} [anchor=[0.5, 0.5]] Anchor. Default value is the icon center.
|
||||
* @property {Array<number>} [anchor=[0.5, 0.5]] Anchor. Default value is the icon center.
|
||||
* @property {module:ol/style/IconOrigin} [anchorOrigin] Origin of the anchor: `bottom-left`, `bottom-right`,
|
||||
* `top-left` or `top-right`. Default is `top-left`.
|
||||
* @property {module:ol/style/IconAnchorUnits} [anchorXUnits] Units in which the anchor x value is
|
||||
@@ -32,7 +32,7 @@ import ImageStyle from '../style/Image.js';
|
||||
* @property {HTMLImageElement|HTMLCanvasElement} [img] Image object for the icon. If the `src` option is not provided then the
|
||||
* provided image must already be loaded. And in that case, it is required
|
||||
* to provide the size of the image, with the `imgSize` option.
|
||||
* @property {Array.<number>} [offset=[0, 0]] Offset, which, together with the size and the offset origin, define the
|
||||
* @property {Array<number>} [offset=[0, 0]] Offset, which, together with the size and the offset origin, define the
|
||||
* sub-rectangle to use from the original icon image.
|
||||
* @property {module:ol/style/IconOrigin} [offsetOrigin] Origin of the offset: `bottom-left`, `bottom-right`,
|
||||
* `top-left` or `top-right`. Default is `top-left`.
|
||||
@@ -101,13 +101,13 @@ class Icon extends ImageStyle {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<number>}
|
||||
* @type {Array<number>}
|
||||
*/
|
||||
this.anchor_ = options.anchor !== undefined ? options.anchor : [0.5, 0.5];
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<number>}
|
||||
* @type {Array<number>}
|
||||
*/
|
||||
this.normalizedAnchor_ = null;
|
||||
|
||||
@@ -186,7 +186,7 @@ class Icon extends ImageStyle {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<number>}
|
||||
* @type {Array<number>}
|
||||
*/
|
||||
this.offset_ = options.offset !== undefined ? options.offset : [0, 0];
|
||||
|
||||
@@ -199,7 +199,7 @@ class Icon extends ImageStyle {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<number>}
|
||||
* @type {Array<number>}
|
||||
*/
|
||||
this.origin_ = null;
|
||||
|
||||
@@ -284,7 +284,7 @@ class Icon extends ImageStyle {
|
||||
* Set the anchor point. The anchor determines the center point for the
|
||||
* symbolizer.
|
||||
*
|
||||
* @param {Array.<number>} anchor Anchor.
|
||||
* @param {Array<number>} anchor Anchor.
|
||||
* @api
|
||||
*/
|
||||
setAnchor(anchor) {
|
||||
|
||||
@@ -54,7 +54,7 @@ class IconImage extends EventTarget {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<module:ol/events~EventsKey>}
|
||||
* @type {Array<module:ol/events~EventsKey>}
|
||||
*/
|
||||
this.imageListenerKeys_ = null;
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ class ImageStyle {
|
||||
* Get the anchor point in pixels. The anchor determines the center point for the
|
||||
* symbolizer.
|
||||
* @abstract
|
||||
* @return {Array.<number>} Anchor.
|
||||
* @return {Array<number>} Anchor.
|
||||
*/
|
||||
getAnchor() {}
|
||||
|
||||
@@ -147,7 +147,7 @@ class ImageStyle {
|
||||
/**
|
||||
* Get the origin of the symbolizer.
|
||||
* @abstract
|
||||
* @return {Array.<number>} Origin.
|
||||
* @return {Array<number>} Origin.
|
||||
*/
|
||||
getOrigin() {}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ import ImageStyle from '../style/Image.js';
|
||||
* @property {number} strokeWidth
|
||||
* @property {number} size
|
||||
* @property {string} lineCap
|
||||
* @property {Array.<number>} lineDash
|
||||
* @property {Array<number>} lineDash
|
||||
* @property {number} lineDashOffset
|
||||
* @property {string} lineJoin
|
||||
* @property {number} miterLimit
|
||||
@@ -80,7 +80,7 @@ class RegularShape extends ImageStyle {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<string>}
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
this.checksums_ = null;
|
||||
|
||||
@@ -104,7 +104,7 @@ class RegularShape extends ImageStyle {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<number>}
|
||||
* @type {Array<number>}
|
||||
*/
|
||||
this.origin_ = [0, 0];
|
||||
|
||||
@@ -141,7 +141,7 @@ class RegularShape extends ImageStyle {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<number>}
|
||||
* @type {Array<number>}
|
||||
*/
|
||||
this.anchor_ = null;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import {getUid} from '../util.js';
|
||||
* Default null; if null, the Canvas/renderer default black will be used.
|
||||
* @property {string} [lineCap='round'] Line cap style: `butt`, `round`, or `square`.
|
||||
* @property {string} [lineJoin='round'] Line join style: `bevel`, `round`, or `miter`.
|
||||
* @property {Array.<number>} [lineDash] Line dash pattern. Default is `undefined` (no dash).
|
||||
* @property {Array<number>} [lineDash] Line dash pattern. Default is `undefined` (no dash).
|
||||
* Please note that Internet Explorer 10 and lower do not support the `setLineDash` method on
|
||||
* the `CanvasRenderingContext2D` and therefore this option will have no visual effect in these browsers.
|
||||
* @property {number} [lineDashOffset=0] Line dash offset.
|
||||
@@ -50,7 +50,7 @@ class Stroke {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<number>}
|
||||
* @type {Array<number>}
|
||||
*/
|
||||
this.lineDash_ = options.lineDash !== undefined ? options.lineDash : null;
|
||||
|
||||
@@ -123,7 +123,7 @@ class Stroke {
|
||||
|
||||
/**
|
||||
* Get the line dash style for the stroke.
|
||||
* @return {Array.<number>} Line dash.
|
||||
* @return {Array<number>} Line dash.
|
||||
* @api
|
||||
*/
|
||||
getLineDash() {
|
||||
@@ -197,7 +197,7 @@ class Stroke {
|
||||
*
|
||||
* [mdn]: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility
|
||||
*
|
||||
* @param {Array.<number>} lineDash Line dash.
|
||||
* @param {Array<number>} lineDash Line dash.
|
||||
* @api
|
||||
*/
|
||||
setLineDash(lineDash) {
|
||||
|
||||
@@ -100,7 +100,7 @@ import Stroke from '../style/Stroke.js';
|
||||
* vector layer can be styled.
|
||||
*
|
||||
* @typedef {function((module:ol/Feature|module:ol/render/Feature), number):
|
||||
* (module:ol/style/Style|Array.<module:ol/style/Style>)} StyleFunction
|
||||
* (module:ol/style/Style|Array<module:ol/style/Style>)} StyleFunction
|
||||
*/
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ import Stroke from '../style/Stroke.js';
|
||||
* 1. The pixel coordinates of the geometry in GeoJSON notation.
|
||||
* 2. The {@link module:ol/render~State} of the layer renderer.
|
||||
*
|
||||
* @typedef {function((module:ol/coordinate~Coordinate|Array<module:ol/coordinate~Coordinate>|Array.<Array.<module:ol/coordinate~Coordinate>>),module:ol/render~State)}
|
||||
* @typedef {function((module:ol/coordinate~Coordinate|Array<module:ol/coordinate~Coordinate>|Array<Array<module:ol/coordinate~Coordinate>>),module:ol/render~State)}
|
||||
* RenderFunction
|
||||
*/
|
||||
|
||||
@@ -394,7 +394,7 @@ class Style {
|
||||
* Convert the provided object into a style function. Functions passed through
|
||||
* unchanged. Arrays of module:ol/style/Style or single style objects wrapped in a
|
||||
* new style function.
|
||||
* @param {module:ol/style/Style~StyleFunction|Array.<module:ol/style/Style>|module:ol/style/Style} obj
|
||||
* @param {module:ol/style/Style~StyleFunction|Array<module:ol/style/Style>|module:ol/style/Style} obj
|
||||
* A style function, a single style, or an array of styles.
|
||||
* @return {module:ol/style/Style~StyleFunction} A style function.
|
||||
*/
|
||||
@@ -405,7 +405,7 @@ export function toFunction(obj) {
|
||||
styleFunction = obj;
|
||||
} else {
|
||||
/**
|
||||
* @type {Array.<module:ol/style/Style>}
|
||||
* @type {Array<module:ol/style/Style>}
|
||||
*/
|
||||
let styles;
|
||||
if (Array.isArray(obj)) {
|
||||
@@ -424,7 +424,7 @@ export function toFunction(obj) {
|
||||
|
||||
|
||||
/**
|
||||
* @type {Array.<module:ol/style/Style>}
|
||||
* @type {Array<module:ol/style/Style>}
|
||||
*/
|
||||
let defaultStyles = null;
|
||||
|
||||
@@ -432,7 +432,7 @@ let defaultStyles = null;
|
||||
/**
|
||||
* @param {module:ol/Feature|module:ol/render/Feature} feature Feature.
|
||||
* @param {number} resolution Resolution.
|
||||
* @return {Array.<module:ol/style/Style>} Style.
|
||||
* @return {Array<module:ol/style/Style>} Style.
|
||||
*/
|
||||
export function createDefaultStyle(feature, resolution) {
|
||||
// We don't use an immediately-invoked function
|
||||
@@ -466,10 +466,10 @@ export function createDefaultStyle(feature, resolution) {
|
||||
|
||||
/**
|
||||
* Default styles for editing features.
|
||||
* @return {Object.<module:ol/geom/GeometryType, Array.<module:ol/style/Style>>} Styles
|
||||
* @return {Object.<module:ol/geom/GeometryType, Array<module:ol/style/Style>>} Styles
|
||||
*/
|
||||
export function createEditingStyle() {
|
||||
/** @type {Object.<module:ol/geom/GeometryType, Array.<module:ol/style/Style>>} */
|
||||
/** @type {Object.<module:ol/geom/GeometryType, Array<module:ol/style/Style>>} */
|
||||
const styles = {};
|
||||
const white = [255, 255, 255, 1];
|
||||
const blue = [0, 153, 255, 1];
|
||||
|
||||
@@ -40,7 +40,7 @@ const DEFAULT_FILL_COLOR = '#333';
|
||||
* `'point'`. Default is no fill.
|
||||
* @property {module:ol/style/Stroke} [backgroundStroke] Stroke style for the text background when `placement`
|
||||
* is `'point'`. Default is no stroke.
|
||||
* @property {Array.<number>} [padding=[0, 0, 0, 0]] Padding in pixels around the text for decluttering and background. The order of
|
||||
* @property {Array<number>} [padding=[0, 0, 0, 0]] Padding in pixels around the text for decluttering and background. The order of
|
||||
* values in the array is `[top, right, bottom, left]`.
|
||||
*/
|
||||
|
||||
@@ -157,7 +157,7 @@ class Text {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<number>}
|
||||
* @type {Array<number>}
|
||||
*/
|
||||
this.padding_ = options.padding === undefined ? null : options.padding;
|
||||
}
|
||||
@@ -334,7 +334,7 @@ class Text {
|
||||
|
||||
/**
|
||||
* Get the padding for the text.
|
||||
* @return {Array.<number>} Padding.
|
||||
* @return {Array<number>} Padding.
|
||||
* @api
|
||||
*/
|
||||
getPadding() {
|
||||
@@ -494,7 +494,7 @@ class Text {
|
||||
/**
|
||||
* Set the padding (`[top, right, bottom, left]`).
|
||||
*
|
||||
* @param {!Array.<number>} padding Padding.
|
||||
* @param {!Array<number>} padding Padding.
|
||||
* @api
|
||||
*/
|
||||
setPadding(padding) {
|
||||
|
||||
Reference in New Issue
Block a user