diff --git a/externs/olx.js b/externs/olx.js index 1fdab4d0a0..6bfc8de381 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -5,76 +5,6 @@ let olx; -/** - * @typedef {{opacity: (number|undefined), - * visible: (boolean|undefined), - * extent: (ol.Extent|undefined), - * zIndex: (number|undefined), - * minResolution: (number|undefined), - * maxResolution: (number|undefined), - * layers: (Array.|ol.Collection.|undefined)}} - */ -olx.layer.GroupOptions; - - -/** - * Opacity (0, 1). Default is `1`. - * @type {number|undefined} - * @api - */ -olx.layer.GroupOptions.prototype.opacity; - - -/** - * Visibility. Default is `true`. - * @type {boolean|undefined} - * @api - */ -olx.layer.GroupOptions.prototype.visible; - - -/** - * The bounding extent for layer rendering. The layer will not be rendered - * outside of this extent. - * @type {ol.Extent|undefined} - * @api - */ -olx.layer.GroupOptions.prototype.extent; - - -/** - * The z-index for layer rendering. At rendering time, the layers will be - * ordered, first by Z-index and then by position. The default Z-index is 0. - * @type {number|undefined} - * @api - */ -olx.layer.GroupOptions.prototype.zIndex; - - -/** - * The minimum resolution (inclusive) at which this layer will be visible. - * @type {number|undefined} - * @api - */ -olx.layer.GroupOptions.prototype.minResolution; - - -/** - * The maximum resolution (exclusive) below which this layer will be visible. - * @type {number|undefined} - * @api - */ -olx.layer.GroupOptions.prototype.maxResolution; - - -/** - * Child layers. - * @type {Array.|ol.Collection.|undefined} - * @api - */ -olx.layer.GroupOptions.prototype.layers; - - /** * @typedef {{gradient: (Array.|undefined), * radius: (number|undefined), diff --git a/src/ol/layer/Group.js b/src/ol/layer/Group.js index eb11d36afd..1c684987c6 100644 --- a/src/ol/layer/Group.js +++ b/src/ol/layer/Group.js @@ -15,6 +15,22 @@ import {assign, clear} from '../obj.js'; import SourceState from '../source/State.js'; +/** + * @typedef {Object} Options + * @property {number} [opacity=1] Opacity (0, 1). + * @property {boolean} [visible=true] Visibility. + * @property {ol.Extent} [extent] The bounding extent for layer rendering. The layer will not be + * rendered outside of this extent. + * @property {number} [zIndex=0] The z-index for layer rendering. At rendering time, the layers + * will be ordered, first by Z-index and then by position. + * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be + * visible. + * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will + * be visible. + * @property {(Array.|ol.Collection.)} [layers] Child layers. + */ + + /** * @enum {string} * @private @@ -32,13 +48,13 @@ const Property = { * * @constructor * @extends {module:ol/layer/Base~BaseLayer} - * @param {olx.layer.GroupOptions=} opt_options Layer options. + * @param {module:ol/layer/Group~Options=} opt_options Layer options. * @api */ const LayerGroup = function(opt_options) { const options = opt_options || {}; - const baseOptions = /** @type {olx.layer.GroupOptions} */ (assign({}, options)); + const baseOptions = /** @type {module:ol/layer/Group~Options} */ (assign({}, options)); delete baseOptions.layers; let layers = options.layers;