Merge pull request #261 from elemoine/zoomfactor

Change default zoom delta and animate mousewheel zoom
This commit is contained in:
Éric Lemoine
2013-03-05 03:52:38 -08:00
16 changed files with 317 additions and 112 deletions
+4 -2
View File
@@ -70,7 +70,8 @@ ol.control.Zoom.prototype.handleIn_ = function(browserEvent) {
var map = this.getMap();
map.requestRenderFrame();
// FIXME works for View2D only
map.getView().zoom(map, this.delta_, undefined, ol.control.ZOOM_DURATION);
map.getView().zoomByDelta(map, this.delta_, undefined,
ol.control.ZOOM_DURATION);
};
@@ -84,5 +85,6 @@ ol.control.Zoom.prototype.handleOut_ = function(browserEvent) {
var map = this.getMap();
map.requestRenderFrame();
// FIXME works for View2D only
map.getView().zoom(map, -this.delta_, undefined, ol.control.ZOOM_DURATION);
map.getView().zoomByDelta(map, -this.delta_, undefined,
ol.control.ZOOM_DURATION);
};