From 317c15a5ce1206436495334e47e8ca83376d95c2 Mon Sep 17 00:00:00 2001 From: euzuro Date: Wed, 26 Jul 2006 10:17:21 +0000 Subject: [PATCH] readibility / coding standards git-svn-id: http://svn.openlayers.org/trunk/openlayers@1007 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Map.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 735a25bea7..43c74d46d9 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -152,14 +152,13 @@ OpenLayers.Map.prototype = { this.layers = []; - if (this.controls) { - for(var i=0; i < this.controls.length; i++) { - this.addControlToMap(this.controls[i]); - } - } else { - this.controls = []; - this.addControl(new OpenLayers.Control.MouseDefaults()); - this.addControl(new OpenLayers.Control.PanZoom()); + if (this.controls == null) { + this.controls = [ new OpenLayers.Control.MouseDefaults(), + new OpenLayers.Control.PanZoom()]; + } + + for(var i=0; i < this.controls.length; i++) { + this.addControlToMap(this.controls[i]); } this.popups = new Array();