Mark optional property with square brackets
This commit is contained in:
@@ -68,9 +68,9 @@ import {create as createTransform, apply as applyTransform} from './transform.js
|
||||
* {@link ol.layer.Layer layer-candidate} and it should return a boolean value.
|
||||
* Only layers which are visible and for which this function returns `true`
|
||||
* will be tested for features. By default, all visible layers will be tested.
|
||||
* @property {number|undefined} hitTolerance Hit-detection tolerance in pixels. Pixels
|
||||
* @property {number} [hitTolerance=0] Hit-detection tolerance in pixels. Pixels
|
||||
* inside the radius around the given position will be checked for features. This only
|
||||
* works for the canvas renderer and not for WebGL. Default is `0`.
|
||||
* works for the canvas renderer and not for WebGL.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -35,10 +35,8 @@ import EventType from './events/EventType.js';
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {number|undefined} transition A duration for tile opacity
|
||||
* transitions. By default, tiles will render with an opacity transition that
|
||||
* lasts 250 ms. To change the duration, pass a number in milliseconds. A
|
||||
* duration of 0 disables the opacity transition.
|
||||
* @property {number} [transition=250] A duration for tile opacity
|
||||
* transitions in milliseconds. A duration of 0 disables the opacity transition.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -90,8 +88,7 @@ const Tile = function(tileCoord, state, opt_options) {
|
||||
* The duration for the opacity transition.
|
||||
* @type {number}
|
||||
*/
|
||||
this.transition_ = options.transition === undefined ?
|
||||
250 : options.transition;
|
||||
this.transition_ = options.transition === undefined ? 250 : options.transition;
|
||||
|
||||
/**
|
||||
* Lookup of start times for rendering transitions. If the start time is
|
||||
|
||||
@@ -9,7 +9,7 @@ import Zoom from './control/Zoom.js';
|
||||
|
||||
/**
|
||||
* @typedef {Object} DefaultsOptions
|
||||
* @property {boolean|undefined} [attribution=true] Include
|
||||
* @property {boolean} [attribution=true] Include
|
||||
* {@link module:ol/control/Attribution~Attribution}.
|
||||
* @property {module:ol/control/Attribution~AttributionOptions} [attributionOptions]
|
||||
* Options for {@link module:ol/control/Attribution~Attribution}.
|
||||
|
||||
@@ -11,13 +11,13 @@ import {listen, unlistenByKey} from '../events.js';
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {Element|undefined} element The element is the control's
|
||||
* @property {Element} [element] The element is the control's
|
||||
* container element. This only needs to be specified if you're developing
|
||||
* a custom control.
|
||||
* @property {function(module:ol/MapEvent~MapEvent)|undefined} render Function called when
|
||||
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when
|
||||
* the control should be re-rendered. This is called in a `requestAnimationFrame`
|
||||
* callback.
|
||||
* @property {Element|string|undefined} target Specify a target if you want
|
||||
* @property {Element|string} [target] Specify a target if you want
|
||||
* the control to be rendered outside of the map's viewport.
|
||||
*/
|
||||
|
||||
|
||||
@@ -34,20 +34,17 @@ const getChangeType = (function() {
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {string|undefined} className CSS class name. Default is
|
||||
* `'ol-full-screen'`.
|
||||
* @property {string|Element|undefined} label Text label to use for the button.
|
||||
* Default is `'\u2922'` (NORTH EAST AND SOUTH WEST ARROW).
|
||||
* @property {string} [className='ol-full-screen'] CSS class name.
|
||||
* @property {string|Element} [label='\u2922'] Text label to use for the button.
|
||||
* Instead of text, also an element (e.g. a `span` element) can be used.
|
||||
* @property {string|Element|undefined} labelActive Text label to use for the
|
||||
* button when full-screen is active. Default is `'\u00d7'` (a cross).
|
||||
* @property {string|Element} [labelActive='\u00d7'] Text label to use for the
|
||||
* button when full-screen is active.
|
||||
* Instead of text, also an element (e.g. a `span` element) can be used.
|
||||
* @property {string|undefined} tipLabel Text label to use for the button tip.
|
||||
* Default is `'Toggle full-screen'`.
|
||||
* @property {boolean|undefined} keys Full keyboard access.
|
||||
* @property {Element|string|undefined} target Specify a target if you want the
|
||||
* @property {string} [tipLabel='Toggle full-screen'] Text label to use for the button tip.
|
||||
* @property {boolean} [keys=false] Full keyboard access.
|
||||
* @property {Element|string} [target] Specify a target if you want the
|
||||
* control to be rendered outside of the map's viewport.
|
||||
* @property {Element|string|undefined} source The element to be displayed
|
||||
* @property {Element|string} [source] The element to be displayed
|
||||
* fullscreen. When not provided, the element containing the map viewport will
|
||||
* be displayed fullscreen.
|
||||
*/
|
||||
|
||||
@@ -50,7 +50,7 @@ GEOMETRY_WRITERS[GeometryType.MULTI_POLYGON] = writeMultiPolygonGeometry;
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {string|undefined} geometryName Geometry name to use when creating features.
|
||||
* @property {string} [geometryName] Geometry name to use when creating features.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import {get as getProjection, equivalent as equivalentProjection, transformExten
|
||||
* @property {ol.ProjectionLike} featureProjection Projection of the feature geometries
|
||||
* that will be serialized by the format writer. If not provided, geometries are assumed
|
||||
* to be in the `dataProjection` if that is set; in other words, they are not transformed.
|
||||
* @property {boolean|undefined} rightHanded When writing geometries, follow the right-hand
|
||||
* @property {boolean} [rightHanded] When writing geometries, follow the right-hand
|
||||
* rule for linear ring orientation. This means that polygons will have counter-clockwise
|
||||
* exterior rings and clockwise interior rings. By default, coordinates are serialized
|
||||
* as they are provided at construction. If `true`, the right-hand rule will
|
||||
@@ -38,7 +38,7 @@ import {get as getProjection, equivalent as equivalentProjection, transformExten
|
||||
* exterior and counter-clockwise for interior rings). Note that not all
|
||||
* formats support this. The GeoJSON format does use this property when writing
|
||||
* geometries.
|
||||
* @property {number|undefined} decimals Maximum number of decimal places for coordinates.
|
||||
* @property {number} [decimals] Maximum number of decimal places for coordinates.
|
||||
* Coordinates are stored internally as floats, but floating-point arithmetic can create
|
||||
* coordinates with a large number of decimal places, not generally wanted on output.
|
||||
* Set a number here to round coordinates. Can also be used to ensure that
|
||||
|
||||
@@ -20,7 +20,7 @@ import {createElementNS, makeArrayPusher, makeArraySerializer, makeChildAppender
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {function(module:ol/Feature~Feature, Node)|undefined} readExtensions Callback function
|
||||
* @property {function(module:ol/Feature~Feature, Node)} [readExtensions] Callback function
|
||||
* to process `extensions` nodes. To prevent memory leaks, this callback function must
|
||||
* not store any references to the node. Note that the `extensions`
|
||||
* node is not allowed in GPX 1.0. Moreover, only `extensions`
|
||||
|
||||
@@ -22,9 +22,8 @@ const IGCZ = {
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {IGCZ|string|undefined} altitudeMode Altitude mode. Possible
|
||||
* values are `'barometric'`, `'gps'`, and `'none'`. Default
|
||||
* is `'none'`.
|
||||
* @property {IGCZ|string} [altitudeMode='none'] Altitude mode. Possible
|
||||
* values are `'barometric'`, `'gps'`, and `'none'`.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -24,16 +24,16 @@ import RenderFeature from '../render/Feature.js';
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {undefined|function((module:ol/geom/Geometry~Geometry|Object.<string,*>)=)|function(module:ol/geom/GeometryType~GeometryType,Array.<number>,(Array.<number>|Array.<Array.<number>>),Object.<string,*>,number)} featureClass
|
||||
* @property {function((module:ol/geom/Geometry~Geometry|Object.<string,*>)=)|function(module:ol/geom/GeometryType~GeometryType,Array.<number>,(Array.<number>|Array.<Array.<number>>),Object.<string,*>,number)} [featureClass]
|
||||
* Class for features returned by {@link ol.format.MVT#readFeatures}. Set to
|
||||
* {@link module:ol/Feature~Feature} to get full editing and geometry support at the cost of
|
||||
* decreased rendering performance. The default is {@link ol.render.Feature},
|
||||
* which is optimized for rendering and hit detection.
|
||||
* @property {string|undefined} geometryName Geometry name to use when creating
|
||||
* features. Default is `'geometry'`.
|
||||
* @property {string|undefined} layerName Name of the feature attribute that
|
||||
* holds the layer name. Default is `'layer'`.
|
||||
* @property {Array.<string>|undefined} layers Layers to read features from. If not
|
||||
* @property {string} [geometryName='geometry'] Geometry name to use when creating
|
||||
* features.
|
||||
* @property {string} [layerName='layer'] Name of the feature attribute that
|
||||
* holds the layer name.
|
||||
* @property {Array.<string>} [layers] Layers to read features from. If not
|
||||
* provided, features will be read from all layers.
|
||||
*/
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ import SimpleGeometry from '../geom/SimpleGeometry.js';
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {boolean|undefined} splitCollection Whether to split GeometryCollections into
|
||||
* multiple features on reading. Default is `false`.
|
||||
* @property {boolean} [splitCollection=false] Whether to split GeometryCollections into
|
||||
* multiple features on reading.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -7,18 +7,16 @@ import {METERS_PER_UNIT} from '../proj/Units.js';
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {string} code The SRS identifier code, e.g. `EPSG:4326`.
|
||||
* @property {module:ol/proj/Units~Units|string|undefined} units Units. Required unless a
|
||||
* @property {module:ol/proj/Units~Units|string} [units] Units. Required unless a
|
||||
* proj4 projection is defined for `code`.
|
||||
* @property {module:ol/extent~Extent} [extent] The validity extent for the SRS.
|
||||
* @property {string|undefined} axisOrientation The axis orientation as specified
|
||||
* in Proj4. The default is `enu`.
|
||||
* @property {boolean|undefined} global Whether the projection is valid for the
|
||||
* whole globe. Default is `false`.
|
||||
* @property {number|undefined} metersPerUnit The meters per unit for the SRS.
|
||||
* @property {string} [axisOrientation='enu'] The axis orientation as specified in Proj4.
|
||||
* @property {boolean} [global=false] Whether the projection is valid for the whole globe.
|
||||
* @property {number} [metersPerUnit] The meters per unit for the SRS.
|
||||
* If not provided, the `units` are used to get the meters per unit from the {@link module:ol/proj/Units~METERS_PER_UNIT}
|
||||
* lookup table.
|
||||
* @property {module:ol/extent~Extent} [worldExtent] The world extent for the SRS.
|
||||
* @property {(function(number, module:ol/coordinate~Coordinate):number|undefined)} getPointResolution
|
||||
* @property {function(number, module:ol/coordinate~Coordinate):number} [getPointResolution]
|
||||
* Function to determine resolution at a point. The function is called with a
|
||||
* `{number}` view resolution and an `{module:ol/coordinate~Coordinate}` as arguments, and returns
|
||||
* the `{number}` resolution at the passed coordinate. If this is `undefined`,
|
||||
|
||||
Reference in New Issue
Block a user