Add Height/Width to control div via Map.js -- this is good for when elements inside the div are absolutely positioned, and therefore have no width.

The LayerSwitcher now sets right, and *unsets* left. This is important because otherwise browsers get confused.



git-svn-id: http://svn.openlayers.org/trunk/openlayers@93 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-05-17 14:03:33 +00:00
parent db2704c6ed
commit 8a5842a11c
2 changed files with 5 additions and 2 deletions

View File

@@ -38,8 +38,9 @@ OpenLayers.Control.LayerSwitcher.prototype =
OpenLayers.Control.prototype.draw.apply(this);
this.div.style.position = "absolute";
this.div.style.top = 50;
this.div.style.right = 100;
this.div.style.top = "10px";
this.div.style.right = "0px";
this.div.style.left="";
this.div.style.fontFamily = "sans-serif";
this.div.style.color = "white";
this.div.style.fontWeight = "bold";

View File

@@ -77,6 +77,8 @@ OpenLayers.Map.prototype = {
// 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);