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";

View File

@@ -111,7 +111,7 @@ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, {
_addButton:function(id, img, xy, sz) {
var imgLocation = OpenLayers.Util.getImagesLocation() + img;
var btn = OpenLayers.Util.createAlphaImageDiv(
"OpenLayers_Control_PanZoom_" + id,
this.id + "_" + id,
xy, sz, imgLocation, "absolute");
//we want to add the outer div

View File

@@ -156,7 +156,7 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, {
_addZoomBar:function(centered) {
var imgLocation = OpenLayers.Util.getImagesLocation();
var id = "OpenLayers_Control_PanZoomBar_Slider" + this.map.id;
var id = this.id + "_" + this.map.id;
var zoomsToEnd = this.map.getNumZoomLevels() - 1 - this.map.getZoom();
var slider = OpenLayers.Util.createAlphaImageDiv(id,
centered.add(-1, zoomsToEnd * this.zoomStopHeight),
@@ -181,7 +181,7 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, {
var div = null;
if (OpenLayers.Util.alphaHack()) {
var id = "OpenLayers_Control_PanZoomBar" + this.map.id;
var id = this.id + "_" + this.map.id;
div = OpenLayers.Util.createAlphaImageDiv(id, centered,
new OpenLayers.Size(sz.w,
this.zoomStopHeight),