Only set interacting hint when modifying the view

This commit is contained in:
Tim Schaub
2013-11-14 14:21:01 -07:00
parent b2f17f9c62
commit b0362b8c0a
5 changed files with 9 additions and 11 deletions
@@ -4,6 +4,7 @@ goog.provide('ol.interaction.DragRotateAndZoom');
goog.require('goog.asserts');
goog.require('goog.math.Vec2');
goog.require('ol.ViewHint');
goog.require('ol.events.ConditionType');
goog.require('ol.events.condition');
goog.require('ol.interaction.Drag');
@@ -105,6 +106,7 @@ ol.interaction.DragRotateAndZoom.prototype.handleDragEnd =
var map = mapBrowserEvent.map;
// FIXME works for View2D only
var view = map.getView().getView2D();
view.setHint(ol.ViewHint.INTERACTING, -1);
var view2DState = view.getView2DState();
var direction = this.lastScaleDelta_ - 1;
map.withFrozenRendering(function() {
@@ -124,6 +126,7 @@ ol.interaction.DragRotateAndZoom.prototype.handleDragEnd =
ol.interaction.DragRotateAndZoom.prototype.handleDragStart =
function(mapBrowserEvent) {
if (this.condition_(mapBrowserEvent)) {
mapBrowserEvent.map.getView().setHint(ol.ViewHint.INTERACTING, 1);
this.lastAngle_ = undefined;
this.lastMagnitude_ = undefined;
return true;