Use requestRenderFrame API in interactions

This commit is contained in:
Tom Payne
2012-10-04 20:33:16 +02:00
parent 8c44dcf83a
commit 934c75bc8c
4 changed files with 7 additions and 0 deletions
@@ -36,6 +36,7 @@ ol.interaction.MouseWheelZoom.prototype.handleMapBrowserEvent =
goog.asserts.assert(mouseWheelEvent instanceof goog.events.MouseWheelEvent);
var anchor = mapBrowserEvent.getCoordinate();
var delta = mouseWheelEvent.deltaY < 0 ? this.delta_ : -this.delta_;
map.requestRenderFrame();
map.zoom(delta, anchor);
mapBrowserEvent.preventDefault();
mouseWheelEvent.preventDefault();