Disallowed undefined 'visible' value

This commit is contained in:
Frederic Junod
2015-01-27 14:23:59 +01:00
parent 43f84e798f
commit c7dbd4a303
+4 -5
View File
@@ -152,7 +152,7 @@ ol.layer.Base.prototype.getLayerState = function() {
opacity: goog.isDef(opacity) ? goog.math.clamp(opacity, 0, 1) : 1, opacity: goog.isDef(opacity) ? goog.math.clamp(opacity, 0, 1) : 1,
saturation: goog.isDef(saturation) ? Math.max(saturation, 0) : 1, saturation: goog.isDef(saturation) ? Math.max(saturation, 0) : 1,
sourceState: sourceState, sourceState: sourceState,
visible: goog.isDef(visible) ? !!visible : true, visible: visible,
extent: extent, extent: extent,
maxResolution: goog.isDef(maxResolution) ? maxResolution : Infinity, maxResolution: goog.isDef(maxResolution) ? maxResolution : Infinity,
minResolution: goog.isDef(minResolution) ? Math.max(minResolution, 0) : 0 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 * @observable
* @api stable * @api stable
*/ */
ol.layer.Base.prototype.getVisible = function() { ol.layer.Base.prototype.getVisible = function() {
return /** @type {boolean|undefined} */ ( return /** @type {boolean} */ (this.get(ol.layer.LayerProperty.VISIBLE));
this.get(ol.layer.LayerProperty.VISIBLE));
}; };
goog.exportProperty( goog.exportProperty(
ol.layer.Base.prototype, 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 * @observable
* @api stable * @api stable
*/ */