Don't round wheel change zoom for maps with fractional zoom
This commit is contained in:
@@ -261,8 +261,11 @@ OpenLayers.Control.Navigation = OpenLayers.Class(OpenLayers.Control, {
|
||||
* deltaZ - {Integer}
|
||||
*/
|
||||
wheelChange: function(evt, deltaZ) {
|
||||
if (!this.map.fractionalZoom) {
|
||||
deltaZ = Math.round(deltaZ);
|
||||
}
|
||||
var currentZoom = this.map.getZoom();
|
||||
var newZoom = this.map.getZoom() + Math.round(deltaZ);
|
||||
var newZoom = this.map.getZoom() + deltaZ;
|
||||
newZoom = Math.max(newZoom, 0);
|
||||
newZoom = Math.min(newZoom, this.map.getNumZoomLevels());
|
||||
if (newZoom === currentZoom) {
|
||||
|
||||
Reference in New Issue
Block a user