From e25cb30e5fc2077a8d2b93ef11a0c0296d03a682 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 27 Jan 2015 14:26:21 +0100 Subject: [PATCH] Disallowed undefined 'hue' value --- src/ol/layer/layerbase.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ol/layer/layerbase.js b/src/ol/layer/layerbase.js index 0effab8608..abbd5fd2d9 100644 --- a/src/ol/layer/layerbase.js +++ b/src/ol/layer/layerbase.js @@ -117,12 +117,12 @@ goog.exportProperty( /** - * @return {number|undefined} The hue of the layer. + * @return {number} The hue of the layer. * @observable * @api */ ol.layer.Base.prototype.getHue = function() { - return /** @type {number|undefined} */ (this.get(ol.layer.LayerProperty.HUE)); + return /** @type {number} */ (this.get(ol.layer.LayerProperty.HUE)); }; goog.exportProperty( ol.layer.Base.prototype, @@ -148,7 +148,7 @@ ol.layer.Base.prototype.getLayerState = function() { layer: /** @type {ol.layer.Layer} */ (this), brightness: goog.isDef(brightness) ? goog.math.clamp(brightness, -1, 1) : 0, contrast: goog.isDef(contrast) ? Math.max(contrast, 0) : 1, - hue: goog.isDef(hue) ? hue : 0, + hue: hue, opacity: goog.isDef(opacity) ? goog.math.clamp(opacity, 0, 1) : 1, saturation: goog.isDef(saturation) ? Math.max(saturation, 0) : 1, sourceState: sourceState, @@ -323,7 +323,7 @@ goog.exportProperty( /** * Apply a hue-rotation to the layer. A value of 0 will leave the hue * unchanged. Other values are radians around the color circle. - * @param {number|undefined} hue The hue of the layer. + * @param {number} hue The hue of the layer. * @observable * @api */