Fix to display only one unit on scaleline in IE. Previously, this worked in
most browsers, but not IE. Includes a test, tested on IE6 and IE7. Patch by zspitzer, r=me, (Closes #1478) git-svn-id: http://svn.openlayers.org/trunk/openlayers@8950 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -189,12 +189,18 @@ OpenLayers.Control.ScaleLine = OpenLayers.Class(OpenLayers.Control, {
|
||||
var bottomPx = bottomMax / res;
|
||||
|
||||
// now set the pixel widths
|
||||
this.eTop.style.width = Math.round(topPx) + "px";
|
||||
this.eBottom.style.width = Math.round(bottomPx) + "px";
|
||||
|
||||
// and the values inside them
|
||||
this.eTop.innerHTML = topRounded + " " + topUnits;
|
||||
this.eBottom.innerHTML = bottomRounded + " " + bottomUnits ;
|
||||
|
||||
if (this.eBottom.style.visibility == "visible"){
|
||||
this.eBottom.style.width = Math.round(bottomPx) + "px";
|
||||
this.eBottom.innerHTML = bottomRounded + " " + bottomUnits ;
|
||||
}
|
||||
|
||||
if (this.eTop.style.visibility == "visible"){
|
||||
this.eTop.style.width = Math.round(topPx) + "px";
|
||||
this.eTop.innerHTML = topRounded + " " + topUnits;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
CLASS_NAME: "OpenLayers.Control.ScaleLine"
|
||||
|
||||
Reference in New Issue
Block a user