Ticket #1288: ticket1288.patch
| File ticket1288.patch, 1.1 kB (added by bartvde, 1 year ago) |
|---|
-
lib/OpenLayers/Control/PanZoomBar.js
old new 277 277 this.map.events.unregister("mouseup", this, this.passEventToSlider); 278 278 this.map.events.unregister("mousemove", this, this.passEventToSlider); 279 279 var deltaY = this.zoomStart.y - evt.xy.y 280 this.map.zoomTo(this.map.zoom + Math.round(deltaY/this.zoomStopHeight)); 280 if (this.map.fractionalZoom) { 281 var zoomLevel = this.map.zoom + (deltaY/this.zoomStopHeight); 282 var scale = OpenLayers.Util.getScaleFromResolution( 283 this.map.getResolutionForZoom(zoomLevel), this.map.units ); 284 this.map.zoomToScale(scale); 285 } else { 286 this.map.zoomTo(this.map.zoom + Math.round(deltaY/this.zoomStopHeight)); 287 } 281 288 this.moveZoomBar(); 282 289 this.mouseDragStart = null; 283 290 OpenLayers.Event.stop(evt);
