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:
@@ -77,9 +77,9 @@ OpenLayers.Control.PanZoomBar.prototype =
|
|||||||
var imgLocation = OpenLayers.Util.getImagesLocation();
|
var imgLocation = OpenLayers.Util.getImagesLocation();
|
||||||
|
|
||||||
var id = "OpenLayers_Control_PanZoomBar_Slider" + this.map.id;
|
var id = "OpenLayers_Control_PanZoomBar_Slider" + this.map.id;
|
||||||
|
var zoomsToEnd = this.map.getNumZoomLevels() - 1 - this.map.getZoom();
|
||||||
var slider = OpenLayers.Util.createAlphaImageDiv(id,
|
var slider = OpenLayers.Util.createAlphaImageDiv(id,
|
||||||
centered.add(-1,
|
centered.add(-1, zoomsToEnd * this.zoomStopHeight),
|
||||||
(this.map.getNumZoomLevels()-1) * this.zoomStopHeight),
|
|
||||||
new OpenLayers.Size(20,9),
|
new OpenLayers.Size(20,9),
|
||||||
imgLocation+"slider.png",
|
imgLocation+"slider.png",
|
||||||
"absolute");
|
"absolute");
|
||||||
|
|||||||
Reference in New Issue
Block a user