Fix click-to-zoom.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@373 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -91,7 +91,7 @@ OpenLayers.Control.PanZoomBar.prototype =
|
|||||||
},
|
},
|
||||||
divClick: function (evt) {
|
divClick: function (evt) {
|
||||||
var y = evt.xy.y;
|
var y = evt.xy.y;
|
||||||
var top = parseInt(this.slider.top);
|
var top = Position.page(evt.object)[1];
|
||||||
var levels = Math.floor((y - top)/this.zoomStopHeight);
|
var levels = Math.floor((y - top)/this.zoomStopHeight);
|
||||||
this.map.zoomTo(this.map.getZoomLevels() - levels);
|
this.map.zoomTo(this.map.getZoomLevels() - levels);
|
||||||
Event.stop(evt);
|
Event.stop(evt);
|
||||||
|
|||||||
Reference in New Issue
Block a user