Mark optional property with square brackets

This commit is contained in:
Frederic Junod
2018-03-12 15:52:11 +01:00
parent 1de1bda252
commit 813b72251a
4 changed files with 21 additions and 25 deletions

View File

@@ -12,18 +12,17 @@ import {inherits} from '../index.js';
/**
* @typedef {Object} Options
* @property {string|undefined} className CSS class name. Default is `'ol-rotate'`.
* @property {string|Element|undefined} label Text label to use for the rotate button.
* Default is `'⇧'`. Instead of text, also an element (e.g. a `span` element) can be used.
* @property {string|undefined} tipLabel Text label to use for the rotate tip. Default is
* `'Reset rotation'`
* @property {number|undefined} duration Animation duration in milliseconds. Default is `250`.
* @property {boolean|undefined} autoHide Hide the control when rotation is 0. Default is `true`.
* @property {string|undefined} [className='ol-rotate'] CSS class name.
* @property {string|Element|undefined} [label='⇧'] Text label to use for the rotate button.
* Instead of text, also an element (e.g. a `span` element) can be used.
* @property {string|undefined} [tipLabel='Reset rotation'] Text label to use for the rotate tip.
* @property {number|undefined} [duration=250] Animation duration in milliseconds.
* @property {boolean|undefined} [autoHide=true] Hide the control when rotation is 0.
* @property {function(ol.MapEvent)|undefined} render Function called when the control should
* be re-rendered. This is called in a `requestAnimationFrame` callback.
* @property {function()|undefined} resetNorth Function called when the control is clicked.
* @property {function()|undefined} [resetNorth] Function called when the control is clicked.
* This will override the default `resetNorth`.
* @property {Element|string|undefined} target Specify a target if you want the control to be
* @property {Element|string|undefined} [target] Specify a target if you want the control to be
* rendered outside of the map's viewport.
*/

View File

@@ -11,18 +11,16 @@ import {easeOut} from '../easing.js';
/**
* @typedef {Object} Options
* @property {number|undefined} duration Animation duration in milliseconds. Default is `250`.
* @property {string|undefined} className CSS class name. Default is `'ol-zoom'`.
* @property {string|Element|undefined} zoomInLabel Text label to use for the zoom-in
* button. Default is `'+'`. Instead of text, also an element (e.g. a `span` element) can be used.
* @property {string|Element|undefined} zoomOutLabel Text label to use for the zoom-out button.
* Default is `'-'`. Instead of text, also an element (e.g. a `span` element) can be used.
* @property {string|undefined} zoomInTipLabel Text label to use for the button tip. Default is
* `'Zoom in'`.
* @property {string|undefined} zoomOutTipLabel Text label to use for the button tip. Default is
* `'Zoom out'`.
* @property {number|undefined} delta The zoom delta applied on each click.
* @property {Element|string|undefined} target Specify a target if you want the control to be
* @property {number|undefined} [duration=250] Animation duration in milliseconds.
* @property {string|undefined} [className='ol-zoom'] CSS class name.
* @property {string|Element|undefined} [zoomInLabel='+'] Text label to use for the zoom-in
* button. Instead of text, also an element (e.g. a `span` element) can be used.
* @property {string|Element|undefined} [zoomOutLabel='-'] Text label to use for the zoom-out button.
* Instead of text, also an element (e.g. a `span` element) can be used.
* @property {string|undefined} [zoomInTipLabel='Zoom in'] Text label to use for the button tip.
* @property {string|undefined} [zoomOutTipLabel='Zoom out'] Text label to use for the button tip.
* @property {number|undefined} [delta=1] The zoom delta applied on each click.
* @property {Element|string|undefined} [target] Specify a target if you want the control to be
* rendered outside of the map's viewport.
*/

View File

@@ -28,7 +28,7 @@ const Direction = {
/**
* @typedef {Object} Options
* @property {string|undefined} className CSS class name.
* @property {number|undefined} duration Animation duration in milliseconds. Default is `200`.
* @property {number|undefined} [duration=200] Animation duration in milliseconds.
* @property {number|undefined} maxResolution Maximum resolution.
* @property {number|undefined} minResolution Minimum resolution.
* @property {function(ol.MapEvent)|undefined} render Function called when the control