Use view2DState in ol.interaction.TouchRotate

This commit is contained in:
Tom Payne
2013-06-25 17:12:13 +02:00
parent e84c484677
commit dc9d7e857a

View File

@@ -103,9 +103,10 @@ ol.interaction.TouchRotate.prototype.handleTouchMove =
if (this.rotating_) {
// FIXME works for View2D only
var view = map.getView().getView2D();
var view2DState = view.getView2DState();
map.requestRenderFrame();
ol.interaction.Interaction.rotateWithoutConstraints(map, view,
view.getRotation() + rotationDelta, this.anchor_);
view2DState.rotation + rotationDelta, this.anchor_);
}
};
@@ -119,9 +120,10 @@ ol.interaction.TouchRotate.prototype.handleTouchEnd =
var map = mapBrowserEvent.map;
// FIXME works for View2D only
var view = map.getView().getView2D();
var view2DState = view.getView2DState();
if (this.rotating_) {
ol.interaction.Interaction.rotate(
map, view, view.getRotation(), this.anchor_,
map, view, view2DState.rotation, this.anchor_,
ol.interaction.TOUCHROTATE_ANIMATION_DURATION);
}
return false;