Non unique HTMLElement in Control, fix put together by sbenthall.

Tests pass, etc. (Closes #1396) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@7666 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2008-08-01 18:21:56 +00:00
parent 76170bf821
commit e7ebdc8aa0
4 changed files with 7 additions and 8 deletions

View File

@@ -276,7 +276,7 @@ OpenLayers.Control.LayerSwitcher =
// create input element
var inputElem = document.createElement("input");
inputElem.id = "input_" + layer.name;
inputElem.id = this.id + "_input_" + layer.name;
inputElem.name = (baseLayer) ? "baseLayers" : layer.name;
inputElem.type = (baseLayer) ? "radio" : "checkbox";
inputElem.value = layer.name;
@@ -490,7 +490,7 @@ OpenLayers.Control.LayerSwitcher =
// layers list div
this.layersDiv = document.createElement("div");
this.layersDiv.id = "layersDiv";
this.layersDiv.id = this.id + "_layersDiv";
this.layersDiv.style.paddingTop = "5px";
this.layersDiv.style.paddingLeft = "10px";
this.layersDiv.style.paddingBottom = "5px";