Mark optional property with square brackets
This commit is contained in:
@@ -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