Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MouseWheelZoom interaction animates zoom

  • Loading branch information...
commit 673ea079f875d0b0d38109a0836dfc5c1465fe5a 1 parent be5967a
@elemoine elemoine authored tschaub committed
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/ol/interaction/mousewheelzoominteraction.js
View
8 src/ol/interaction/mousewheelzoominteraction.js
@@ -8,6 +8,12 @@ goog.require('ol.View2D');
goog.require('ol.interaction.Interaction');
+/**
+ * @define {number} Zoom duration.
+ */
+ol.interaction.ZOOM_DURATION = 200;
+
+
/**
* @constructor
@@ -43,7 +49,7 @@ ol.interaction.MouseWheelZoom.prototype.handleMapBrowserEvent =
var view = map.getView();
goog.asserts.assert(view instanceof ol.View2D);
map.requestRenderFrame();
- view.zoom(map, delta, anchor);
+ view.zoom(map, delta, anchor, ol.interaction.ZOOM_DURATION);
mapBrowserEvent.preventDefault();
mouseWheelEvent.preventDefault();
}
Please sign in to comment.
Something went wrong with that request. Please try again.