Remove view.getView2D() method
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
// FIXME works for View2D only
|
||||
|
||||
goog.provide('ol.interaction.PinchZoom');
|
||||
|
||||
goog.require('goog.asserts');
|
||||
@@ -80,8 +78,7 @@ ol.interaction.PinchZoom.prototype.handlePointerDrag =
|
||||
}
|
||||
|
||||
var map = mapBrowserEvent.map;
|
||||
// FIXME works for View2D only
|
||||
var view = map.getView().getView2D();
|
||||
var view = map.getView();
|
||||
var view2DState = view.getView2DState();
|
||||
|
||||
// scale anchor point.
|
||||
@@ -109,14 +106,12 @@ ol.interaction.PinchZoom.prototype.handlePointerUp =
|
||||
var map = mapBrowserEvent.map;
|
||||
var view = map.getView();
|
||||
view.setHint(ol.ViewHint.INTERACTING, -1);
|
||||
// FIXME works for View2D only
|
||||
var view2D = view.getView2D();
|
||||
var view2DState = view2D.getView2DState();
|
||||
var view2DState = view.getView2DState();
|
||||
// Zoom to final resolution, with an animation, and provide a
|
||||
// direction not to zoom out/in if user was pinching in/out.
|
||||
// Direction is > 0 if pinching out, and < 0 if pinching in.
|
||||
var direction = this.lastScaleDelta_ - 1;
|
||||
ol.interaction.Interaction.zoom(map, view2D, view2DState.resolution,
|
||||
ol.interaction.Interaction.zoom(map, view, view2DState.resolution,
|
||||
this.anchor_, this.duration_, direction);
|
||||
return false;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user