From 603be52b1a4d119676ee1dc25d5dff348106ba48 Mon Sep 17 00:00:00 2001 From: Antoine Abt Date: Fri, 2 May 2014 14:11:58 +0200 Subject: [PATCH] Remove useless test in default controls --- src/ol/control/controldefaults.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/ol/control/controldefaults.js b/src/ol/control/controldefaults.js index f2fc87aea4..d75dd5c114 100644 --- a/src/ol/control/controldefaults.js +++ b/src/ol/control/controldefaults.js @@ -21,33 +21,25 @@ ol.control.defaults = function(opt_options) { var zoomControl = goog.isDef(options.zoom) ? options.zoom : true; if (zoomControl) { - var zoomControlOptions = goog.isDef(options.zoomOptions) ? - options.zoomOptions : undefined; - controls.push(new ol.control.Zoom(zoomControlOptions)); + controls.push(new ol.control.Zoom(options.zoomOptions)); } var rotateControl = goog.isDef(options.rotate) ? options.rotate : true; if (rotateControl) { - var rotateControlOptions = goog.isDef(options.rotateOptions) ? - options.rotateOptions : undefined; - controls.push(new ol.control.Rotate(rotateControlOptions)); + controls.push(new ol.control.Rotate(options.rotateOptions)); } var attributionControl = goog.isDef(options.attribution) ? options.attribution : true; if (attributionControl) { - var attributionControlOptions = goog.isDef(options.attributionOptions) ? - options.attributionOptions : undefined; - controls.push(new ol.control.Attribution(attributionControlOptions)); + controls.push(new ol.control.Attribution(options.attributionOptions)); } var logoControl = goog.isDef(options.logo) ? options.logo : true; if (logoControl) { - var logoControlOptions = goog.isDef(options.logoOptions) ? - options.logoOptions : undefined; - controls.push(new ol.control.Logo(logoControlOptions)); + controls.push(new ol.control.Logo(options.logoOptions)); } return controls;