Move rotate from View2D to Interaction

This commit is contained in:
Éric Lemoine
2013-04-09 18:05:19 +02:00
parent 51094139a8
commit dbca68650c
5 changed files with 70 additions and 61 deletions
@@ -7,6 +7,7 @@ goog.require('goog.math.Vec2');
goog.require('ol.View2D');
goog.require('ol.interaction.ConditionType');
goog.require('ol.interaction.Drag');
goog.require('ol.interaction.Interaction');
@@ -62,7 +63,8 @@ ol.interaction.DragRotateAndZoom.prototype.handleDrag =
// map.withFrozenRendering but an assertion fails :-(
if (goog.isDef(this.lastAngle_)) {
var angleDelta = theta - this.lastAngle_;
view.rotate(map, view.getRotation() - angleDelta);
ol.interaction.Interaction.rotate(
map, view, view.getRotation() - angleDelta);
}
this.lastAngle_ = theta;
if (goog.isDef(this.lastMagnitude_)) {