Change View2D function names

Also make the TouchZoom interaction no longer use a private View2D function.
This commit is contained in:
Éric Lemoine
2013-03-04 17:59:43 +01:00
parent faef495cfd
commit 03ae41a68c
7 changed files with 32 additions and 29 deletions

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);
};