Mark optional property with square brackets

This commit is contained in:
Frederic Junod
2018-03-13 13:26:34 +01:00
parent bb3072153b
commit 403a7bdfc7
7 changed files with 41 additions and 52 deletions

View File

@@ -38,26 +38,22 @@ const MIN_RATIO = 0.1;
/**
* @typedef {Object} Options
* @property {boolean|undefined} collapsed Whether the control should start collapsed
* or not (expanded). Default to `true`.
* @property {string|Element|undefined} collapseLabel Text label to use for the
* expanded overviewmap button. Default is `'«'`. Instead of text, also an element
* (e.g. a `span` element) can be used.
* @property {boolean|undefined} collapsible Whether the control can be collapsed
* or not. Default to `true`.
* @property {string|Element|undefined} label Text label to use for the collapsed
* overviewmap button. Default is `'»'`. Instead of text, also an element
* (e.g. a `span` element) can be used.
* @property {Array.<ol.layer.Layer>|ol.Collection.<ol.layer.Layer>|undefined} layers
* @property {boolean} [collapsed=true] Whether the control should start collapsed
* or not (expanded).
* @property {string|Element} [collapseLabel='«'] Text label to use for the
* expanded overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.
* @property {boolean} [collapsible=true] Whether the control can be collapsed or not.
* @property {string|Element} [label='»'] Text label to use for the collapsed
* overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.
* @property {Array.<ol.layer.Layer>|ol.Collection.<ol.layer.Layer>} [layers]
* Layers for the overview map. If not set, then all main map layers are used
* instead.
* @property {function(ol.MapEvent)|undefined} render Function called when the control
* @property {function(ol.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 the control
* @property {Element|string} [target] Specify a target if you want the control
* to be rendered outside of the map's viewport.
* @property {string|undefined} tipLabel Text label to use for the button tip. Default
* is `'Overview map'`.
* @property {ol.View|undefined} view Custom view for the overview map. If not provided,
* @property {string} [tipLabel='Overview map'] Text label to use for the button tip.
* @property {ol.View} [view] Custom view for the overview map. If not provided,
* a default view with an EPSG:3857 projection will be used.
*/