Remove goog.isDef from layerbase

This commit is contained in:
Marc Jansen
2015-09-23 21:00:29 +02:00
committed by Tim Schaub
parent cbb72c1ce4
commit 0f55d173b8

View File

@@ -4,6 +4,7 @@ goog.provide('ol.layer.LayerState');
goog.require('goog.math');
goog.require('goog.object');
goog.require('ol');
goog.require('ol.Object');
goog.require('ol.source.State');
@@ -67,23 +68,23 @@ ol.layer.Base = function(options) {
*/
var properties = goog.object.clone(options);
properties[ol.layer.LayerProperty.BRIGHTNESS] =
goog.isDef(options.brightness) ? options.brightness : 0;
ol.isDef(options.brightness) ? options.brightness : 0;
properties[ol.layer.LayerProperty.CONTRAST] =
goog.isDef(options.contrast) ? options.contrast : 1;
ol.isDef(options.contrast) ? options.contrast : 1;
properties[ol.layer.LayerProperty.HUE] =
goog.isDef(options.hue) ? options.hue : 0;
ol.isDef(options.hue) ? options.hue : 0;
properties[ol.layer.LayerProperty.OPACITY] =
goog.isDef(options.opacity) ? options.opacity : 1;
ol.isDef(options.opacity) ? options.opacity : 1;
properties[ol.layer.LayerProperty.SATURATION] =
goog.isDef(options.saturation) ? options.saturation : 1;
ol.isDef(options.saturation) ? options.saturation : 1;
properties[ol.layer.LayerProperty.VISIBLE] =
goog.isDef(options.visible) ? options.visible : true;
ol.isDef(options.visible) ? options.visible : true;
properties[ol.layer.LayerProperty.Z_INDEX] =
goog.isDef(options.zIndex) ? options.zIndex : 0;
ol.isDef(options.zIndex) ? options.zIndex : 0;
properties[ol.layer.LayerProperty.MAX_RESOLUTION] =
goog.isDef(options.maxResolution) ? options.maxResolution : Infinity;
ol.isDef(options.maxResolution) ? options.maxResolution : Infinity;
properties[ol.layer.LayerProperty.MIN_RESOLUTION] =
goog.isDef(options.minResolution) ? options.minResolution : 0;
ol.isDef(options.minResolution) ? options.minResolution : 0;
this.setProperties(properties);
};