Controls each create their own div, which is then individually added to the viewPortDiv directly, rather than to a Controls Div. This may fix some issues with event handling of lower layers, and may be related to #36. It also prevents the need for the markers hack a couple commits back.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@206 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-05-20 03:47:46 +00:00
parent 0e011e4584
commit 6c83a73519
3 changed files with 5 additions and 10 deletions

View File

@@ -74,13 +74,6 @@ OpenLayers.Map.prototype = {
this.viewPortDiv.style.position = "relative";
this.div.appendChild(this.viewPortDiv);
// the controlDiv is the div that all the controls sit on
this.controlDiv = OpenLayers.Util.createDiv(
div.id + "_OpenLayers_Control" );
this.controlDiv.style.width="100%";
this.controlDiv.style.height="100%";
this.controlDiv.style.zIndex = this.Z_INDEX_BASE["Control"];
this.viewPortDiv.appendChild(this.controlDiv);
// the layerContainerDiv is the one that holds all the layers
this.layerContainerDiv = OpenLayers.Util.createDiv(
@@ -146,7 +139,7 @@ OpenLayers.Map.prototype = {
this.controls.push(control);
var div = control.draw();
if (div) {
this.controlDiv.appendChild( div );
this.viewPortDiv.appendChild( div );
}
},