diff --git a/src/ol/interaction/modifyinteraction.js b/src/ol/interaction/modifyinteraction.js index a56a212c3d..68b508a039 100644 --- a/src/ol/interaction/modifyinteraction.js +++ b/src/ol/interaction/modifyinteraction.js @@ -112,7 +112,7 @@ ol.interaction.Modify = function(options) { * @private */ this.overlay_ = new ol.FeatureOverlay({ - style: (goog.isDef(options.style)) ? options.style : + style: goog.isDef(options.style) ? options.style : ol.interaction.Modify.getDefaultStyleFunction() }); diff --git a/src/ol/interaction/selectinteraction.js b/src/ol/interaction/selectinteraction.js index 545e37f2bf..5c4067e3db 100644 --- a/src/ol/interaction/selectinteraction.js +++ b/src/ol/interaction/selectinteraction.js @@ -90,7 +90,7 @@ ol.interaction.Select = function(opt_options) { * @type {ol.FeatureOverlay} */ this.featureOverlay_ = new ol.FeatureOverlay({ - style: (goog.isDef(options.style)) ? options.style : + style: goog.isDef(options.style) ? options.style : ol.interaction.Select.getDefaultStyleFunction() }); diff --git a/src/ol/layer/layer.js b/src/ol/layer/layer.js index ac9d992406..3ce78653d9 100644 --- a/src/ol/layer/layer.js +++ b/src/ol/layer/layer.js @@ -62,7 +62,7 @@ ol.layer.Layer.visibleAtResolution = function(layerState, resolution) { * @inheritDoc */ ol.layer.Layer.prototype.getLayersArray = function(opt_array) { - var array = (goog.isDef(opt_array)) ? opt_array : []; + var array = goog.isDef(opt_array) ? opt_array : []; array.push(this); return array; }; @@ -72,7 +72,7 @@ ol.layer.Layer.prototype.getLayersArray = function(opt_array) { * @inheritDoc */ ol.layer.Layer.prototype.getLayerStatesArray = function(opt_states) { - var states = (goog.isDef(opt_states)) ? opt_states : []; + var states = goog.isDef(opt_states) ? opt_states : []; states.push(this.getLayerState()); return states; }; diff --git a/src/ol/layer/layergroup.js b/src/ol/layer/layergroup.js index 1cabc5e843..86dc1042f5 100644 --- a/src/ol/layer/layergroup.js +++ b/src/ol/layer/layergroup.js @@ -179,7 +179,7 @@ goog.exportProperty( * @inheritDoc */ ol.layer.Group.prototype.getLayersArray = function(opt_array) { - var array = (goog.isDef(opt_array)) ? opt_array : []; + var array = goog.isDef(opt_array) ? opt_array : []; this.getLayers().forEach(function(layer) { layer.getLayersArray(array); }); @@ -191,7 +191,7 @@ ol.layer.Group.prototype.getLayersArray = function(opt_array) { * @inheritDoc */ ol.layer.Group.prototype.getLayerStatesArray = function(opt_states) { - var states = (goog.isDef(opt_states)) ? opt_states : []; + var states = goog.isDef(opt_states) ? opt_states : []; var pos = states.length;