Disallowed undefined 'brightness' value
This commit is contained in:
@@ -87,13 +87,12 @@ goog.inherits(ol.layer.Base, ol.Object);
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {number|undefined} The brightness of the layer.
|
* @return {number} The brightness of the layer.
|
||||||
* @observable
|
* @observable
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.layer.Base.prototype.getBrightness = function() {
|
ol.layer.Base.prototype.getBrightness = function() {
|
||||||
return /** @type {number|undefined} */ (
|
return /** @type {number} */ (this.get(ol.layer.LayerProperty.BRIGHTNESS));
|
||||||
this.get(ol.layer.LayerProperty.BRIGHTNESS));
|
|
||||||
};
|
};
|
||||||
goog.exportProperty(
|
goog.exportProperty(
|
||||||
ol.layer.Base.prototype,
|
ol.layer.Base.prototype,
|
||||||
@@ -146,7 +145,7 @@ ol.layer.Base.prototype.getLayerState = function() {
|
|||||||
var minResolution = this.getMinResolution();
|
var minResolution = this.getMinResolution();
|
||||||
return {
|
return {
|
||||||
layer: /** @type {ol.layer.Layer} */ (this),
|
layer: /** @type {ol.layer.Layer} */ (this),
|
||||||
brightness: goog.isDef(brightness) ? goog.math.clamp(brightness, -1, 1) : 0,
|
brightness: goog.math.clamp(brightness, -1, 1),
|
||||||
contrast: goog.isDef(contrast) ? Math.max(contrast, 0) : 1,
|
contrast: goog.isDef(contrast) ? Math.max(contrast, 0) : 1,
|
||||||
hue: hue,
|
hue: hue,
|
||||||
opacity: goog.math.clamp(opacity, 0, 1),
|
opacity: goog.math.clamp(opacity, 0, 1),
|
||||||
@@ -288,7 +287,7 @@ goog.exportProperty(
|
|||||||
* [2] https://github.com/WebKit/webkit/commit/8f4765e569
|
* [2] https://github.com/WebKit/webkit/commit/8f4765e569
|
||||||
* [3] https://www.w3.org/Bugs/Public/show_bug.cgi?id=15647
|
* [3] https://www.w3.org/Bugs/Public/show_bug.cgi?id=15647
|
||||||
*
|
*
|
||||||
* @param {number|undefined} brightness The brightness of the layer.
|
* @param {number} brightness The brightness of the layer.
|
||||||
* @observable
|
* @observable
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user