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:
@@ -168,6 +168,18 @@
|
||||
|
||||
map.destroy();
|
||||
}
|
||||
function test_ie_oneunit(t) {
|
||||
t.plan(2);
|
||||
var control = new OpenLayers.Control.ScaleLine({bottomOutUnits:'',bottomInUnits:'',maxWidth:150});
|
||||
t.ok(control instanceof OpenLayers.Control.ScaleLine, "new OpenLayers.Control returns object" );
|
||||
var map = new OpenLayers.Map('map');
|
||||
var layer = new OpenLayers.Layer.WMS('Test Layer', "bogus", {});
|
||||
map.addLayer(layer);
|
||||
map.zoomTo(0);
|
||||
map.addControl(control);
|
||||
t.ok(true, "invisible bottom scale doesn't cause scaleline failure (IE only)");
|
||||
map.destroy();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user