From c7dbd4a3038d65899e2bc3b09dcb7675a8d9b208 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 27 Jan 2015 14:23:59 +0100 Subject: [PATCH] Disallowed undefined 'visible' value --- src/ol/layer/layerbase.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ol/layer/layerbase.js b/src/ol/layer/layerbase.js index a7722e84d2..0effab8608 100644 --- a/src/ol/layer/layerbase.js +++ b/src/ol/layer/layerbase.js @@ -152,7 +152,7 @@ ol.layer.Base.prototype.getLayerState = function() { opacity: goog.isDef(opacity) ? goog.math.clamp(opacity, 0, 1) : 1, saturation: goog.isDef(saturation) ? Math.max(saturation, 0) : 1, sourceState: sourceState, - visible: goog.isDef(visible) ? !!visible : true, + visible: visible, extent: extent, maxResolution: goog.isDef(maxResolution) ? maxResolution : Infinity, minResolution: goog.isDef(minResolution) ? Math.max(minResolution, 0) : 0 @@ -258,13 +258,12 @@ ol.layer.Base.prototype.getSourceState = goog.abstractMethod; /** - * @return {boolean|undefined} The visiblity of the layer. + * @return {boolean} The visibility of the layer. * @observable * @api stable */ ol.layer.Base.prototype.getVisible = function() { - return /** @type {boolean|undefined} */ ( - this.get(ol.layer.LayerProperty.VISIBLE)); + return /** @type {boolean} */ (this.get(ol.layer.LayerProperty.VISIBLE)); }; goog.exportProperty( ol.layer.Base.prototype, @@ -415,7 +414,7 @@ goog.exportProperty( /** - * @param {boolean|undefined} visible The visiblity of the layer. + * @param {boolean} visible The visibility of the layer. * @observable * @api stable */