Debounce mousewheel zoom events

This commit is contained in:
Éric Lemoine
2013-02-21 14:52:15 +01:00
parent 4d486601f9
commit faef495cfd
4 changed files with 84 additions and 40 deletions

View File

@@ -1014,10 +1014,7 @@ ol.Map.createInteractions_ = function(mapOptions) {
var mouseWheelZoom = goog.isDef(mapOptions.mouseWheelZoom) ?
mapOptions.mouseWheelZoom : true;
if (mouseWheelZoom) {
var mouseWheelZoomDelta =
goog.isDef(mapOptions.mouseWheelZoomDelta) ?
mapOptions.mouseWheelZoomDelta : 1;
interactions.push(new ol.interaction.MouseWheelZoom(mouseWheelZoomDelta));
interactions.push(new ol.interaction.MouseWheelZoom());
}
var shiftDragZoom = goog.isDef(mapOptions.shiftDragZoom) ?