[OpenLayers-Commits] r4186 - trunk/openlayers/lib/OpenLayers
commits at openlayers.org
commits at openlayers.org
Tue Sep 4 07:11:47 EDT 2007
Author: euzuro
Date: 2007-09-04 07:11:42 -0400 (Tue, 04 Sep 2007)
New Revision: 4186
Modified:
trunk/openlayers/lib/OpenLayers/Map.js
Log:
coding standards
Modified: trunk/openlayers/lib/OpenLayers/Map.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Map.js 2007-09-04 10:34:45 UTC (rev 4185)
+++ trunk/openlayers/lib/OpenLayers/Map.js 2007-09-04 11:11:42 UTC (rev 4186)
@@ -622,15 +622,17 @@
*/
setLayerIndex: function (layer, idx) {
var base = this.getLayerIndex(layer);
- if (idx < 0)
+ if (idx < 0) {
idx = 0;
- else if (idx > this.layers.length)
+ } else if (idx > this.layers.length) {
idx = this.layers.length;
+ }
if (base != idx) {
this.layers.splice(base, 1);
this.layers.splice(idx, 0, layer);
- for (var i = 0; i < this.layers.length; i++)
+ for (var i = 0; i < this.layers.length; i++) {
this.setLayerZIndex(this.layers[i], i);
+ }
this.events.triggerEvent("changelayer");
}
},
More information about the Commits
mailing list