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

@@ -13,26 +13,23 @@ import {visibleAtResolution} from '../layer/Layer.js';
/**
* @typedef {Object} Options
* @property {string|undefined} className CSS class name. Default is
* `'ol-attribution'`.
* @property {Element|string|undefined} target Specify a target if you
* @property {string} [className='ol-attribution'] CSS class name.
* @property {Element|string} [target] Specify a target if you
* want the control to be rendered outside of the map's
* viewport.
* @property {boolean|undefined} collapsible Specify if attributions can
* @property {boolean} [collapsible=true] Specify if attributions can
* be collapsed. If you use an OSM source, should be set to `false` — see
* {@link https://www.openstreetmap.org/copyright OSM Copyright} —
* Default is `true`.
* @property {boolean|undefined} collapsed Specify if attributions should
* be collapsed at startup. Default is `true`.
* @property {string|undefined} tipLabel Text label to use for the button
* tip. Default is `'Attributions'`
* @property {string|Element|undefined} label Text label to use for the
* collapsed attributions button. Default is `'i'`.
* @property {boolean} [collapsed=true] Specify if attributions should
* be collapsed at startup.
* @property {string} [tipLabel='Attributions'] Text label to use for the button tip.
* @property {string} [label='i'] Text label to use for the
* collapsed attributions button.
* Instead of text, also an element (e.g. a `span` element) can be used.
* @property {string|Element|undefined} collapseLabel Text label to use
* for the expanded attributions button. Default is `'»'`.
* @property {string|Element} [collapseLabel='»'] Text label to use
* for the expanded attributions button.
* Instead of text, also an element (e.g. a `span` element) can be used.
* @property {function(ol.MapEvent)|undefined} render Function called when
* @property {function(ol.MapEvent)} [render] Function called when
* the control should be re-rendered. This is called in a `requestAnimationFrame`
* callback.
*/