Mark optional property with square brackets
This commit is contained in:
@@ -22,16 +22,14 @@ import {get as getProjection} from '../proj.js';
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {module:ol/proj~ProjectionLike} defaultDataProjection Default data projection.
|
||||
* Default is `EPSG:4326`.
|
||||
* @property {module:ol/proj~ProjectionLike} featureProjection Projection for features read or
|
||||
* @property {module:ol/proj~ProjectionLike} [defaultDataProjection='EPSG:4326'] Default data projection.
|
||||
* @property {module:ol/proj~ProjectionLike} [featureProjection] Projection for features read or
|
||||
* written by the format. Options passed to read or write methods will take precedence.
|
||||
* @property {string|undefined} geometryName Geometry name to use when creating features.
|
||||
* @property {boolean|undefined} extractGeometryName Certain GeoJSON providers include
|
||||
* @property {string} [geometryName] Geometry name to use when creating features.
|
||||
* @property {boolean} [extractGeometryName=false] Certain GeoJSON providers include
|
||||
* the geometry_name field in the feature GeoJSON. If set to `true` the GeoJSON reader
|
||||
* will look for that field to set the geometry name. If both this field is set to `true`
|
||||
* and a `geometryName` is provided, the `geometryName` will take precedence.
|
||||
* Default is `false`.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -230,13 +230,11 @@ function createStyleDefaults() {
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {boolean|undefined} extractStyles Extract styles from the KML.
|
||||
* Default is `true`.
|
||||
* @property {boolean|undefined} showPointNames Show names as labels for placemarks
|
||||
* which contain points. Default is `true`.
|
||||
* @property {Array.<ol.style.Style>|undefined} defaultStyle Default style. The
|
||||
* @property {boolean} [extractStyles=true] Extract styles from the KML.
|
||||
* @property {boolean} [showPointNames=true] Show names as labels for placemarks which contain points.
|
||||
* @property {Array.<ol.style.Style>} [defaultStyle] Default style. The
|
||||
* default default style is the same as Google Earth.
|
||||
* @property {boolean|undefined} writeStyles Write styles into KML. Default is `true`.
|
||||
* @property {boolean} [writeStyles=true] Write styles into KML.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -16,10 +16,9 @@ import {get as getProjection} from '../proj.js';
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {number|undefined} factor The factor by which the coordinates
|
||||
* values will be scaled. Default is `1e5`.
|
||||
* @property {module:ol/geom/GeometryLayout~GeometryLayout|undefined} geometryLayout Layout of the
|
||||
* feature geometries created by the format reader. Default is `module:ol/geom/GeometryLayout~GeometryLayout.XY`.
|
||||
* @property {number} [factor=1e5] The factor by which the coordinates values will be scaled.
|
||||
* @property {module:ol/geom/GeometryLayout~GeometryLayout} [geometryLayout='XY'] Layout of the
|
||||
* feature geometries created by the format reader.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -16,9 +16,8 @@ import {get as getProjection} from '../proj.js';
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {module:ol/proj~ProjectionLike} defaultDataProjection Default data projection.
|
||||
* Default is `EPSG:4326`.
|
||||
* @property {string|undefined} layerName Set the name of the TopoJSON topology
|
||||
* @property {module:ol/proj~ProjectionLike} [defaultDataProjection='EPSG:4326'] Default data projection.
|
||||
* @property {string} [layerName] Set the name of the TopoJSON topology
|
||||
* `objects`'s children as feature property with the specified name. This means
|
||||
* that when set to `'layer'`, a topology like
|
||||
* ```
|
||||
@@ -34,7 +33,7 @@ import {get as getProjection} from '../proj.js';
|
||||
* ```
|
||||
* will result in features that have a property `'layer'` set to `'example'`.
|
||||
* When not set, no property will be added to features.
|
||||
* @property {Array.<string>|undefined} layers Names of the TopoJSON topology's
|
||||
* @property {Array.<string>} [layers] Names of the TopoJSON topology's
|
||||
* `objects`'s children to read features from. If not provided, features will
|
||||
* be read from all children.
|
||||
*/
|
||||
|
||||
@@ -8,8 +8,8 @@ import Interaction, {zoomByDelta} from '../interaction/Interaction.js';
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {number} [duration] Animation duration in milliseconds. Default is `250`.
|
||||
* @property {number} [delta] The zoom delta applied on each double click, default is `1`.
|
||||
* @property {number} [duration=250] Animation duration in milliseconds.
|
||||
* @property {number} [delta=1] The zoom delta applied on each double click.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -14,14 +14,14 @@ import {get as getProjection} from '../proj.js';
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {Array.<function(new: ol.format.Feature)>|undefined} formatConstructors Format constructors.
|
||||
* @property {ol.source.Vector|undefined} source Optional vector source where features will be added. If a source is provided
|
||||
* @property {Array.<function(new: ol.format.Feature)>} [formatConstructors] Format constructors.
|
||||
* @property {ol.source.Vector} [source] Optional vector source where features will be added. If a source is provided
|
||||
* all existing features will be removed and new features will be added when
|
||||
* they are dropped on the target. If you want to add features to a vector
|
||||
* source without removing the existing features (append only), instead of
|
||||
* providing the source option listen for the "addfeatures" event.
|
||||
* @property {module:ol/proj~ProjectionLike} projection Target projection. By default, the map's view's projection is used.
|
||||
* @property {Element|undefined} target The element that is used as the drop target, default is the viewport element.
|
||||
* @property {module:ol/proj~ProjectionLike} [projection] Target projection. By default, the map's view's projection is used.
|
||||
* @property {Element} [target] The element that is used as the drop target, default is the viewport element.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@ import RenderBox from '../render/Box.js';
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {string|undefined} className CSS class name for styling the box. The default is `ol-dragbox`.
|
||||
* @property {module:ol/events/condition~Condition|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* @property {string} [className='ol-dragbox'] CSS class name for styling the box.
|
||||
* @property {module:ol/events/condition~Condition} [condition] A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
||||
* to indicate whether that event should be handled.
|
||||
* Default is {@link ol/events/condition~always}.
|
||||
* @property {number|undefined} minArea The minimum area of the box in pixel, this value is used by the default
|
||||
* `boxEndCondition` function. Default is `64`.
|
||||
* @property {module:ol/interaction/DragBox~EndCondition|undefined} boxEndCondition A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two
|
||||
* @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the default
|
||||
* `boxEndCondition` function.
|
||||
* @property {module:ol/interaction/DragBox~EndCondition} [boxEndCondition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two
|
||||
* {@link module:ol~Pixel}s to indicate whether a `boxend` event should be fired.
|
||||
* Default is `true` if the area of the box is bigger than the `minArea` option.
|
||||
*/
|
||||
|
||||
@@ -14,7 +14,7 @@ import {disable} from '../rotationconstraint.js';
|
||||
* @property {number} [duration=250] The duration of the animation in
|
||||
* milliseconds.
|
||||
* @property {number} [threshold=0.3] Minimal angle in radians to start a rotation.
|
||||
*/
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -57,7 +57,7 @@ const handleMoveEvent = UNDEFINED;
|
||||
* also during a drag sequence (so during a drag sequence both the
|
||||
* `handleDragEvent` function and this function are called).
|
||||
* @property {(function(module:ol/MapBrowserPointerEvent~MapBrowserPointerEvent):boolean)} [handleUpEvent]
|
||||
Function handling "up" events. If the function returns `false` then the
|
||||
* Function handling "up" events. If the function returns `false` then the
|
||||
* current drag sequence is stopped.
|
||||
*/
|
||||
|
||||
|
||||
@@ -35,12 +35,12 @@ import RBush from '../structs/RBush.js';
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {module:ol/Collection~Collection.<module:ol/Feature~Feature>|undefined} features Snap to these features. Either this option or source should be provided.
|
||||
* @property {boolean|undefined} edge Snap to edges. Default is `true`.
|
||||
* @property {boolean|undefined} vertex Snap to vertices. Default is `true`.
|
||||
* @property {number|undefined} pixelTolerance Pixel tolerance for considering the pointer close enough to a segment or
|
||||
* vertex for snapping. Default is `10` pixels.
|
||||
* @property {module:ol/source/Vector~Vector|undefined} source Snap to features from this source. Either this option or features should be provided
|
||||
* @property {module:ol/Collection~Collection.<module:ol/Feature~Feature>} [features] Snap to these features. Either this option or source should be provided.
|
||||
* @property {boolean} [edge=true] Snap to edges.
|
||||
* @property {boolean} [vertex=true] Snap to vertices.
|
||||
* @property {number} [pixelTolerance=10] Pixel tolerance for considering the pointer close enough to a segment or
|
||||
* vertex for snapping.
|
||||
* @property {module:ol/source/Vector~Vector} [source] Snap to features from this source. Either this option or features should be provided
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -39,16 +39,16 @@ const TranslateEventType = {
|
||||
|
||||
/**
|
||||
* @typedef {Object} interaction_TranslateOptions
|
||||
* @property {module:ol/Collection~Collection.<module:ol/Feature~Feature>|undefined} features Only features contained in this collection will be able to be translated. If
|
||||
* @property {module:ol/Collection~Collection.<module:ol/Feature~Feature>} [features] Only features contained in this collection will be able to be translated. If
|
||||
* not specified, all features on the map will be able to be translated.
|
||||
* @property {undefined|Array.<module:ol/layer/Layer~Layer>|function(module:ol/layer/Layer~Layer): boolean} layers A list of layers from which features should be
|
||||
* @property {Array.<module:ol/layer/Layer~Layer>|function(module:ol/layer/Layer~Layer): boolean} [layers] A list of layers from which features should be
|
||||
* translated. Alternatively, a filter function can be provided. The
|
||||
* function will be called for each layer in the map and should return
|
||||
* `true` for layers that you want to be translatable. If the option is
|
||||
* absent, all visible layers will be considered translatable.
|
||||
* @property {number|undefined} hitTolerance Hit-detection tolerance. Pixels inside the radius around the given position
|
||||
* @property {number} [hitTolerance=0] Hit-detection tolerance. 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`.
|
||||
* not for WebGL.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user