put zoombar slider at the correct zoom level on first draw (not just always at the end)

git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1306 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-08-19 05:00:54 +00:00
parent 1459ac5de9
commit cd21f42dab

View File

@@ -77,9 +77,9 @@ OpenLayers.Control.PanZoomBar.prototype =
var imgLocation = OpenLayers.Util.getImagesLocation();
var id = "OpenLayers_Control_PanZoomBar_Slider" + this.map.id;
var zoomsToEnd = this.map.getNumZoomLevels() - 1 - this.map.getZoom();
var slider = OpenLayers.Util.createAlphaImageDiv(id,
centered.add(-1,
(this.map.getNumZoomLevels()-1) * this.zoomStopHeight),
centered.add(-1, zoomsToEnd * this.zoomStopHeight),
new OpenLayers.Size(20,9),
imgLocation+"slider.png",
"absolute");