Only zoom by integer values with changes in the mouse wheel. r=bartvde (closes #2376)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9876 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -211,7 +211,7 @@ OpenLayers.Control.Navigation = OpenLayers.Class(OpenLayers.Control, {
|
||||
*/
|
||||
wheelChange: function(evt, deltaZ) {
|
||||
var currentZoom = this.map.getZoom();
|
||||
var newZoom = this.map.getZoom() + deltaZ;
|
||||
var newZoom = this.map.getZoom() + Math.round(deltaZ);
|
||||
newZoom = Math.max(newZoom, 0);
|
||||
newZoom = Math.min(newZoom, this.map.getNumZoomLevels());
|
||||
if (newZoom === currentZoom) {
|
||||
|
||||
Reference in New Issue
Block a user